Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
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
add comment

4 Answers 4

up vote 1 down vote accepted

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.

share|improve this answer
add comment

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
       address 192.168.1.2
       network 192.168.1.0
       netmask 255.255.255.0
       broadcast 192.168.1.255
       gateway 192.168.1.1
       bridge_ports all

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

share|improve this answer
    
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
add comment

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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