How to set correctly virtual server, apache and DNS address with External Dynamic IP

2 posts / 0 new
Last post
#1 Thu, 02/24/2011 - 03:29
kamzata

How to set correctly virtual server, apache and DNS address with External Dynamic IP

I've a server with Proxmox and a Virtual Machine with ubuntu 10.04 with installed Virtualmin that host my Virtual Server. The server is behind a NAT of a router. The net have an external dynamic ip address.

Now, to reach a virtual server I do this:

  • Dyndns service enable to update changing external ip address
  • Virtual Server IP External Address set to update automatically with dyndns service
  • Apache Config Virtual Server address set manually to internal ip (192.168.10.51)
  • DNS Bind record address (/var/lib/bind/mydomain.com.hosts) set manully to external IP address

THE PROBLEM is that every time my External IP address change I must update MANUALLY the new external ip address to DNS Bind record address in /var/lib/bind/mydomain.com.hosts

How can I automate correctly the process of IP Update? How can set correctly the address? Where am I wrong?

Thu, 02/24/2011 - 04:07
Locutus

If you're using Dyndns, which already provides a way to point domain names to your changing external IP, you shouldn't require to set up a local BIND actually.

Otherwise you'd need a tool that can update nameservers after dynamic IP changes. I'm quite sure such tools exists for Linux, but I myself have only used them under Windows so far (all my Linux-based hosting environments have static IPs). I suppose you could even just write a little script that determines your external IP, modifies the zone file accordingly and uses rndc to have BIND reload the zone.

Topic locked