I want to bridge wlan0 and eth0 to get Internet from wlan0 to eth0 to plug in a switch.
I configured wpa-supplicant and have this interfaces file:

auto lo

iface lo inet loopback

iface eth0 inet manual

auto wlan0
iface wlan0 inet manual

auto br0
iface br0 inet static
      address   #ip in wlan0 for Internet
      netmask   #netmask in wlan0 for Internet
      gateway   #gateway in wlan0 for Internet
      bridge_ports wlan0 eth0
      bridge_stp off
      bridge_maxwait 5

wpa-iface wlan0
wpa-bridge br0
wpa-driver wext
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

It seems not to work. What could be the problem?


Now I know: bridging from wifi to ethernet doesn't work, if the WiFi adapter isn't in host mode because it isn't allowed to send any information with an different MAC address! I thought that's only the problem with bridging from Ethernet to WiFi.

  • Did you already create the br0 interface using the command brctl addbr br0? What does ip show addr display? Commented Feb 5, 2014 at 20:26
  • plz paste you ifconfig!
    – Alex Tape
    Commented Feb 6, 2014 at 9:18

1 Answer 1


just a sharp shoot:

To share wlan0 and eth0


auto lo
iface lo inet loopback

auto wlan0 
iface wlan0 inet dhcp
     wpa-driver wext
     wpa-ssid YOUR_SSID
     wpa-ap-scan 1
     wpa-proto RSN
     wpa-pairwise CCMP
     wpa-group CCMP
     wpa-key-mgmt WPA-PSK
     wpa-psk "passphrase"

auto eth0
iface eth0 inet static

## remove rules and chains first
up /sbin/iptables -F
 up /sbin/iptables -X
  up /sbin/iptables -t nat -F

    ## mask eth0, activate port forwarding and nat
up /sbin/iptables -A FORWARD -o wlan0 -i eth0 -s -m conntrack --ctstate NEW -j ACCEPT
 up /sbin/iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
  up /sbin/iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE 
   up /sbin/sysctl -w net.ipv4.ip_forward=1 

## use dnsmasq-base
## on range -
up /usr/bin/killall dnsmasq
 up /bin/sleep 2
  post-up /usr/sbin/dnsmasq -i eth0 -I wlan0 -F,,infinite

## if you use dnsmasq activate this
## if dnsmasq-base deactive this
## dnsmasq restart
# post-up /etc/init.d/dnsmasq restart

for dnsmasq


# dhcp active for eth0

# no dhcp for wlan0

# range / Lease-Time
  • I have had problems because I haven't installed dnsmasq. Now it works! Commented Feb 8, 2014 at 15:28
  • Interesting. This is what I was looking for.. Upvote.
    – SDsolar
    Commented May 5, 2017 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.