[SOLVED] Add an Alias (CNAME) - Correct Way?

Moltuae

Rest In Peace
Reaction score
3,669
Location
Lancs, UK
What's the correct way to configure this? ....

So I have a registered domain, let's call it thecompany.com, and I've set some A Records to point to the public IPs of various servers.

One of these A Records is for a ScreenConnect server, which uses sc.thecompany.com

The company internal domain is ad.thecompany.com (internal only -- no A Record)

The ScreenConnect server uses a different public IP to the rest of the computers on the domain, but it is part of the domain and is accessible on the local network (via 10.10.10.231).



All of this works perfectly, but now I want the domain computers to connect to the ScreenConnect server via its LAN IP rather than its public WAN IP. In other words, I want to redirect calls to sc.thecompany.com to 10.10.10.231

Now I can do this easily by modifying the Hosts file, which (for test purposes) I have tried and it works fine, but I would prefer to do it the proper way, using the local DNS server.




tl;dr:

So, to summarise, how exactly do I add a CNAME Alias (assuming that's what I need to add) to the DNS server (2012 R2) that will simply forward sc.thecompany.com requests to 10.10.10.231?

I have tried adding it to the domain's Forward Lookup Zone, but of course it wants to suffix the host name with ad.thecompany.com, creating an FQDN of 'sc.thecompany.com.ad.thecompany.com'. And I've tried creating a new Forward Lookup Zone for sc.thecompany.com, pointing it to the internal IP, but can't seem to get that to work.

What am I doing wrong?
 
Don't you just create a new A record on the internal DNS for 'sc' and point to the internal IP?
 
Don't you just create a new A record on the internal DNS for 'sc' and point to the internal IP?
On the internal domain's Forward Lookup Zone do you mean?

That's what I thought but that only allows me to create a FQDN of sc.ad.thecompany.com not sc.thecompany.com
 
On the internal domain's Forward Lookup Zone do you mean?

That's what I thought but that only allows me to create a FQDN of sc.ad.thecompany.com not sc.thecompany.com

Sorry i was confused, i didn't realise you have a sub domain internally. Why not just get staff to use a different URL internally to external? Internally use sc.ad.thecompany.com and external sc.thecompany.com? I dont use Screenconnect so apologies if this is a stupid idea
 
Sorry i was confused, i didn't realise you have a sub domain internally. Why not just get staff to use a different URL internally to external? Internally use sc.ad.thecompany.com and external sc.thecompany.com? I dont use Screenconnect so apologies if this is a stupid idea

Thanks. It's a good suggestion but unfortunately it's more about the SC client connecting to the SC server than user access, although I would prefer to use the same url throughout for consistency anyway.

I can make it work using a Hosts file entry if necessary but that just seems like a bodge.
 
The other option is to add a forward lookup zone for thecompany.com and then an A record for sc. You will need to replicate all the other records on your hosted DNS for that domain otherwise things like your external website wont work.
 
The other option is to add a forward lookup zone for thecompany.com and then an A record for sc. You will need to replicate all the other records on your hosted DNS for that domain otherwise things like your external website wont work.
Hmmm, hadn't thought of that way. Might try that. Won't that create a conflict with the ad.thecompany.com forward lookup zone though?

I did try creating a forward lookup zone for sc.thecompany.com though, giving it an A Record with an empty host entry (which, after a little research, seemed to be the correct way to do it) but that didn't work. Might try again. Maybe I did something wrong. Do you know if such changes normally take effect immediately or whether it's required that the domain clients reboot/re-login/flushdns/etc?
 
Sussed it :)


I'm not sure what I did wrong before but it's working this time ....

  • Created a Forward Lookup Zone for sc.thecompany.com
  • Created a Host (A) entry in the new FLZ containing the LAN IP (and host left blank)

Thought I'd tried that the first time, then I figured maybe it should be a CNAME .... anyway, it's working now.

Thanks for your suggestions @freedomit :) I was beginning to think I was going about this completely the wrong way, but your suggestions led me to persevere.
 
create a new forward lookup zone for sc.thecompany.com and new a record with "same as parent folder" pointing to your IP.
 
Back
Top