Raspberry Pi 3 model B 已經內建 Wifi, 因此只要安裝
hostapd – Host AccessPoint Daemon
wpa-supplicant – tool responsible for WPA authorization
isc-dhcp-server
ip-tables - router
sudo apt-get update sudo apt-get -y install hostapd isc-dhcp-server iptables wpa_supplicant
/etc/hostapd/hostapd.conf
/etc/dhcp/dhcpd.conf
/etc/network/interfaces
auto wlan0 allow-hotplug wlan0 iface wlan0 inet static address 192.134.3.1 netmask 255.255.255.0 up iptables-restore < /etc/iptables.ipv4.nat
Let’s turn on packet forwarding in /etc/sysctl.conf by making sure that line
net.ipv4.ip_forward=1
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
sudo apt-get -y install bridge-utils
auto lo
iface lo inet loopback iface eth0 inet dhcp
auto br0 iface br0 inet dhcp bridge_ports eth0 wlan0
Comments
comments powered by Disqus