0

I have a machine with 2 interfaces. One interface (eth1) connects to inside a lab, with a IP address of 172.30.174.70/16. The DNS server is on 172.30.42.1, the domain is 'netlab'. This lab does not have internet connectivity.

Then, there's the other network connected on a 10.230.0.0/16 network, with DNS server at 10.230.24.1 with working internet.

How do I set up the PC so that DNS queries for .netlab goes to the 172.30.42.1 PC, while everything else goes to 10.230.24.1?

If I make the 172 DNS server my primary DNS server, queries to the outside world will time out (since it only knows about 'netlab'). If I make the 10.230 DNS server my primary, queries to the "foo.netlab" domain times out.

Is what I am requesting possible?

1

It sounds to me like what you need is a DNS forwarder. Basically, you will want to have a dingle DNS server on a host that sits on the border between your networks. Your 172.30.42.1 host sounds about right since I assume it is visible from both your networks.

To configure a forwarder, you can follow the guide by MS available here if you are on a Windows platform. On other systems, you can configure BIND to do what you want by adding a configuration block like this:

forwarders {
            8.8.8.8;
            8.8.4.4;
    };

to your BIND configuration.

Once you have this in place, clients using your DNS at 172.30.42.1 will be directed to the right host on the 172.30.42.0/ by the local DNS. Hosts not handled by that DNS will be looked up by asking the configured forwarders instead.

| improve this answer | |
  • Yes, if the 172.30.42.1 machine is indeed configured as a forwarder, that would work. Unfortunately, 172.30.42.1 only knows about "netlab" machines, it has no idea about any other domains, which is why I need the other DNS server (which has no idea about "netlab") – Hari Sundararajan Dec 2 '15 at 7:53
  • But the two networks are connected, right? I mean - using IPs you can ping hosts on one network from hosts on the other? If so, netlab machines just need a default route (i.e. route for things not in netlab) going to your actual gateway. With that in place, forwarders should work just fine I would think. – MrMajestyk Dec 2 '15 at 8:12
  • Rereading your question, I guess only the DNS server at 172.30.42.1 would need a default route. That way, netlab machines still won't have internet access, but DNS will work for both nets. – MrMajestyk Dec 2 '15 at 8:21
  • This is definitely the only solution that will work. You need a DNS server with both access to public networks and the authoritative nameservers for your netlab domain. – Andrew B Dec 4 '15 at 16:47
  • Yes I would say so too. Thinking some more about it, the netlab DNS at 172.30.42.1 would not need a default route going to an Internet GW, actually. It would just need proper routes to whatever external DNS servers are to be used. This might be useful if the DNS is to be locked down. Alternately, there could be the netlab DNS and another less restricted DNS on the other net that forwards to the netlab DNS. That way, the netlab DNS needs to know even less about the outside world. – MrMajestyk Dec 7 '15 at 11:19
0

This requires a dns server and a proper zone configuration. Try researching dns server for yor operating system, iw you have permissions to install one.

Another solution is to use internet dns server and type all lab computer names manually into a hosts file.

| improve this answer | |

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.