LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   DNS Problem (http://www.linuxquestions.org/questions/linux-networking-3/dns-problem-4175444062/)

trickynapzter 01-03-2013 10:13 PM

DNS Problem
 
Hello guys, good day.. I have configured a DNS machine but i think im lost already.
Here is what i have done so far:

1. I have register a domain blucard.com, and I setup a DNS(ns1.pl.blucard.com) at home
2 I already added a record ns1.pl.blucard.com pointing to the ip address(123.111.1.1) of my dns server at home
3. I setup bind(not chrooted) in ns1.pl.blucard.com and here are my configs.

/etc/named.conf

PHP Code:

options {
        
listen-on port 53 any; };
        
listen-on-v6 port 53 any; };
        
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";
        
allow-query     any; };
        
recursion yes;
};
logging {
        
channel default_debug {
                
file "data/named.run";
                
severity dynamic;
        };
};
zone "." IN {
        
type hint;
        
file "named.ca";
};

zone "pl.blucard.com"  IN {
    
type master;
    
file "pl.blucard.com.zone";
    
notify yes;
    
#allow-transfer {192.168.245.0;};
}; 

/var/named/pl.blucard.com.zone

PHP Code:

$ORIGIN .
$TTL    3600 1 hour
pl
.blucard.com    IN      SOA     ns1.pl.blucard.com.    admin.blucard.com. (
                 
2012121102 serial
                 10800      
refresh (3 hours)
                 
3600       retry (1 hour)
                 
604800     expire (1 week)
                 
86400      minimum (1 day)
                 )

        
        
NS    pl.blucard.com.

pl.blucard.com    IN    A    123.111.1.1
test
.pl         IN      A       123.111.1.1 

NOTE: i havent configured yet a reverse-lookup zone.


However after doing all these stuffs, i cant ping ns1.pl.blucard.com and test.pl.blucard.com. Adding ns1.pl.blucard.com record
to the domain registry is about 2 days now.. so i think it is propagated already. Please advice me what to do... thanks
in advance...

trickynapzter 01-04-2013 02:27 AM

i tried to troubleshoot the server but still no luck,

netstat -tulpn | grep 53

PHP Code:

tcp        0      0 121.111.1.1:53                0.0.0.0:*                   LISTEN      23515/named         
tcp        0      0 127.0.0.1
:53                0.0.0.0:*                   LISTEN      23515/named         
tcp        0      0 127.0.0.1
:953               0.0.0.0:*                   LISTEN      23515/named         
tcp        0      0 
:::53                       :::*                        LISTEN      23515/named         
udp        0      0 121.111.1.1
:53                0.0.0.0:*                               23515/named         
udp        0      0 127.0.0.1
:53                0.0.0.0:*                               23515/named         
udp        0      0 
:::53                       :::*                                    23515/named 

/etc/init.d/named status

PHP Code:

version9.8.2rc1-RedHat-9.8.2-0.10.rc1.el6_3.6
CPUs found
2
worker threads
2
number of zones
17
debug level
0
xfers running
0
xfers deferred
0
soa queries in progress
0
query logging is OFF
recursive clients
0/0/1000
tcp clients
0/100
server is up 
and running
named 
(pid  23515is running... 

checked zone files for errors...

PHP Code:

named-checkconf /etc/named.conf 

host ns1.pl.blucard.com

PHP Code:

Host ns1.pl.blucard.com not found3(NXDOMAIN

dig 123.111.1.1

PHP Code:

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.10.rc1.el6_3.6 <<>> 123.111.1.1.
;; global 
options: +cmd
;; Got answer:
;; ->>
HEADER<<- opcodeQUERYstatusNXDOMAINid52082
;; flagsqr rd raQUERY1ANSWER0AUTHORITY1ADDITIONAL0


;; QUESTION SECTION:
;
123.111.1.1.            IN    A


;; AUTHORITY SECTION:
.            
10800    IN    SOA    a.root-servers.netnstld.verisign-grs.com2013010301 1800 900 604800 86400


;; Query time67 msec
;; SERVER127.0.0.1#53(127.0.0.1)
;; WHENThu Jan  3 21:36:42 2013
;; MSG SIZE  rcvd106 


bathory 01-04-2013 04:04 AM

Hi,

Note that you need the glue record between the domain blucard.com and the subdomain pl.blucard.com. Take a look at the output of the following dig commands:
Code:

dig blucard.com +short
121.78.127.249

dig ns blucard.com +short
ns2.comn.com.
ns1.comn.com.

dig pl.blucard.com +short
121.78.127.249

dig ns pl.blucard.com +short

As you see there is no NS defined for the subdomain pl.blucard.com. You should go in the zone file of blucard.com and add an NS RR pointing to your server, e.g.
Code:

<snipped blucard.com zonefile>
pl.blucard.com.  NS ns1.pl.blucard.com.

Also keep in mind that in your OP you have pl.blucard.com as the NS RR of the pl.blucard.com zone and not ns1.pl.blucard.com. In the latter case you need an A RR for ns1.pl.blucard.com too.

Quote:

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.10.rc1.el6_3.6 <<>> 203.177.42.49
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 52082
If you want to use dig to do reverse queries you'll need the -x switch like this:
Code:

dig -x 123.111.1.1
But you said in your OP that you haven't configured the reverse zone yet.

trickynapzter 01-04-2013 10:45 PM

hi bathory,,


pl.blucard.com is already added in the zone file of blucard.com.. and here is my new /etc/named/pl.blucard.com.zone file. i tried adding a record for ns1 and test.pl


PHP Code:

$ORIGIN .
$TTL    3600 1 hour
pl
.blucard.com    IN     *SOA    ns1.pl.blucard.com.    admin.blucard.com. (
                 
2012121102 serial
                 10800 
* * *; refresh (3 hours)
                 
3600 * * * ; retry (1 hour)
                 
604800 * * ; expire (1 week)
                 
86400 * * *; minimum (1 day)
                 )
        
NS    sys1.blucard.com.
        
NS    ns1.pl.blucard.com.
$ORIGIN pl.blucard.com.
pl.blucard.com    IN    A    123.111.1.1    
test            IN     A    123.111.1.1
ns1        
* * * **IN    A    123.111.1.1 

...i can ping / dig ns1.pl.blucard.com but after several hours i cannot.. :(.. please tell me what to do...

bathory 01-05-2013 03:33 AM

Quote:

i can ping / dig ns1.pl.blucard.com but after several hours i cannot.. .. please tell me what to do...
What is that you cannot...?
I can also resolve ns1.pl.blucard.com from here as well as test.pl.blucard.com, even though there are no NS for the pl.blucard.com subdomain:
Code:

dig ns1.pl.blucard.com +short
121.78.127.249
dig test.pl.blucard.com +short
121.78.127.249

dig ns pl.blucard.com +short

So please post the blucard.com zonefile.
Besides you don't need the line "$ORIGIN pl.blucard.com." in the pl.blucard.com zonefile. Also check the trailing dots after hostnames, as you miss some of them.

Regards


All times are GMT -5. The time now is 11:51 AM.