Find the answer to your Linux question:
Results 1 to 9 of 9
I followed the guide http://www.debian.org/doc/manuals/ne...tml#s-bindtest and got stuck. I have talked to a Linux guy who know some stuff, I am a noob. I am trying to learn. Anyway, I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2006
    Posts
    8

    Debian Bind 9 Primary DNS


    I followed the guide
    http://www.debian.org/doc/manuals/ne...tml#s-bindtest

    and got stuck. I have talked to a Linux guy who know some stuff, I am a
    noob. I am trying to learn. Anyway, I am trying to get Bind 9 working.
    I got it to resolve DNS, but I can not get the custom domain to come
    up. I tried these commands to restart the service:
    killall named
    named

    Here are the files and locations:
    --------------------------------------------------------------------------------------------------
    ; /var/named/192.168.1.db
    ;
    @ IN SOA jeffcomputers.com. root.jeffcomputers.com.
    (
    1998121401 ; Serial
    604800 ; Refresh
    86400 ; Retry
    2419200 ; Expire
    604800 ) ; Default TTL

    IN NS dns.jeffcomputers.com.

    33 IN PTR www.newdomain.com.
    ;20 IN PTR news.foo.org.
    ;30 IN PTR mail.foo.org.
    100 IN PTR dns.jeffcomputers.com.
    ;50 IN PTR dns2.foo.org.
    --------------------------------------------------------------------------------------------------
    ; /var/named/newdomain.db
    ;
    @ IN SOA jeffcomputers.com. root.jeffcomputers.com.
    (
    1998121401 ; Serial
    604800 ; Refresh
    86400 ; Retry
    2419200 ; Expire
    604800 ) ; Default TTL

    IN NS dns.jeffcomputers.com.

    ;IN MX 10 mail.foo.org.

    www IN A 192.168.1.33
    ;news IN A 192.168.100.20
    ;mail IN A 192.168.100.30
    dns IN A 192.168.1.100
    ;dns2 IN A 192.168.100.50
    ;50 IN PTR dns2.foo.org.
    --------------------------------------------------------------------------------------------------
    ;etc/named.conf
    options {
    directory "/var/named";
    allow-transfer "192.168.1.114";
    /*
    * 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;
    };

    zone "." {
    type hint;
    file "named.root";
    };

    // type domain source file
    zone "localhost" {
    type master;
    file "named.local";
    };

    zone "127.in-addr.arpa" {
    type master;
    file "named.rev-local";
    };

    zone "newdomain.com" {
    type master;
    file "newdomain.db";
    };

    zone "1.168.192.in-addr.arpa" {
    type master;
    file "192.rev";
    };

  2. #2
    Just Joined!
    Join Date
    Apr 2006
    Posts
    8
    I got rid of one error, however www.newdomain.com is still resolving to 213.188.129.48 instead of an internal 192.168.1.XX

    Code:
    Apr 12 00:17:20 localhost named[1034]: starting BIND 9.2.4
    Apr 12 00:17:20 localhost named[1034]: using 1 CPU
    Apr 12 00:17:20 localhost named[1036]: loading configuration from '/etc/bind/named.conf'
    Apr 12 00:17:20 localhost named[1036]: no IPv6 interfaces found
    Apr 12 00:17:20 localhost named[1036]: listening on IPv4 interface lo, 127.0.0.1#53
    Apr 12 00:17:20 localhost named[1036]: listening on IPv4 interface eth0, 192.168.1.88#53
    Apr 12 00:17:20 localhost named[1036]: command channel listening on 127.0.0.1#953
    Apr 12 00:17:20 localhost named[1036]: zone 0.in-addr.arpa/IN: loaded serial 1
    Apr 12 00:17:20 localhost named[1036]: zone 127.in-addr.arpa/IN: loaded serial 1
    Apr 12 00:17:20 localhost named[1036]: zone 255.in-addr.arpa/IN: loaded serial 1
    Apr 12 00:17:20 localhost named[1036]: zone localhost/IN: loaded serial 1
    Apr 12 00:17:20 localhost named[1036]: running

  3. #3
    Just Joined!
    Join Date
    Apr 2006
    Posts
    8

    *bump*

    *bump* *bump*

  4. #4
    Just Joined!
    Join Date
    Apr 2006
    Posts
    8

    *bump*

    *bump**bump*

  5. #5
    Linux User
    Join Date
    Apr 2005
    Location
    Ohio
    Posts
    326
    Is it newdomain.com you want it to resolve or is it jeffcomputers.com you want it to resolve.. ?

    you setup a zone for newdomain.com but no SOA to answer queries for it..

    You setup a SOA for jeffcomputers.com in the newdomain.com zone db..

    I would thik you should change your newdomain,com zone to jeffscomputers.com

    Code:
         zone "jeffcomputers.com" {
                 type master;
                 file "newdomain.db";
         };
    My suggested changes are in bold..

    Code:
    ; /var/named/192.rev
    ;
    @ IN 	SOA 	jeffcomputers.com. 	root.jeffcomputers.com.(
    		1998121401 	; Serial
    		604800 		; Refresh
    		86400 		; Retry
    		2419200 	; Expire
    		604800 ) 	; Default TTL
    
    	IN 	NS 	dns.jeffcomputers.com.
    
    33 	IN 	PTR 	www.jeffcomputer.com.
    ;20 	IN 	PTR 	news.foo.org.
    ;30 	IN 	PTR 	mail.foo.org.
    100 	IN 	PTR 	dns.jeffcomputers.com.
    ;50 	IN 	PTR 	dns2.foo.org.
    --------------------------------------------------------------------------------------------------
    ; /var/named/newdomain.db
    ;
    @ IN 	SOA 	jeffcomputers.com. 	root.jeffcomputers.com.(
    		1998121401 	; Serial
    		604800 		; Refresh
    		86400 		; Retry
    		2419200 	; Expire
    		604800 ) 	; Default TTL
    
    	IN 	NS 	dns.jeffcomputers.com.
    
    ;IN 	MX 	10 	mail.foo.org.
    
    www 	IN 	A 	192.168.1.33
    ;news 	IN 	A 	192.168.100.20
    ;mail 	IN 	A 	192.168.100.30
    dns 	IN 	A 	192.168.1.100
    ;dns2 	IN 	A 	192.168.100.50
    ;50 	IN 	PTR 	dns2.foo.org.
    --------------------------------------------------------------------------------------------------
    ;etc/named.conf
    options {
    	directory "/var/named";
    	allow-transfer "192.168.1.114";
    	/*
    	* 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;
    };
    
    zone "." {
    	type hint;
    	file "named.root";
    };
    
    // type domain source file
    zone "localhost" {
    	type master;
    	file "named.local";
    };
    
    zone "127.in-addr.arpa" {
    	type master;
    	file "named.rev-local";
    };
    
    zone "jeffcomputers.com" {
    	type master;
    	file "newdomain.db";
    };
    
    zone "1.168.192.in-addr.arpa" {
    	type master;
    	file "192.rev";
    };

    Then if the DNS server IP address is 192.168.1.100
    I would specify which server to query when checking for proper name resolution resolution..

    dig @192.168.1.100 www.jeffcomputers.com

    Code:
    jeffspc:~# dig @192.168.1.100 www.jeffcomputers.com
    
    ; <<>> DiG 9.2.4 <<>> @192.168.1.100 www.jeffcomputers.com
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 65270
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;www.jeffcomputers.com.                        IN      A
    
    ;; ANSWER SECTION:
    www.jeffcomputers.com.         100   IN      A   192.168.1.33.
    
    
    ;; Query time: 2 msec
    ;; SERVER: 192.168.1.100#53(192.168.0.25)
    ;; WHEN: Thu Apr 20 12:10:03 2006
    ;; MSG SIZE  rcvd: 84
    far...out

  6. #6
    Just Joined!
    Join Date
    Apr 2006
    Posts
    8

    wow

    Wow. Thanks. That should help a lot. My plan is to have jeffcomputers.com be the domain and www.newdomain.com and www.newdomain2.com to be resolved properly. They will be the customers. Are there any other files I need? What file and location should the "dig @192.168.1.100" be located at?

  7. #7
    Linux User
    Join Date
    Apr 2005
    Location
    Ohio
    Posts
    326
    Dig is a command used to query DNS Servers.. it's noit a file.
    I was showing an example of what the output of dig might look like if you get a proper response from your DNS server


    When you add newdomain and newdomain 2 you will need to add a new zone record for each in the named.conf, as well as a db file for each that is seperate from teh one being used for jeffcomputers.com

    the reverse file can be shared as long as all the hosts are in the same network block.
    far...out

  8. #8
    Just Joined!
    Join Date
    Apr 2006
    Posts
    8

    starting to work!

    It is starting to work! Yea!!! I set another computer to use it as its DNS server. Then I try and ping diffrent stuff. It is able to resolve jeffcomputers.com now. However, public addresses like google are not working. Here is the log:

    Code:
    Apr 22 14:43:55 localhost named[1058]: exiting
    Apr 22 14:43:56 localhost named[1068]: starting BIND 9.2.4
    Apr 22 14:43:56 localhost named[1068]: using 1 CPU
    Apr 22 14:43:56 localhost named[1070]: loading configuration from '/etc/bind/named.conf'
    Apr 22 14:43:56 localhost named[1070]: no IPv6 interfaces found
    Apr 22 14:43:56 localhost named[1070]: listening on IPv4 interface lo, 127.0.0.1#53
    Apr 22 14:43:56 localhost named[1070]: listening on IPv4 interface eth0, 192.168.1.88#53
    Apr 22 14:43:56 localhost named[1070]: command channel listening on 127.0.0.1#953
    Apr 22 14:43:56 localhost named[1070]: zone 127.in-addr.arpa/IN: loading master file named.rev-local: file not found
    Apr 22 14:43:56 localhost named[1070]: 192.rev:3: no TTL specified; using SOA MINTTL instead
    Apr 22 14:43:56 localhost named[1070]: zone 1.168.192.in-addr.arpa/IN: loaded serial 69
    Apr 22 14:43:56 localhost named[1070]: newdomain.db:3: no TTL specified; using SOA MINTTL instead
    Apr 22 14:43:56 localhost named[1070]: zone jeffcomputers.com/IN: loaded serial 69
    Apr 22 14:43:56 localhost named[1070]: zone localhost/IN: loading master file named.local: file not found
    Apr 22 14:43:56 localhost named[1070]: running
    Apr 22 14:43:56 localhost named[1070]: zone 1.168.192.in-addr.arpa/IN: sending notifies (serial 69)
    Apr 22 14:43:56 localhost named[1070]: zone jeffcomputers.com/IN: sending notifies (serial 69)
    Apr 22 14:43:56 localhost named[1070]: received notify for zone '1.168.192.in-addr.arpa'
    Apr 22 14:43:57 localhost named[1070]: received notify for zone 'jeffcomputers.com'

  9. #9
    Just Joined!
    Join Date
    Apr 2006
    Posts
    8
    See last post. Also, here is the other important file. Is there any other files than the ones listed here I need to be concerned with?

    Code:
    #/etc/resolv.conf
    domain jeffcomputers.com
    search jeffcomputers.com
    nameserver 127.0.0.1   
    nameserver 216.231.41.2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •