NAzT
11/23/2013 - 4:36 PM

gistfile1.txt

auto lo

iface lo inet loopback
iface eth0 inet dhcp

#allow-hotplug wlan0

#iface wlan0 inet manual
#wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
#iface default inet dhcp

iface wlan0 inet static
  address 192.168.42.1
  netmask 255.255.255.0
  post-up ip addr add dev wlan0 192.168.42.49/24
  pre-down ip addr del dev wlan0 192.168.42.49/24
  dns-nameservers 208.67.222.222 208.67.220.220 8.8.8.8 8.8.4.4

up iptables-restore < /etc/iptables.ipv4.nat
    1  sudo raspi-config
    2  sudo apt-get update
    3  sudo vi /etc/resolv.conf
    4  sudo apt-get update
    5  sudo apt-get upgrade
    6  sudo apt-get install resolvconf
    7  ls
    8  sudo apt-get install vim
    9  sudo update-alternatives --config editor
   10  sudo apt-get autoremove isc-dhcp-server
   11  sudo apt-get install -y dnsmasq dnsutils
   12  sudo service dnsmasq status
   13  sudo vi /etc/dnsmasq.d/dnsmasq.custom.conf
   14  sudo vi /etc/resolvconf/resolv.conf.d/head
   15  cat v
   16  cat  /etc/resolv.conf
   17  sudo init 6
   18  cat  /etc/resolv.conf
   19  sudo apt-get install hostapd
   20  sudo vi /etc/network/interfaces t
   21  sudo vi /etc/network/interfaces
   22  sudo vi /etc/hostapd/hostapd.conf
   23  sudo vi /etc/hostapd/ifupdown.sh
   24  sudo nano /etc/hostapd/hostapd.conf
   25  sudo vi /etc/hostapd/hostapd.conf
   26  sudo vi /etc/sysctl.conf
   27  sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
   28  sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
   29  sudo iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
   30  sudo iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT
   31  sudo sh -c "iptables-save > /etc/iptables.ipv4.nat"
   32  sudo vi /etc/network/interfaces
   33  sudo ifdown wlan0; sudo ifupwlan0
   34  sudo ifdown wlan0; sudo ifup wlan0
   35  ifconfig
   36  sudo service hostapd start
   37  sudo update-rc.d hostapd enable
   38  sudo init 6
   39  ifconfig
   40  sudo vi /etc/sysctl.conf
   41  sudo service  hostapd status
   42  sudo iptables -t nat -S
   43  sudo iptables -S
   44  sudo dmesg
   45  sudo vi /etc/default/hostapd
   46  sudo /usr/sbin/hostapd /etc/hostapd/hostapd.conf
   47  sudo init 6
   48  sudo service dnsmasq
   49  sudo service dnsmasq st
   50  sudo service dnsmasq status
   51  ifconfig
   52  sudo ifdown wlan0; sudo ifup wlan0
   53  ifconfig
   54  sudo service hostapd restart
   55  sudo init 6
   56  sudo init 0
   57  ls
   58  sudo vi /etc/network/interfaces
   59  sudo vi /etc/dnsmasq.d/dnsmasq.custom.conf
   60  sudo vi /etc/hostapd/hostapd.conf
   61  sudo init 6
   62  history
interface=wlan0
driver=nl80211
ssid=PinnBox
hw_mode=g
channel=6
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=RaspberryPiBox
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP