LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 05-17-2005, 02:13 PM   #1
mpgram
Member
 
Registered: Sep 2003
Location: Dallas TX
Distribution: Red Hat
Posts: 59

Rep: Reputation: 15
Serving a Domain


Well...

Here's the scenario:

I have a computer that serves as my firewall. It is running Redhat FC1 and using IPTables. It is set to accept all connections. It is also set to route port 80 to another server behind the firewall. I have BIND configured on the firewall (192.168.2.1). Here is setup:

Code:
$ttl 30
authorsoftheworld.com.	IN	SOA	localhost.localdomain. mark.sceassociates.com. (
			1116272191
			30
			30
			30
			30 )
authorsoftheworld.com.	IN	NS	localhost.localdomain.
authorsoftheworld.com.	30	IN	A	68.95.130.198
authorsoftheworld.com.	30	IN	A	68.95.130.198
authorsoftheworld.com.	30	IN	A	68.95.130.198
ns1.authorsoftheworld.com.	30	IN	NS	localhost.localdomain.
The domain name authorsoftheworld.com, is setup for my IP addy as the dns server.

When I run 'dig authorsoftheworld.com' it doesn't find the server. When I run 'dig @127.0.0.1 authorsoftheworld.com' I get a good response.

Am I missing a setting somewhere? Have I forgotten something?
 
Old 05-17-2005, 03:24 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,539

Rep: Reputation: 149Reputation: 149
When you run dig @127.0.0.1 you ask your server. When you use dig without @, you ask your default DNS server (usually first from /etc/resolv.conf). If you have just made the change, your default DNS server (and many others) don't yet know it was made. You need to wait (24h minimum).
 
Old 05-17-2005, 04:42 PM   #3
mpgram
Member
 
Registered: Sep 2003
Location: Dallas TX
Distribution: Red Hat
Posts: 59

Original Poster
Rep: Reputation: 15
Minimum eh?

Lovely.

So...is there anyway to speed that up? hehe
 
Old 05-17-2005, 07:50 PM   #4
scowles
Member
 
Registered: Sep 2004
Location: Texas, USA
Distribution: Fedora
Posts: 620

Rep: Reputation: 31
Fortuantely, the zones TTL is set to 30 seconds, so any changes the OP makes to his zone file would take effect within 30 seconds MAX. Had the TTL been set to 24 hours, then it would take up to 24 hours for these change to take effect at DNS servers like mine (ttl expired).

The only problem I see with the zone file is:
1) The NS record is pointing to localhost. Bzzt! This needs to be changed to match the NS record registered with the domain. i.e. ns1.authorsoftheworld.com
2) There is no glue record (address record) for the NS record within the zone file.
3) The domain name address record is listed 3 times.

Also, changing the name server entry in resolv.conf takes effect immediately. So change the nameserver entry to localhost. Based on the content of your post (dig @localhost... ), you should be able to query your name server immediately.

BTW: I can query your name server from this end, but its returning localhost for the name server BZZZT!
 
Old 05-17-2005, 09:27 PM   #5
mpgram
Member
 
Registered: Sep 2003
Location: Dallas TX
Distribution: Red Hat
Posts: 59

Original Poster
Rep: Reputation: 15
Quote:

The only problem I see with the zone file is:
1) The NS record is pointing to localhost. Bzzt! This needs to be changed to match the NS record registered with the domain. i.e. ns1.authorsoftheworld.com
Ok, I changed the last line to:
ns1.authorsoftheworld.com. 30 IN NS 68.95.130.198.
Quote:
2) There is no glue record (address record) for the NS record within the zone file.
Wouldn't that be a little redundant?
Added:
ns1.authorsoftheworld.com. 30 IN A 68.95.130.198
Quote:
3) The domain name address record is listed 3 times.
I did a a dig google.com and it looked like they had many listed in theirs, si I listed many times too. I got rid of the duplicates.
Quote:
BTW: I can query your name server from this end, but its returning localhost for the name server BZZZT! [/B]
I never even considered digging my outside IP. 'dig @127.0.0.1 authorsoftheworld.com' displayed everything correctly and it all looked good.

