Tuesday, March 19, 2019

windows server 2008 r2 - DNS resolve .com domain on local domain



I'm building a local 2008 R2 domain as a test case to be able to write a roadmap for the real new domain that needs to be created soon.



What I would like to know if I'm able to make a record in DNS that will point the domain name:
www.example.com and example.com to one of the servers in my network.




I tried creating an a-record for it but that doesn't work. To be honest I'm not even sure if this is possible?



So can I do this? That way I would be able to fully test all our services (and webb app) offline before I build the real domain and switch the DNS records at the provider.



Some advice if possible and where to start is appreciated.



The solution (Thanks Brent):




  • Create new Forward lookup zone pointing to example.com


  • Create empty A record pointing to IP of the webserver you are targeting

  • If www is needed create A record with Name: www and IP of your webserver

  • sub domains repeat the process but then with names for example: sub or
    www.sub (and ip your webserver)

  • Be aware of the DNS Cache while you are in this process. Things can take time or do the following:


    • Right click the server and choose clear cache

    • in CMD: ipconfig /flushdns (to flush the client cache)




Answer



Just create a new forward lookup zone in your DNS box that matches the domain name you are trying to redirect.



We did this for ADFS to resolve fs.mydomain.com to a local IP.



So create a new forward lookup zone and then setup whatever A records you want it to resolve.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...