Raspberry as Pi Ethernet-WiFi-Bridge
Jump to navigation
Jump to search
The Challenge
I wanted to set up my Raspberry Pi 3 as Webcam, intranet server, and Ethernet-WiFi-Bridge. In the long run I want to use some kind of QOA/shaping on the Pi to manage my really bad internet connection (yes, 6MBit/s in a country where 82 million people live on 356 thousand square-kilometers (about 230 people per square-km).
Setup
Install additional software
apt get install hostapd bridge-utils dhcp-helper dnsutils
What do they do?
- hostapd: A daemon that sets up your WiFi as a access point, so anyone can join. Please note, that this means WiFi only. No DHCP, and therefore no DNS.
- bridge-utils: These provide the bridging you need to "connect" the ethernet and WiFi interfaces.
- dhcp-helper: DHCP uses a broadcast to the network (address) to reach the DHCP-server. Since broadcasts stay in the broadcast-domain with a TTL of 1, the won't get bridged. This is where dhcp-helper comes in. It forwards the broadcasts in all other nets (except the one specified with -b.
- dnsutils: Just to do a nslookup from time to time. You can test your DNS-setup as well as lookup with nslookup[1]
Configuration
vi /etc/sysctl.conf
and set
net.ipv4.ip_forward=1 net.ipv6.conf.all.disable_ipv6 = 1
Notes
Since you use a DHCP server and you manually set IPAs, you might want to reserve those IPAs in your DHCP-server configuration.
- More like this:
- tbd
- Footnotes
- ↑ or dig