I have an ubnutu server connected to internet by an ethernet cable to a router. I would like to share the Internet connection by a Wifi usb dongle connected to the server.

What are the possible ways to setup the server as a wifi access point?

The router is running a dhcp server, and I would like that wifi clients get their ip directly from the router without any "routing" in the ubuntu box.

  • May I ask why? What's wrong with simply plugging in an access point to the LAN? – scotthere Jun 11 '09 at 13:19
  • Mainly because of ports forwarding and firewall, that I would like to manage from my router configuration page. – karatchov Jun 11 '09 at 14:21
  • I dont have an access point, I would like a software solution – karatchov Jun 11 '09 at 14:22

You will need to run your WiFi interface in Ad-Hoc or AP mode. Read http://www.linux.com/archive/articles/55617 for a fine introduction to wireless access point configuration under Linux, including securing and bridging. Note that not every chipset can run in AP mode, so your mileage may vary.


So, you basically want your Ubuntu box to act as a repeater or media converter, otherwise known as a bridge. Try adding something like this to /etc/network/interfaces:

   iface br0 inet static
       bridge_ports all

Note: you'll need to have the bridge-utils package installed.

  • Does this work?... or is this 'something to try'. Looks interesting! – l0c0b0x Jun 12 '09 at 4:54
  • any idea how I will manage wifi security ? – karatchov Jun 12 '09 at 8:25

I am quite sure it is not possible for clients to get IPs from router without "any" routing in ububtu box. The box will not route traffic from WiFi to LAN and back all by itself.


You can bridge the ethernet interface and wi-fi interface, and all the traffic will pass unmodified. Your router will see DHCP requests from wireless clients and answer them.

You will need an extra interface for the machine itself tough. Or you can look for tricks that will leave the bridged interface usable by the machine as a normal ethernet interface.

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.