How do I set Virtualmin to use Amazon Route53 DNS instead of BIND?

4 posts / 0 new
Last post
#1 Mon, 04/16/2012 - 09:49
evanman

How do I set Virtualmin to use Amazon Route53 DNS instead of BIND?

I installed Virtualmin straight out the box with the installer on Amazon EC2. Virtualmin cannot provide the minimum two nameservers required for me to connect a domain name (in this example case, testdomain.co.za) to a virtual domain, so I have setup a hosted zone in Route53 with the below record sets:

testdomain.co.za NS ns-27.awsdns-03.com. 172800
ns-1694.awsdns-19.co.uk.
ns-1352.awsdns-41.org.
ns-953.awsdns-55.net.
testdomain.co.za SOA ec2-54-x-y-z.eu-west-1.compute.amazonaws.com. root.ec2-54-x-y-z.eu-west-1.compute.amazonaws.com. 1334153486 600 3600 604800 38400 900
testdomain.co.za A pub.lic.ip.addr 300
www.testdomain.co.za A pub.lic.ip.addr 300
ftp.testdomain.co.za A pub.lic.ip.addr 300
m.testdomain.co.za A pub.lic.ip.addr 300
mail.testdomain.co.za A pub.lic.ip.addr 300
testdomain.co.za MX 5 mail.testdomain.co.za 300
testdomain.co.za TXT "v=spf1 a mx a:testdomain.co.za ip4:pub.lic.ip.addr ?all" 300

(x-y-z and pub.lic.ip.addr are placeholders)

Is this correct and complete?

Also, must I deactivate the BIND server in Webmin/Virtualmin and for the specific virtual host (under Edit Virtual Server -> Enabled features), or leave it active? Am I correct in thinking Route53 replaces the need for DNS zone hosting locally?

The current IP address in Virtualmin set for the virtually hosted domain (looking under Server Configuration -> Change IP Address) is an internal one (strange Amazon EC2 behavior), NOT the one quoted above in the DNS (pub.lic.ip.addr) - must this be changed to reflect the public one? If so, how?

Under Edit Virtual Server -> Configurable Settings, must I set an External IP address the same as pub.lic.ip.addr? Currently this shows the internal one / Same as real address.

Thanks so much for any help, it's been 6 days of head-scratching so far :)

Tue, 04/17/2012 - 17:50
TDave00

Been scratching my head on this one too. Look forward to an answer.

Tue, 04/17/2012 - 17:53
TDave00

BTW, I too just installed virtualmin on EC2 the same way. I used a Centos 64bit image, but I think I am going to use a 32bit image instead. Did you use 32 or 64? If 32, what is the ami id/image number you used? Thanks.

Mon, 04/08/2013 - 15:41
Jesse OBrien

I'm a little late to this party I know, but hopefully this will help someone at some point.

You can certainly set up two nameservers (ns1.testdomain.co.za and ns2.testdomain.co.za in this case) to run on the same server and resolve, although that isn't necessarily recommended. As far as I can tell, there isn't a direct route53 plugin, but you can automate route53 management using the command-line utility cli53 (https://github.com/barnybug/cli53). I've had decent results with it, but it'll require a modicum of scripting ability, and you'd have to tie it in with the Virtualmin cli toolset (http://www.virtualmin.com/documentation/developer/cli).

Topic locked