I've been reading tons about setting up my own nameserver both on the web, and books. I think I grasp most of it, but one thing - setting up the main ns1.tlthost.net records in the named.conf and zone files. I'm sure it's much easier than I'm making it. I'm using ISPConfig to set up my other web sites that will go on the server, and I manually set up the entry for my ns1 in the named.conf and zone file. I don't have a secondary NS server yet, but I will as soon as I get around to setting up another computer next to this one. For now I'm fudging the ns2 by using a Godaddy parked nameserver. This is my current NAMED.CONF: Code: options { pid-file "/var/run/bind/run/named.pid"; directory "/etc/bind"; auth-nxdomain no; /* * If there is a firewall between you and nameservers you want * to talk to, you might need to uncomment the query-source * directive below. Previous versions of BIND always asked * questions using port 53, but BIND 8.1 uses an unprivileged * port by default. */ // query-source address * port 53; }; // // a caching only nameserver config // zone "." { type hint; file "db.root"; }; zone "0.0.127.in-addr.arpa" { type master; file "db.local"; }; zone "188.223.64.in-addr.arpa" { type master; file "pri.188.223.64.in-addr.arpa"; }; zone "tlthost.net" { type master; file "pri.tlthost.net"; }; And this is the zone I made for my ns1.tlthost.net Code: ; BIND reverse data file for empty rfc1918 zone ; ; DO NOT EDIT THIS FILE - it is used for multiple zones. ; Instead, copy it, edit named.conf, and use that copy. ; $TTL 86400 @ IN SOA ns1.tlthost.net. webmaster.tlt.com. ( 102420071 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 86400 ) ; Negative Cache TTL ; IN NS ns1.tlthost.net. IN MX 10 mail.tlthost.net. @ IN NS localhost. ns1 IN A 64.223.188.57 ftp IN CNAME www.tlthost.net What I'm aiming for is to run a primary dns server here, along with the rest of the web server setup, then set up a second server for the secondary dns. I want to use the ns1.tlthost.net I've already set up, and ns2.tlthost.net I will set up, as the name servers for all of the web sites I'm going to host. I think I understand to set up the tlthost.net not as a web site, but just the nameserver. I also need email, and ftp for all the sites as well using their own domains. I just need to know if it looks like I'm on the right track now. Any advice would be welcome.
Looks ok, but as ns1.tlthost.net is hosting the zone for tlthost.net, you also need a glue record: http://en.wikipedia.org/wiki/Dns#Circular_dependencies_and_glue_records
Thanks for the reply Falko. I'm not going to be using tlthost.net as a working web site for now. I just set it up to use as a name server. I thought I set the glue record at Godaddy by registering NS1.tlthost.net there with it's IP address. Right now I'm trying to get my test email address, [email protected] , to work. It sends out ok using SquirrelMail, but when I send to it I get: Code: Your message cannot be delivered to the following recipients: Recipient address: [email protected] Reason: SMTP client-server loop detected Remote system: dns;www.tlthost.net (TCP|127.0.0.1|57911|0.0.0.0|25) (vms044pub.verizon.net -- Server ESMTP [Sun Java System Messaging Server 6.2-6.01 [built Apr 3 2006]]) NOTE: I just tried something else. When I send a message to the test site from my current email, I get it returned with the above error. If I send from Gmail, or from even a government email at work, it goes through without any errors. Could this have something to do with the fact that we use Verizon SMTP to send our mail now, and Verizon is where the IP address is that the server is getting it from? Also, the report on moultonboro-nh.com at http://www.dnsstuff.com/ says: Code: ERROR: I could not complete a connection to one or more of your mailservers: www.tlthost.net: Could not connect without glue or A record.
Could be a time problem - it can take up to 72 hours until DNS changes propagate. If it still doesn't work afterwards, I'd contact GoDaddy and ask where you went wrong in setting the glue record (I'm not using GoDaddy, so I can't help here...).
I don't think it could be that because I made the changes quite a while ago. Is there anyway for someone else to test the settings for moultonboro-nh.com, and see if they look wrong to them?
This doesn't look ok: Code: mh1:~# dig tlthost.net ; <<>> DiG 9.2.1 <<>> tlthost.net ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 35583 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;tlthost.net. IN A ;; ANSWER SECTION: tlthost.net. 43200 IN A [B][COLOR="Red"]0.0.0.0[/COLOR][/B] ;; Query time: 233 msec ;; SERVER: 213.191.92.84#53(213.191.92.84) ;; WHEN: Tue Oct 30 17:38:06 2007 ;; MSG SIZE rcvd: 45 mh1:~# dig ns tlthost.net ; <<>> DiG 9.2.1 <<>> ns tlthost.net ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 8131 ;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 3 ;; QUESTION SECTION: ;tlthost.net. IN NS ;; ANSWER SECTION: tlthost.net. 86400 IN NS ns1.tlthost.net. tlthost.net. 86400 IN NS NS3.ZONEEDIT.COM. tlthost.net. 86400 IN NS [B][COLOR="Red"]localhost.[/COLOR][/B] ;; ADDITIONAL SECTION: NS3.ZONEEDIT.COM. 172604 IN A 72.51.43.223 [B][COLOR="Red"]localhost. 0 IN A 127.0.0.1[/COLOR][/B] ns1.tlthost.net. 86400 IN A 64.223.188.57 ;; Query time: 197 msec ;; SERVER: 213.191.92.84#53(213.191.92.84) ;; WHEN: Tue Oct 30 17:38:14 2007 ;; MSG SIZE rcvd: 148 mh1:~#
I checked the zone file for tlthost.net and removed the line with localhost. I don't even remember why I tried that. I'v also ordered a book on DNS and BIND. I think I need it. It seems that I can send and receive to the admin@ address from and to everywhere now. I'm only getting one error when I check http://member.dnsstuff.com/pages/dnsreport.php. Code: Duplicate MX records WARNING: You have duplicate MX records. This means that mailservers may try delivering mail to the same IP more than once. Although technically valid, this is very confusing, and wastes resources. The duplicate MX records are: www.tlthost.net. and mail.moultonboro-nh.com. both resolve to 64.223.188.57. I can't seem to find where I went wrong to get that, but I guess that's better than nothing.
Code: mh1:~# dig mx moultonboro-nh.com ; <<>> DiG 9.2.1 <<>> mx moultonboro-nh.com ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 38636 ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1 ;; QUESTION SECTION: ;moultonboro-nh.com. IN MX ;; ANSWER SECTION: moultonboro-nh.com. 86400 IN MX 10 [B][COLOR="Red"]www.tlthost.net.[/COLOR][/B] moultonboro-nh.com. 86400 IN MX 10 [B][COLOR="Red"]mail.moultonboro-nh.com.[/COLOR][/B] ;; ADDITIONAL SECTION: mail.moultonboro-nh.com. 86400 IN A 64.223.188.57 ;; Query time: 283 msec ;; SERVER: 213.191.92.84#53(213.191.92.84) ;; WHEN: Wed Oct 31 17:25:00 2007 ;; MSG SIZE rcvd: 104 mh1:~# You have two MX records for moultonboro-nh.com that both resolve to the same IP address (64.223.188.57). That doesn't make much sense. Remove one of the MX records (doesnt matter which one).