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
address 192.168.1.1
netmask 255.255.255.0
and the eth0
auto eth0
iface eth0 inet dhcp
and I never forget to do this:
sudo iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -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