Ubuntu: dns-nameserver not working with AP hotspot Ubuntu 16.04


So I used hostapd to create a AP hotspot on my Ubuntu 16.04 machine. Here is the configuration in /etc/hostapd/hostapd.conf file

interface=wlp3s0  driver=nl80211  ssid=script  hw_mode=g  channel=1  macaddr_acl=0  auth_algs=1  ignore_broadcast_ssid=0  wpa=3  wpa_passphrase=robots+humans  wpa_key_mgmt=WPA-PSK  wpa_pairwise=TKIP  rsn_pairwise=CCMP  

Below is my /etc/network/interfaces file:

auto lo  iface lo inet loopback    auto wlp3s0  iface wlp3s0 inet static  address  netmask  gateway  dns-nameservers  

And before I start hostapd, I executed these IP routing commands as well

echo 1 | tee > /proc/sys/net/ipv4/ip_forward  iptables -t nat -A POSTROUTING -s -o \$ext_interface -j MASQUERADE  

When I start my hostapd, it starts my AP hotspot with static IP and I can connect to it from my phone and my Intel Edison microcontroller, can even ping each device from the other. But I can't access google.com from phone or ping google.com from Intel edison. Any help? I already tried these suggestions below and it didn't work.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »