What I want to do is to make my domain name resolve using my own nameservers.
I got 3 VPSes, all running debian and a domain name, mydomain.com
2 VPS are nameservers and 1 is a webserver.
At my registrar i've put my domain name to DNS only and changed the nameservers to my two own nameservers.
On my first nameserver I've installed Bind9 and configured as follows.
named.conf.local
zone"mydomain.com" {
type master;
file "/etc/bind/zones/mydomain.com.zone";
};
zone "x.x.x.x.in-addr.arpa" {
type master;
file "/etc/bind/zones/rev.x.x.x.x.in-addr.arpa";
};
/etc/bind/zones/mydomain.com.zone
mydomain.com. IN SOA ns3.mydomain.com. admin.mydomain.com. (
2006071801
28800
3600
604800
38400)
mydomain.com. IN NS ns3.mydomain.com.
mydomain.com. IN NS ns4.mydomain.com.
www IN A 1.2.3.4 //my third VPS which is a webserver
ns3 IN A x.x.x.x //this nameserver ip, should it be localhost?
ns4 IN A x.x.x.x //my 2nd VPS nameserver ip
@ IN A 1.2.3.4
/etc/bind/zones/rev.x.x.x.x.in-addr.arpa
@ IN SOA ns3.mydomain.com. admin.mydomain.com. (
2006071801;
28800;
604800;
604800;
86400);
IN NS ns3.mydomain.com.
2 IN PTR mydomain.com
When i run nslookup www.mydomain.com the response is
Server: x.x.x.x //which points to the neighbourhood of my VPS provider
Address: x.x.x.x#53
Non-authoritative answer:
Name: www.mydomain.com
Address: x.x.x.x //this is the actual ip of my VPS webserver
So it seems to be working? I can't resolve via my webbrowser, am I just waiting for propagation or is there somethings missing?
Thanks in advance for any help or insightful advice.