LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Serving a Domain (http://www.linuxquestions.org/questions/linux-networking-3/serving-a-domain-324434/)

mpgram 05-17-2005 01:13 PM

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?

Mara 05-17-2005 02:24 PM

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).

mpgram 05-17-2005 03:42 PM

Minimum eh?

Lovely.

So...is there anyway to speed that up? hehe

scowles 05-17-2005 06:50 PM

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!

mpgram 05-17-2005 08:27 PM

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.

scowles 05-17-2005 10:41 PM

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


mpgram 05-17-2005 11:06 PM

Not sure what happened. Guess it took longer to cache than I hoped. All is good now.

Thanks scowles for your help.


All times are GMT -5. The time now is 01:35 PM.