Code:
$ttl 30
authorsoftheworld.com.	IN	SOA	localhost.localdomain. mark.sceassociates.com. (
			1116272208
			30
			30
			30
			30 )

authorsoftheworld.com.  	30	IN	NS	ns1.authorsoftheworld.com.
ns1.authorsoftheworld.com.  	30	IN	NS	ns1.authorsoftheworld.com.
authorsoftheworld.com.	        30	IN	A	68.95.130.198
www.authorsoftheworld.com.	30	IN	A	68.95.130.198
ns1.authorsoftheworld.com.  	30	IN	A	68.95.130.198
I still can't figure it out. Now I keep getting a 68.95.130.198.authorsoftheworld.com as the NS record from 'dig'. Thats definatly not good.

http://authorsoftheworld.com serves nothing still.

Last edited by mpgram; 05-17-2005 at 09:54 PM.
 
Old 05-17-2005, 11:41 PM   #6
scowles
Member
 
Registered: Sep 2004
Location: Texas, USA
Distribution: Fedora
Posts: 620

Rep: Reputation: 31
Your website works fine at this end.

FWIW: I edited a zone template I use for new domains. Give it a try. Should work without any editing on your part.

BTW: Yes, google might have multiple A records, but notice that they also have multiple IP addresses referenced. i.e. round-robin This is normal for high volume websites.

Code:
[root@excelsior single-view]# cat db.authors                                    
;##############################################################
; Zone definition for authorsoftheworld.com
; Filename: /var/named/int/db.authorsoftheworld
;##############################################################
$TTL    1d
@       7d      IN      SOA     ns1.authorsoftheworld.com. (
        netadmin.authorsoftheworld.com. ; Zone Contact
        2005012701                      ; Serial
        1h                              ; Refresh
        30m                             ; Retry
        7d                              ; Expire
        1h )                            ; Negative Cache
 
;############################################################
; authorsoftheworld.com Nameserver Records (NS)
;############################################################
@               7d      IN      NS      ns1.authorsoftheworld.com.
 
;############################################################
; authorsoftheworld.com A (ADDRESS) and MX Records (MAIL EXCHANGER)
;############################################################
@               1d      IN      A       68.95.130.198
@               1d      IN      MX 0    smtp.authorsoftheworld.com.
 
;############################################################
; authorsoftheworld.com Address Records (A)
;############################################################
localhost       1d      IN      A       127.0.0.1 
 
; Name Server records
ns1             1d      IN      A       68.95.130.198
 
; Web/Internet based records
www             1d      IN      A       68.95.130.198
chat            1d      IN      A       68.95.130.198
ftp             1d      IN      A       68.95.130.198
mail            1d      IN      A       68.95.130.198
smtp            1d      IN      A       68.95.130.198
news            1d      IN      A       68.95.130.198

[root@excelsior single-view]# cat /etc/resolv.conf 
search authorsoftheworld.com
nameserver 127.0.0.1
 
Old 05-18-2005, 12:06 AM   #7
mpgram
Member
 
Registered: Sep 2003
Location: Dallas TX
Distribution: Red Hat
Posts: 59

Original Poster
Rep: Reputation: 15
Not sure what happened. Guess it took longer to cache than I hoped. All is good now.

Thanks scowles for your help.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
serving multiple domain websites on one server? gsgleason Linux - Software 1 06-03-2005 11:50 AM
IRC serving limiter Linux - General 1 10-18-2003 09:46 PM
Web Serving Loki_VA Linux - General 4 08-24-2003 06:00 AM
Last step(?) in serving my own. Misteree Linux - Networking 3 05-09-2003 07:59 PM
serving files krajaba Linux - Networking 0 04-30-2001 12:53 PM


All times are GMT -5. The time now is 08:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration