Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 27th October 2007, 04:59
wxman wxman is offline
Senior Member
 
Join Date: May 2007
Posts: 189
Thanks: 11
Thanked 2 Times in 2 Posts
Default Setting up a multi site web server and DNS

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.
Reply With Quote
Sponsored Links
  #2  
Old 28th October 2007, 15:57
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,752 Times in 2,582 Posts
Default

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#Cir...d_glue_records
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 28th October 2007, 20:26
wxman wxman is offline
Senior Member
 
Join Date: May 2007
Posts: 189
Thanks: 11
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by falko
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#Cir...d_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, admin@moultonboro-nh.com , 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: admin@moultonboro-nh.com
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.

Last edited by wxman; 28th October 2007 at 23:08.
Reply With Quote
  #4  
Old 29th October 2007, 17:00
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,752 Times in 2,582 Posts
Default

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...).
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 29th October 2007, 17:21
wxman wxman is offline
Senior Member
 
Join Date: May 2007
Posts: 189
Thanks: 11
Thanked 2 Times in 2 Posts
Default

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?
Reply With Quote
  #6  
Old 30th October 2007, 18:46
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,752 Times in 2,582 Posts
Default

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       0.0.0.0

;; 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      localhost.

;; ADDITIONAL SECTION:
NS3.ZONEEDIT.COM.       172604  IN      A       72.51.43.223
localhost.              0       IN      A       127.0.0.1
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:~#
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 30th October 2007, 20:16
wxman wxman is offline
Senior Member
 
Join Date: May 2007
Posts: 189
Thanks: 11
Thanked 2 Times in 2 Posts
Default

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.
Reply With Quote
  #8  
Old 31st October 2007, 18:33
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,752 Times in 2,582 Posts
 
Default

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 www.tlthost.net.
moultonboro-nh.com.     86400   IN      MX      10 mail.moultonboro-nh.com.

;; 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).
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
I just need one website...... showe1966 Installation/Configuration 21 20th September 2007 00:20
subdomain and mail relay configuration aranthorn Installation/Configuration 24 3rd September 2007 23:53
Unable send receive emails vassilis3 Installation/Configuration 15 19th May 2007 15:34
Dns question Mahir Installation/Configuration 48 14th November 2006 11:19
How set DNS entry for different server? SupuS Installation/Configuration 1 12th June 2006 10:48


All times are GMT +2. The time now is 13:37.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.