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?
|
feedback
|
|
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. | |||||
feedback
|
|
Maybe the routes tables need some adjusting. http://www.cyberciti.biz/faq/linux-route-add/ 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. | ||||
feedback
|
|
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
and this is simply done with some iptables rules on the PC. | |||
|
feedback
|
|
Try clearing your iptables rules.
Also clear your arp table: | |||
|
feedback
|

sudo tcpdump -ei br0on the laptop and then ping the router from the Windows box? You may need to install tcpdump. – Paul Nov 10 '11 at 23:29