I'm hoping some guru can point me in the right direction. Here's my scenario :
Static IP VPS running Virtualmin and a bunch of domains. Everything working great. Master DNS hosted locally
Dynamic IP Home Router with some hosts behind it
I'm hoping to replace dyn.com (DynDNS) since they are no longer free.
What I'ld like to do is :
setup a subdomain or host entry in one of my existing domains that points to #2
2 will change IPs every so often
a linux host behind the router in #2 will figure out the external IP and send an update to #1
I've seen some other howtos on similar things (http://www.randombugs.com/linux/linux-isc-dhcp-server-dynamic-dns-update...) (http://sourceforge.net/projects/b9ddns/support?source=navbar) but they don't quite match my use case.
Any pointers? thanks!
I'm not certain if this answer is too simple :), but you could just define the zone for your #2 site as "dynamic" (by assigning it an update key in the BIND config), and use a DDNS tool that modifies e.g. the "www.secondsite.com" A record appropriately when the IP changes.
If DDNS doesn't work, you could use the Virtualmin command line API to modify the DNS records (type
virtualmin modify-dnsfor help). Those commands need to be run as "root", so either use "sudo", or add the SSH key of a user on your #2 Linux system to the authorized_keys of "root" on your Virtualmin box so you can run those commands via remote SSH.
Thanks Locutus, it is more or less that simple.
I've put up instructions here on how to replace dyndns with a VirtualMin server !
With this your router can be configured to use an existing DNS domain.
I would love it if this got integrated in as a Virtualmin feature (along with dynamic entries / key management for bind)