I have the following setup:

modem + router - - - - -Ubuntu box on master mode.........wireless devises. Ubuntu machine connects to Internet on wired network. I've dhcp3-server, masquerading, and wireless card with master mode on Ubuntu box. The issue is Ubuntu connects to the router on NAT. The wireless devises connect to the Ubuntu box on a NAT too (though different). SO my wireless devises are behind two NAT networks. The solution I am looking for is Ubuntu should forward dhcp requests to the modem+router, and Ubuntu should act as a switch or a bridge that allows wireless devises to connect to the wired network. So the modem+router should act a main router.


Have a look at this article, it explains how to bridge a wireless and LAN networks:


Don't worry about DHCP relay - that will happen automatically across the bridge. Should you really want to DHCP relay there is a package dhcp3-relay for that but I don't think its what you require here.

  • My eth0(wired) gets its ip address over dhcp and some times I use wlan0 on client mode, so I cannot have entries for both in my /etc/network/interfaces file. So is it possible to bridge the interfaces on the fly, perhaps with the ifconfig command? – nixnotwin Jan 9 '11 at 15:13
  • Not ifconfig, it would be using brctl. You can setup actions when an interface goes up and down and auto-add to bridges and auto-remove bridges. This setup is sounding more and more complex! Might be easier to buy a $100 router or something to keep it simple? – hellomynameisjoel Jan 10 '11 at 10:03

I did it. https://askubuntu.com/questions/21679/script-to-setup-ubuntu-as-a-wireless-accesspoint-on-a-bridge-mode

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.