Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

I'm using a laptop as a wifi access point. Since this laptop has the proper hardware, I was able to use hostapd. I wanted to use DHCP and iptables/NAT forwarding instead of a bridge to have more control over the connection. I made a script to execute all commands.

My devices are able to connect to the access point and have full access to the internet for the first few minutes. After this amount of time, no devices are able to connect to the access point anymore. The only way to re-establish a connection is if I reboot the laptop and relaunch the script.

Here is my script:

echo 1 > /proc/sys/net/ipv4/ip_forward

# Clear iptables Rules
iptables -F
iptables -t nat -F

# iptables Rules
iptables -A FORWARD -d -o wlan0 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -s -i wlan0 -j ACCEPT
iptables -t nat -A POSTROUTING -o p4p1 -j MASQUERADE

# Set wlan0 IP
ip addr add broadcast dev wlan0
ip link set wlan0 up

# Set DHCP
dnsmasq -C /dev/null >/dev/null 2>&1 --listen-address= --dhcp-range=,,12h

# hostapd
hostapd /etc/hostapd/hostapd.conf

Where hostapd.conf has the following content:


Additional information:

  • Network hardware: Broadcom Corporation BCM4311 802.11a/b/g (rev 01)
  • Network subsystem: Dell Wireless 1490 Dual Band WLAN Mini-Card
  • Network driver: b43-pci-bridge
  • OS: Fedora 17 (up to date)

Below is an image of an iPod showing correct IP and router information enter image description here

share|improve this question
The output of dmesg is most of the time helpful. – scai Aug 1 '12 at 15:36
up vote 2 down vote accepted

The solution to my problem was to install the latest b43 community drivers. I followed the instructions here: http://linuxwireless.org/en/users/Drivers/b43, rebooted the laptop, and have been connected for two hours or so without any disconnections with multiple iOS and Android devices.

share|improve this answer

Your Answer


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.