LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 03-17-2011, 02:25 PM   #1
dr-php
LQ Newbie
 
Registered: Feb 2011
Posts: 10

Rep: Reputation: 0
I have a problem to setup bind dns server


Hello

I have a problem to setup bind dns server

I have a system centos 5.5


[root@server etc]# cat named.conf

PHP Code:
//
// named.caching-nameserver.conf
//
// Provided by Red Hat caching-nameserver package to configure the
// ISC BIND named(8) DNS server as a caching only nameserver 
// (as a localhost DNS resolver only). 
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
// DO NOT EDIT THIS FILE - use system-config-bind or an editor
// to create named.conf - edits to this file will be lost on 
// caching-nameserver package upgrade.
//
options {
    
listen-on port 53 216.245.218.168; };
    
listen-on-v6 port 53 { ::1; };
    
directory     "/var/named";
    
dump-file     "/var/named/data/cache_dump.db";
        
statistics-file "/var/named/data/named_stats.txt";
        
memstatistics-file "/var/named/data/named_mem_stats.txt";
        
query-source    port 53;
        
query-source-v6 port 53;
    
allow-query     216.245.218.168; };
};
zone "r7l.org" IN {
        
type master;
        
file "r7l.org.forward";
        
allow-update none; };
};
zone "218.245.216.in-addr.arpa" IN {
        
type master;
        
file "r7l.org.reverse";
        
allow-update none; };
}; 
[root@server named]# cat r7l.org.forward

PHP Code:
$TTL    86400
@               IN SOA  @       root (
                                        
42              serial (dadams)
                                        
3H              refresh
                                        15M             
retry
                                        1W              
expiry
                                        1D 
)            ; minimum

                IN NS           
@
                
IN A            216.245.218.168
                IN AAAA         
::

[root@server named]# cat r7l.org.reverse



PHP Code:
$TTL    86400
@       IN      SOA     r7l.orgroot.r7l.org.  (
                                      
1997022700 Serial
                                      28800      
Refresh
                                      14400      
Retry
                                      3600000    
Expire
                                      86400 
)    ; Minimum
        IN      NS      r7l
.org.
168       IN      PTR     r7l.org
PHP Code:
[root@server named]# nslookup 216.245.218.168
Server:        216.245.218.168
Address
:    216.245.218.168#53

168.218.245.216.in-addr.arpa    name r7l.org.

[
root@server named]# nslookup r7l.org
Server:        216.245.218.168
Address
:    216.245.218.168#53

Name:    r7l.org
Address
216.245.218.168 


Do not do Domain

www.r7l.org

http://www.intodns.com/r7l.org


Please help
 
Old 03-17-2011, 02:44 PM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,937

Rep: Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330
Hi,
Quote:
Do not do Domain

www.r7l.org
If you want to resolve www.r7l.org you need an A or CNAME record for it. E.g.
Code:
www IN A 216.245.218.168
 
Old 03-17-2011, 02:45 PM   #3
lrtward
Member
 
Registered: Feb 2011
Distribution: CentOS, Ubuntu
Posts: 97

Rep: Reputation: 9
Looks like you need A and PTR records for www, ns1, and ns2.
 
Old 03-17-2011, 04:18 PM   #4
dr-php
LQ Newbie
 
Registered: Feb 2011
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Hi,
Quote:
Do not do Domain

www.r7l.org
If you want to resolve www.r7l.org you need an A or CNAME record for it. E.g.
Code:
how to setting CNAME record

Quote:
www IN A 216.245.218.168
where to put

Quote:
Looks like you need A and PTR records for www, ns1, and ns2.
how to setting PTR records
 
Old 03-17-2011, 05:41 PM   #5
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,937

Rep: Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330
Quote:
www IN A 216.245.218.168
where to put
You add the A record in r7l.org.forward, increase the serial in the same file and reload bind
 
Old 03-18-2011, 10:24 AM   #6
lrtward
Member
 
Registered: Feb 2011
Distribution: CentOS, Ubuntu
Posts: 97

Rep: Reputation: 9
Quote:
Originally Posted by dr-php View Post
how to setting PTR records
If www is 216.245.218.168 then all you need is a CNAME record.
You already have a PTR record for this IP address.

