I am trying to share my Wifi internet connection on my laptop with a desktop computer temporarily. I have set up a bridge between wlan0 and eth0 (called br0), got an address on br0 from dhcp, and even got an address from the wireless router to the (Windows) pc using dhcp. The pc can ping the laptop, but not ping the router or get on the internet. is there a step i'm missing?

  • The PC got an IP from the router via DHCP, so we know in principle that they can communicate. The laptop is the most likely culprit. Can you run sudo tcpdump -ei br0 on the laptop and then ping the router from the Windows box? You may need to install tcpdump. – Paul Nov 10 '11 at 23:29

Unfortunately, some wireless cards do not support bridging. In order to forward packets from the wired side of the bridge, the wireless interface needs to 'spoof' the MAC address of the source host. If the card (or driver) is unable to spoof packets, the bridge won't work.

You may want to use NAT instead, or find a different wifi device.

See http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge#It_doesn.27t_work_with_my_Wireless_card.21 for a full explanation.

  • Wow! there's an old question answered. This is correct, it turns out to be a hardware/driver issue. – Woodrow Douglass May 3 '12 at 12:52
  • Yeah, I was trying to debug my (non-wireless) bridge, and some googling lead me here, so I thought I'd answer :) – Jeremy Kerr May 3 '12 at 12:54

Maybe the routes tables need some adjusting.


Every machine needs to

a) know how to reach other machines in the same network

b) know how to reach everythng else (the internet) through a so called "gateway"

As Paul pointed out, the routing tables should have been set correctly because you are using DHCP but you could check.

  • The laptop is a bridge, so not a gateway, and the PC got its IP address from the router via dhcp so would have been provided a default gateway – Paul Nov 10 '11 at 23:27

I tried something similar with a bridge too, but then I decided to use a 2nd NAT to connect an USB device, so my setting looks like

  • router with NAT - desktop-PC with NAT - USB device

and this is simply done with some iptables rules on the PC.


Try clearing your iptables rules.

iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT ACCEPT

Also clear your arp table: arp -d *

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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