Page 1 of 1

DNS issue inside router, clients are OK

Posted: Sat Aug 04, 2018 11:47 pm
by lucianor
I'm currently facing an issue where the clients connected to the router have normal access to the internet, with full DNS resolution, but the router itself does not.

This is the command from a client:

Code: Select all

xubuntu@xubuntu:~$ ping -c 3 www.g1.com.br
PING www.g1.com.br (186.192.90.5) 56(84) bytes of data.
64 bytes from 186-192-90-5.prt.globo.com (186.192.90.5): icmp_seq=1 ttl=244 time=35.0 ms
64 bytes from 186-192-90-5.prt.globo.com (186.192.90.5): icmp_seq=2 ttl=244 time=39.5 ms
64 bytes from 186-192-90-5.prt.globo.com (186.192.90.5): icmp_seq=3 ttl=244 time=40.5 ms

--- www.g1.com.br ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 35.000/38.361/40.500/2.411 ms
But if ssh to the router and execute the same command:

Code: Select all

root@Gargoyle:~# ping -c 3 www.g1.com.br
ping: bad address 'www.g1.com.br'
But pinging the IP address directly works just fine:

Code: Select all

root@Gargoyle:~# ping -c 3 186.192.90.5
PING 186.192.90.5 (186.192.90.5): 56 data bytes
64 bytes from 186.192.90.5: seq=0 ttl=244 time=40.147 ms
64 bytes from 186.192.90.5: seq=1 ttl=244 time=34.067 ms
64 bytes from 186.192.90.5: seq=2 ttl=244 time=33.144 ms

--- 186.192.90.5 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 33.144/35.786/40.147 ms
This Gargoyle router is a wired bridge, configured on Gateway mode and assigned an IP address of 192.168.0.2 with 192.168.0.1 as gateway. I have set Custom DNS servers and added 192.168.0.1.
On the Internet/WAN section the "Connect Via" is Disabled, and WAN Internet port is also Disabled.

I tried adding a nameserver entry to resolv.conf and /etc/init.d/network restart, but nothing happened.

What am I missing? Without the DNS server inside the router I can't use NTP server or opkg. :cry:

Re: DNS issue inside router, clients are OK

Posted: Sat Aug 04, 2018 11:52 pm
by Lantis
Because it is Connect Via disabled, this is the root of your issue.
There is a way to get around it but I can’t recall. I’d have to muck around to figure it out.

I think adding DNS servers is the correct method, but you need to add them to the right section.

Re: DNS issue inside router, clients are OK

Posted: Sat Aug 04, 2018 11:58 pm
by lucianor
Thanks for the prompt response, but my question remains unanswered.

The only option I see in "Connect Via" is Static IP (Wired), but I would have to connect the wired cable from the other router on the WAN port, and that would not replicate the DHCP from the main router and I would have LAN routing issues, wouldn't I?

Is there a way to fix this manually? Without the web interface?

Re: DNS issue inside router, clients are OK

Posted: Sun Aug 05, 2018 9:47 am
by Lantis
Yes your assumption is correct.
You would be creating a new subnet and routing between them in that configuration. Which is how Gargoyle is designed to operate. Quotas, bandwidth monitoring, qos etc all require one of those style settings.
Connect via disabled turns it into a dumb switch.

So I can play around and see if I can get you a solution (which would be command line only) or you can rethink/configure your solution.

Re: DNS issue inside router, clients are OK

Posted: Sun Aug 05, 2018 6:39 pm
by tapper
Hi Have you tryed setting the APs DNS to be the IP of the mane router? EG my AP is at 192.168.1.2 and I told it's DNS server is at 192.168.1.1.