Sunday, June 16, 2013

Raspberry Pi Wifi Access Point (L2 Bridge Mode)

A recent guide to using the Raspberry Pi as a Wifi Access Point focused on providing a routed network from the Pi itself. In most home network settings, this introduces a Double-NAT which is highly undesirable.

However, a WiFi access point is usually a layer 2 bridge. Thankfully, the built-in drivers for the RaLink RT5370 usb dongle supports bridging with the following command:

iw phy phy0 interface add moni0 type managed 4addr on

After running this command, all normal brctl commands work with the wlan0 device, and a Pi can be configured as a real layer 2 bridging access point!

The following is an example configuration suitable for Rasbian. HostAP should be configured as per the eLinux guide. No DHCP or Firewall configuration is required.