-2

My physical setup is:

            DMZ (SERVER) (192.168.1.1)
                         |
                         |
WAN ——— ROUTER (1.2.3.4, 192.168.1.254) ——— LAN

LAN adresses are assigned by DHCP. The router assigns this config:

  • IP: 192.168.1.x/24
  • GW: 192.168.1.254
  • DNS1: 192.168.1.1
  • DNS2: 8.8.8.8

I have the server configured and running properly as a DNS proxy with an exception of it's hostname, for which it returns 192.168.1.1. The purpose of this setup is, that the server is available on the same hostname from either WAN or LAN.

The problem is, that my system ignores this DNS setup. I've tried flushing DNS in the system and the browser, but non of these works. Manual DNS queries works as expected, but as far as the application does the query, it uses wrong address.

tomasbedrich
  • 143
  • 1
  • 6
  • 1
    Please post some examples of your last sentence, so we can see exactly what behavior is wrong. Also have you used ifconfig or ipconfig to verify that the client has the configuration you listed? – Andrew Schulman Jan 11 '14 at 14:09
  • That's not really a DMZ if it's right there on your LAN! – Michael Hampton Jan 11 '14 at 16:12
  • I don't see any reason, why the downvotes. @AndrewSchulman: Yes, I have verified this: `dig hostname @192.168.1.1` returns `192.168.1.1` as expected, `dig hostname @8.8.8.8` returns `1.2.3.4` as expected, but `ping hostname` inside LAN pings `1.2.3.4`. @MichaelHampton: There is a field in the router called DMZ so I can notice a manufacturer in case this is too critical for this problem to solve. – tomasbedrich Jan 11 '14 at 18:23
  • Is this some kind of home router, then? You should always provide enough information to fully understand the issue. – Michael Hampton Jan 11 '14 at 19:05
  • It is a small business class. An old one: Straight Core BMRT-16 – tomasbedrich Jan 11 '14 at 19:53

1 Answers1

1

When you provide the clients with two DNS servers (192.168.1.1 and 8.8.8.8), you can't assume they'll give one of the servers priority; the clients can query either or both servers as they see fit. If you want them to specifically use the internal DNS server, you should only provide that server via DHCP.

Gordon Davisson
  • 11,216
  • 4
  • 28
  • 33
  • In other words - whether the 'primary server' is queried as a primary can depend on an application? – tomasbedrich Jan 11 '14 at 19:50
  • 1
    Usually the app will use a resolver provided by the client OS, so that's what it depends on. Many (but not all) such resolvers do something along the lines of trying the servers in the listed order, but there are no particular rules about this. You certainly should never assume the clients will follow any particular priority rules. – Gordon Davisson Jan 11 '14 at 22:10