I am using hostapd for my WiFi hotspot, and I can connect my WiFi perfectly until today.

I have isc-dhcp-server and bind9 running on my laptop, because I want my laptop to be dhcp and dns server. Everything works perfectly until today.

the problem is:

When I start hostapd, my phone can connect to the WiFi, however, there is no network connection on my phone, but WiFi is connected. and my dhcp and dns works fine on my phone, just cannot connect to network.

Laptop has connected on network, and I set wlan0 as static address as usual

auto wlan0
iface wlan0 inet static

and the eth0

auto eth0
iface eth0 inet dhcp

and I never forget to do this:

sudo iptables -t nat -A POSTROUTING -s -o eth0 -j MASQUERADE
sudo sysctl net.ipv4.conf.all.forwarding=1

I my sure, I am using eth0 to connect network on laptop All these thing should work well, and as I said it works many many times and I dont know why it can`t work now.

I am wondering that is there any problem with my iptable, so I did

sudo iptables -F

Anyone can help me? I really feel uncomfortable with this problem.

Thanks and Regards


OK, I find solution by myself.

I just change my private network from to

I don`t know where the problem came from. But it works for me

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.