However, if www is on another server, like 216.245.218.169 for example, then you'd add a line to the file r7l.org.reverse:
Code:
168       IN      PTR     r7l.org. 
169       IN      PTR     www.r7l.org.
Remember to increment your serial number and restart named.
 
Old 03-18-2011, 01:57 PM   #7
dr-php
LQ Newbie
 
Registered: Feb 2011
Posts: 10

Original Poster
Rep: Reputation: 0
cat r7l.org.forward

$TTL 86400
@ IN SOA @ root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum

IN NS @
IN A 216.245.218.168
IN AAAA ::1
www IN A 216.245.218.168
 
Old 03-18-2011, 01:58 PM   #8
dr-php
LQ Newbie
 
Registered: Feb 2011
Posts: 10

Original Poster
Rep: Reputation: 0
cat r7l.org.forward

PHP Code:
$TTL    86400
@        IN SOA    @       root (
                    
42        serial (dadams)
                    
3H        refresh
                    15M        
retry
                    1W        
expiry
                    1D 
)        ; minimum

            IN NS        
@
         
IN A        216.245.218.168
        IN AAAA        
::1
www             IN A             216.245.218.168 

cat r7l.org.reverse

PHP Code:
$TTL    86400
@       IN      SOA     r7l.orgroot.r7l.org.  (
                                      
1997022700 Serial
                                      28800      
Refresh
                                      14400      
Retry
                                      3600000    
Expire
                                      86400 
)    ; Minimum
        IN      NS      r7l
.org.
168       IN      PTR     r7l.org
168       IN      PTR     www.r7l.org


Do not do Domain

www.r7l.org

Last edited by dr-php; 03-18-2011 at 02:01 PM.
 
Old 03-18-2011, 03:12 PM   #9
lrtward
Member
 
Registered: Feb 2011
Distribution: CentOS, Ubuntu
Posts: 97

Rep: Reputation: 9
You can't have two A records like that; if you're using the same IP for two entries, one has to be an "alias" CNAME record and one has to be the "real" A record. You don't show your ORIGIN record, so assuming it's fubar.org:

Code:
$ORIGIN  fubar.com.
$TTL     86400
@        IN SOA     @            root (
                    42           ; serial (d. adams)
                    3H           ; refresh
                    15M          ; retry
                    1W           ; expiry
                    1D )         ; minimum

@           IN NS             ns1
@           IN NS             ns2
fubar       IN A              216.245.218.168
            IN AAAA           ::1
www         IN CNAME          fubar.com.
ns1         IN CNAME          fubar.com.
ns2         IN CNAME          fubar.com.
I also added the entries for ns1 and ns2, because the intodns link you posted was complaining about them.
You already have a PTR record for 216.245.218.168 so you don't need two; you can delete the PTR record for www. You only need PTR records for A records. DNS is smart enough to trace a CNAME record to its A record and use that PTR record.
 
Old 03-18-2011, 04:15 PM   #10
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,937

Rep: Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330
@lrtward
Quote:
You can't have two A records like that; if you're using the same IP for two entries, one has to be an "alias" CNAME record and one has to be the "real" A record. Y
Says who? You can have as many A records you want pointing to the same IP. And it's better to use A instead of CNAME RRs, because you save one lookup.

@dr-php
Code:
	cat r7l.org.forward

PHP Code:
$TTL    86400
@        IN SOA    @       root (
                    42        ; serial (d. adams)
                    3H        ; refresh
                    15M        ; retry
                    1W        ; expiry
                    1D )        ; minimum

            IN NS        @
         IN A        216.245.218.168
        IN AAAA        ::1
www             IN A             216.245.218.168
You didn't increase the serial (the number 42 in red). Make it 43 and reload bind
 
  


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
Setup DNS server on Ubuntu 7.04 Server edition using Bind 9 breezey Linux - Server 2 09-16-2007 03:36 AM
How do I setup a Bind DNS Server Wynand1 Linux - Networking 1 05-29-2006 03:44 PM
BIND DNS Setup on new server brooky Linux - General 0 04-03-2004 09:54 AM
How to setup DNS cache server Bind 9.2.1 subzero80 Linux - Networking 2 11-11-2003 08:07 AM
need help to setup dns server with bind 9.1.0 joseph Linux - General 7 09-01-2003 01:11 AM


All times are GMT -5. The time now is 05:27 AM.

Main Menu
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