Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can a linux computer be set up to be an "access point", but without "bridging"/forwarding traffic to/from the wired network (using WPA2 and SSID brodcasting disabled)?

The reason to do this would be in order to access things on computer itself, wirelessly, even when the computer is not connected to any other networks.

It seems there should be a way to do so using hostapd and some kind of dhcp to give out IP addresses.

The computer is currently running Debian squeeze, and has a network car that uses a b43 driver. This tutorial mostly works but cannot stops when trying to obtain an IP address, and besides, it is for a conventional router setup.

It seems there may be another way to do it (see here, and here for info on using WPA in /etc/network/interfaces).

Update: Thank G-d, it is working now. Disabled IP forwarding by running echo 0 > /proc/sys/net/ipv4/ip_forward.The reason it was not getting an IP address was because 1) there was no IP address set for the interface, 2) there was no DHCP server running.

So I set an IP by using ifconfig. Example: ifconfig wlan0 <ipaddress> netmask <subnet-mask>. I installed dnsmasq as a DHCP server. Also, an android phone would disconnect after around every 5 seconds; setting beacon_int=15 in hostapd.conf fixed this issue.

share|improve this question
up vote 0 down vote accepted

Default config of system able to route should be with routing disabled.

You can add those lines to /etc/sysctl.conf to make it more obvious:

net.ipv4.conf.all.forwarding = 0
net.ipv4.conf.all.mc_forwarding = 0
net.ipv4.conf.default.forwarding = 0
net.ipv4.conf.default.mc_forwarding = 0
net.ipv6.conf.all.forwarding = 0
net.ipv6.conf.default.forwarding = 0

You might still want to run some sort of DHCP server that DOES NOT configure default route on particular interface. (default dhcpd.conf has route as example, and you need to DISABLE that)

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .