Univention Corporate Server DNS not resolving the right IP address for PING requests

I have one router: { ROUTER } and two computers: { COMP_1, COMP_2 }.

IP addresses are as follow:

ROUTER: 10.16.100.1
COMP_1: 10.16.100.20
COMP_2: 10.16.100.108

On ROUTER I have the following configuration:

  DNS1: 10.16.100.20
  DNS2: 209.18.47.61    // DNS of my Internet provider
DOMAIN: MYCOMPANY.local

My goal is that from COMP_2 and any other else computer on my LAN, when I ping to: songplaylist.com it resolves to: 123.123.123.195 and get the same responses as if I ping to that IP directly. I don’t own that domain: songplaylist.com but I want to use it internally on my LAN to configure a web server that will be accessed by local computers.

To try to get that effect I installed UCS (Univention Corporate Server) on COMP_1. Then created a forward lookup zone as you can see on this image, where I specified external DNS servers {ns1.mycompany.com, ns2.mycompany.com} for the fields Name server:

enter image description here

Inside the control panel of the external nameservers: ns1.mycompany.com and ns2.mycompany.com I configured an A Record pointing to 123.123.123.195 with its corresponding CNAME record for the subdomain: www.

After doing that when I pinged to songplaylist.com I didn’t get any response, then I created an A Record and a CNAME Record inside the DNS Zone I created on UCS. I think the A Record and the CNAME Record should be created just in one place, though (the external DNS server or on UCS).

enter image description here

When I run > ipconfig /all on COMP_2 I get what you can see on the image below, where you can see that I have as the primary DNS server: COMP_1.

enter image description here

When I run > nslookup -q=ns songplaylist.com I get the right DNS servers as you can see below.

But in the other hand, when I run > ping songplaylist.com I get the error:

Ping request could not find host songplaylist.com. Please check the name and try again.

enter image description here

I cannot understand why if the DNS server look to be correct (when using nslookup), why when I ping to the domain it doesn’t resolve to the IP address configured on that DNS server?

Any idea on how can I get my goal?

Thanks!

Just to summarize:

You want to have one local computer to be reached by the hostname www.songplaylist.com? While mail.songplaylist.com should be resolved to the original IP?

Sorry to say, but this is a really DUMB idea!

Do NEVER, ever DNS stuff with foreign domains as long as you are 99% sure what you are doing!

First, you can (usually) not editsingle hosts from zones/ domains. Your DNS server will be authorative for a domain. Or not. But not partially for only a single hostname.

Second, do use non-officially assigned domain names. Do NOT use official domain names! Seriously.

Third, your client (COMP_2) has two name servers registered. So it asks usually both. Nothing “primary” or “secondary”. When it gets reply from the external on it will take this into account. So having a different domain info on the local DNS server and the external one causes confusion! Assign only the internal (UCS) DNS server to your clients. Same for the router. Either ONLY external or ONLY internal. Not mixed. Then tell your UCS server to use the external DNS as forwarder an you have at least a consistent setup.

Fourth, you configure a forward lookup zone with nameservers NS which are officially not authoritative for this domain (ns1.mycompany.com) and even more simply do not exist…CRAP!

If you want all requests to www.songplaylist.com to go to your local webserver and you are not using https it is the best to configure your router to use port forwarding instead of DNS stuff you are trying to use (and making things worse).

/KNEBB

Mastodon