Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save florianroulet/3f40a420009b9866494c1cc5695ed035 to your computer and use it in GitHub Desktop.
Save florianroulet/3f40a420009b9866494c1cc5695ed035 to your computer and use it in GitHub Desktop.
create a wifi bridge with a raspberry

prerequisite : have a functionnal raspberry with ssh access configured see here

  • install dependencies sudo apt install hostapd hostap-utils iw bridge-utils rfkill
  • set file /etc/hostapd/hostapd.conf as in this gist. Don't forget to set the SSID, channel, country and passphrase following your requirement
  • set file /etc/network/interfaces as in this gist
  • set file /etc/default/hostapd as in this gist
  • reboot sudo reboot
  • Have Fun
RUN_DAEMON=YES
DAEMON_CONF="/etc/hostapd/hostapd.conf"
# Bridge mode
bridge=br0
# Networking interface
interface=wlan0
# WiFi configuration
ssid=YourSSIDName
channel=5
hw_mode=g
country_code=FR
ieee80211n=1
ieee80211d=1
wmm_enabled=1
# WiFi security
auth_algs=1
wpa=2
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
wpa_passphrase=#&YourMegaProtectedPassPhrase!%
auto lo
iface lo inet loopback
# Ethernet
auto eth0
allow-hotplug eth0
iface eth0 inet manual
# WiFi
auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
wireless-power off
# Bridge
auto br0
iface br0 inet dhcp
bridge_ports eth0 wlan0
bridge_fd 0
bridge_stp off
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment