The Raspberry Pi 3 that I have comes standard with two network interfaces; a wired interface that can do 100mbps and a WiFi interface. Older Raspberry Pi’s required that you use a USB dongle for WiFi, I don’t use those units any longer.
So for the purposes of all that follows, I assume Raspberry Pi 3, onboard WiFi and wired ethernet.
By default, these two interfaces are active and software that you run on the Raspberry Pi can connect to the outside world using one, or both.
I’ve found several interesting use-cases for the Raspberry Pi by changing the way these interfaces are configured.
- A WiFi satellite location
In this image, three devices (device 1, 2 and 3) are not WiFi enabled and are internet connected using the Raspberry Pi as effectively a wireless network extender.
This setup is relatively straightforward on a Raspberry Pi.
- Configure the wireless interface on the Raspberry Pi to connect to the wireless access point.
- Enable ip forwarding
- Configure dnsmasq
- Enable packet forwarding from the wlan0 and eth0 interfaces
With this setup, the three devices connected to the wired interface will get their DHCP leases from the Raspberry Pi. Packets will get forwarded by the Raspberry Pi between the wired and wireless interfaces.
- A WiFi satellite location without DHCP
The above configuration is very useful for some things but not always. I have a printer (quite old) which I have connected to a single parallel port ethernet print server (TP-Link TL-PS110P). I need to be able to access this printer from other wirelessly connected devices and so I need it to have its DHCP lease coming from the WiFi Access Point!
This setup is similar to (1) above, but no dnsmasq, no NAT, enable proxy ARP.
- The Raspberry Pi as a WiFi access point
This is something I’ve just been playing with recently and it appears to work quite well. The Raspberry Pi 3’s WiFi interface can be configured to act as an access point using the hostapd package. The way I have this setup, dnsmasq is enabled and the wirelessly connected devices receive DHCP leases from the Raspberry Pi. Traffic is routed to the internet over the wired interface.
- The Raspberry Pi as a secure WiFi access point
Eventually, this is what I want to get, a Raspberry Pi as a secure WiFi access point; the WiFi interface running in access point mode but all traffic going out of the wired interface is tunneled to a VPN.
I use OpenVPN, and that works fine on the Raspberry Pi already. Have to put the pieces together and make it a bit more robust; right now, not quite there.
Equally interesting would be the other configuration like (1) above but where all traffic out of the WiFi interface is tunneled. In that setup, I could, for example connect my laptop to the wired interface and connect to any WiFi access point on the Raspberry Pi. Traffic over the WiFi interface would be tunneled by the Raspberry Pi and this would be an ideal travel setup as the Raspberry Pi would just be powered off the USB port on the laptop 🙂