Rapberry PI Wifi Router
From wiki
Prerequisite
For this guide, you will need
- A Raspberry Pi 3: It can work on previous generations but you will need a WiFi USB card plus eventually manually install drivers.
- Raspbian: This guide is written for Raspbian.
Install
$ sudo apt install hostapd
Configure Interface
dhcpcd
dhcpcd is the default DHCP client in Raspbian. You need to disable it for the wlan0
interface to avoid conflicts with the rest of the setup.
Edit file /etc/dhcpcd.conf
an add the following line at the end
denyinterfaces wlan0
Warning: This must be above any interface
lines you may have added
And restart dhcpcd
using
$ sudo systemctl restart dhcpcd.service
Interface
The second step is to configure the interface with a static IP address.
Edit the file /etc/network/interfaces
and replace the block related to wlan0
by
allow-hotplug wlan0
iface wlan0 inet static
address 10.18.16.1
netmask 255.255.255.0
network 10.18.16.0
broadcast 10.18.16.255
# wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
And apply the configuration using
$ sudo ifdown wlan0
$ sudo ifup wlan0
Configure Access Point
Warning: | This page is a work in progress and is not completed. Important informations might be missing or wrong. |
Configure DHCP
Warning: | This page is a work in progress and is not completed. Important informations might be missing or wrong. |
Configure IP Routing
Warning: | This page is a work in progress and is not completed. Important informations might be missing or wrong. |