I have a few domains I want pointed to a VPS, and I'd like them to use the VPS as their nameserver so that each is ns1.example.com and ns2.example.com. The nameserver is thus at the same IP as the web server. My domain is hosted at 1and1 which may or may not have any relation. I tried following http://www.newmediapower.com/blog/setting-up-your-own-dns-server-with-bind9/ and http://mysql-apache-php.com/dns-server-tutorial.htm but was ultimately unsuccessful.
Here is my /etc/bind/db.odie5533.com
file:
$TTL 604800
odie5533.com. IN SOA ns1.odie5533.com. admin.odie5533.com. (
16 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
odie5533.com. IN NS ns1.odie5533.com.
@ IN A 184.82.142.241
ns1 IN A 184.82.142.241
www IN CNAME odie5533.com.
Here is my /etc/bind/named.conf.options
file:
options {
directory "/var/cache/bind";
forwarders {
184.82.142.241;
};
query-source address * port 53;
notify-source * port 53;
transfer-source * port 53;
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
};
And here is my /etc/bind/named.conf.local
file:
zone "odie5533.com" {
type master;
file "/etc/bind/db.odie5533.com";
};
If anyone can tell what I'm doing wrong I'd greatly appreciate it. Thanks.