Jump to content

Hi Everyone!

 

I have a Windows Server AD Domain with DNS running at my main site (main.example.com). I have another site with a public IP address that dynamically changes (secondary.example.com). I want a DNS entry in place on the main site for secondary.example.com, but I often have to manually update the record to include the correct IP whenever the second site gets a new IP.

 

Is there a solution to this? I thought of somehow allowing the router on the second site to connect the the main site's DNS server and update it's record automatically whenever it's IP changes (basically Dynamic DNS) but I don't know whether you can do this with Windows Server's DNS server.

 

Any help will be appreciated.

PC:

AMD Ryzen 9 5900X | AMD Radeon RX 7900 GRE | 32 GB RAM | Arch Linux

Laptop:

MacBook Pro 13" (2019) | Intel Core i5 8279U | 8 GB RAM | macOS

Server:

Intel Core i7 6700K | 16 GB RAM | 2 TB HDD | Debian Linux

Link to comment
https://linustechtips.com/topic/1091037-windows-server-dns-updates/
Share on other sites

Link to post
Share on other sites

21 hours ago, Husky said:

Hi Everyone!

 

I have a Windows Server AD Domain with DNS running at my main site (main.example.com). I have another site with a public IP address that dynamically changes (secondary.example.com). I want a DNS entry in place on the main site for secondary.example.com, but I often have to manually update the record to include the correct IP whenever the second site gets a new IP. 

 

Is there a solution to this? I thought of somehow allowing the router on the second site to connect the the main site's DNS server and update it's record automatically whenever it's IP changes (basically Dynamic DNS) but I don't know whether you can do this with Windows Server's DNS server.

 

Any help will be appreciated.

You can use DNSShell for powershell to update/modify/remove entries from the Windows DNS Service.
https://archive.codeplex.com/?p=dnsshell

 

You would need to use Powershell to determine the DyDNS record, then input using DNSShell


The following would give you the dynamic IP address $ip as a string you could then use DNSShell to input;
$ip = [System.Net.Dns]::GetHostAddresses("DYNAMICDNS.VALUE").IpAddressToString

Then you can use the Set-DnsRecord function in DNSShell to modify the A record you have specified.  Some examples are here;

https://devblogs.microsoft.com/scripting/weekend-scripter-use-a-free-powershell-module-to-ease-dns-administration/

 

 

Please quote or tag me if you need a reply

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×