DNS issue inside router, clients are OK

Report wireless and/or network connectivity problems in this forum.

Moderator: Moderators

lucianor
Posts: 13
Joined: Wed Dec 21, 2016 1:58 pm

DNS issue inside router, clients are OK

Postby lucianor » Sat Aug 04, 2018 11:47 pm

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:

Lantis
Moderator
Posts: 4454
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: DNS issue inside router, clients are OK

Postby Lantis » Sat Aug 04, 2018 11:52 pm

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.
WRT32X on 1.11.X
Various ar71xx/mvebu boards in a constant state of flux
www.lantisproject.com for custom builds and other projects
www.lantisproject.com/gargoyle_ispyisail/ for the latest releases

lucianor
Posts: 13
Joined: Wed Dec 21, 2016 1:58 pm

Re: DNS issue inside router, clients are OK

Postby lucianor » Sat Aug 04, 2018 11:58 pm

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?

Lantis
Moderator
Posts: 4454
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: DNS issue inside router, clients are OK

Postby Lantis » Sun Aug 05, 2018 9:47 am

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.
WRT32X on 1.11.X
Various ar71xx/mvebu boards in a constant state of flux
www.lantisproject.com for custom builds and other projects
www.lantisproject.com/gargoyle_ispyisail/ for the latest releases

tapper
Moderator
Posts: 1045
Joined: Sun Oct 13, 2013 5:49 pm
Location: Stoke-on-trent UK

Re: DNS issue inside router, clients are OK

Postby tapper » Sun Aug 05, 2018 6:39 pm

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.
TP-Link WR1043ND v2.1 Gargoyle 1.6.2
Western Digital My Net N750 Gargoyle 1.9x
TP-Link TL-WDR3600 V1.5 Gargoyle 1.9x
TP-Link Archer C7 Gargoyle 1.9x
Linksys WRT1900AC V2 Gargoyle 1.9x
Linksys WRT3200ACM LEDE 17.1


Return to “Network / Wireless Issues”

Who is online

Users browsing this forum: No registered users and 5 guests