Link to home
Start Free TrialLog in
Avatar of Apexadmin
Apexadmin

asked on

Script or program to update dynamic public IP on zone A record

Does anyone know of a script or a program (preferably free/open source) that will check your WAN IP and update an A record in a zone on a Windows DNS server?

An example of this is a small office or home office that has a dynamic IP but hosts a service on a server. The server has a zone for it's records and is primary. The name server is hosted elsewhere but the zone is secondary retrieving the records from the SO/HO server. On the SO/HO server, has anyone heard of a way to check your WAN IP and update an A record in a zone?

The obviously way to solve this problem is static IP addresses, but some ISPs make you upgrade your service to ridiculous numbers before giving you a static IP.

Just wanted to see if this was possible.
Avatar of George Khairallah
George Khairallah
Flag of United States of America image

Can you use something like DynDNS for your outside WAN address, and on the inside, just create a static entry that would have the same name as your external name, but pointed to your LAN Address. I have that setup in my home office, and it seems to work ok.

as an example, say your external WAN is 73.10.128.2  pointed to example.com  (this would be handled by DynDNS on a supported client... on your main gateway router for example)
you can create a internal A record pointed to your SO/HO  internal server IP (i.e: say 192.168.1.50)   and point it to example.com  

I apologize if I answered a different question than you intended to ask. I was just a bit confused with your second paragraph. So if that's not what you want to do, please let me know, and we can think of something else.
Avatar of Apexadmin
Apexadmin

ASKER

It is more like having a separate zone for public. So you would have example.com and example.local. What would happen is you would have a script or program get your WAN IP and update an A record in example.com. That zone would be then replicated to a secondary zone offsite. So you can manage the zone internally.

I have also considered making A records with a DynDNS hostname. I just didn't know if my convoluted way was possible.
ASKER CERTIFIED SOLUTION
Avatar of George Khairallah
George Khairallah
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial