1

I have given a host an 10.0.x.x address in out public dns. (The reasons are irrellevant)

The host can be reached from our locations through vpn, however, one site behind a Tomato can not resolve the host.

I've tried from a client, pinging and tracerouting from router gui,but the internal.example.com is not resolved.

Could the dns in the router be intercepting dns-lookups which return RFC1918-answers? Could the ISP? But I'm queying 8.8.8.8, and the domain is, according to https://www.whatsmydns.net is resolvable from all over the world. (except a server in Turkey, which returns 195.175.254.2 for all hosts in our domain.)

EDIT Something fishy is going on. The tomato router have a window I can run commands in. Even if I make a nslookup on a non-existant server, Iget replies:

 # nslookup microsoft.com 254.254.254.254
Server:    254.254.254.254 
Address 1: 254.254.254.254

Name:      microsoft.com 
Address 1: 13.77.161.179 
Address 2: 40.76.4.15 
(...) 

So something is definitely intercepting the dns lookups.

I'll have to ask my ISP

  • Yes, routers can be configured to reject global DNS responses with RFC1918 addresses. Some do this by default. – Michael Hampton Dec 6 '18 at 18:38
  • To find out if you are really using 8.8.8.8 you can try dig txt o-o.myaddr.l.google.com – kasperd Dec 7 '18 at 12:26
  • Cool. Unfortunately nslookup in busybox on the router does not support options to do anything else than A/AAAA lookups. But I added the 10.0.x.x to dnsmasq, and now it resolves. – Lenne Dec 7 '18 at 12:40
2

Public DNS names that resolve to private addresses can be used to trick a browser into attacking internal network devices, thinking they belong to the domain that is displayed in the browser. To prevent this, DNS servers can be configured to not return these private addresses if they are found in a DNS response.

Your second discovery is independent of the first. Most routers use busybox for many common tools. Busybox provides the commonly used functions of many Unix utilities but aims for small size at the expense of rarely used functionality. Some versions of busybox ignore the DNS server in the second argument and just query the default resolver.

| improve this answer | |
  • So busybox might be telling me it's using one server, but really using another? Darn, why lie to me? It should display what server it's really using when it is ignoring what I tell it. Anyway, to overrule the first part, I have now entered the name/ip in the config for dnsmasq. I can now lookup the ip from the router. – Lenne Dec 7 '18 at 7:10
  • The Busybox version where I discovered this behavior didn't exactly lie, it didn't know or care for the DNS server used. It would just use gethostbyname and could therefor also use names from /etc/hosts. I agree that this behavior is not desirable. – RalfFriedl Dec 7 '18 at 17:47
  • At it should say it's using another server than I ask it to – Lenne Dec 7 '18 at 17:50

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.