LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 09-02-2005, 11:11 AM   #1
hsfong
LQ Newbie
 
Registered: Sep 2005
Posts: 9

Rep: Reputation: 0
DNS setting problem


I have a question on setting a DNS server .

I am using Fedora Core 1 , the softwares I installed are :
bind 9.2.2.P3-9
bind-chroot 9.2.2.P3-9
bind-devel 9.2.2.P3-9
bind-utils 9.2.2.P3-9
redhat-config-bind 2.0.0-18
caching-nameserver 7.2-10


here is my config files on my domain:

$ttl 900
@ SOA dns1 (
webmaster
2004041701
21600
1800
604800
900 )

@ NS dns1
dns1 A 202.x.x.x
@ A 202.x.x.x
www IN A 202.x.x.x


Here is dig running on my server :

# dig dns1.xxx.info

; <<>> DiG 9.3.1 <<>> dns1.xxx.info
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42493
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;dns1.xxx.info. IN A

;; ANSWER SECTION:
dns1.xxx.info. 900 IN A 202.x.x.x

;; AUTHORITY SECTION:
xxx.info. 900 IN NS dns1.xxx.info.

;; Query time: 1 msec
;; SERVER: 202.x.x.x#53(202.x.x.x)
;; WHEN: Fri Sep 2 23:00:12 2005
;; MSG SIZE rcvd: 62

# dig www.xxx.info

; <<>> DiG 9.3.1 <<>> www.xxx.info
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 16787
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:
;www.xxx.info. IN A

;; ANSWER SECTION:
www.xxx.info. 900 IN A 202.x.x.x

;; AUTHORITY SECTION:
xxx.info. 900 IN NS dns1.xxx.info.

;; ADDITIONAL SECTION:
dns1.xxx.info. 900 IN A 202.x.x.x


# cd /var/named/chroot/var/named
# ls -l
total 16
drwxr-xr-x 5 named named 4096 9?? 1 13:55 chroot
-rw-r--r-- 1 root root 171 9?? 2 22:59 xxx.info.hosts
-rw-r--r-- 1 named named 2517 9?? 1 18:15 named.ca
drwxr-x--- 2 named named 4096 9?? 1 13:55 slaves


I can use my computer (not server) ping the dns1.xxx.info , but cannot ping the www.xxx.info , why ?
 
Old 09-03-2005, 08:15 PM   #2
Darvocet
Member
 
Registered: Feb 2003
Location: United States
Distribution: RHEL, Slackware, Gentoo, Fedora, CentOS, Ubuntu, Debian
Posts: 66

Rep: Reputation: 15
Your question isn't very clear. And your config files are very sloppy. Here is a some pastes of what your config files and zones SHOULD look like. If you clean it up and understand what you are writing, 99% chance that you would solve your own problem.

Assuming you have already downloaded, and compiled Bind the following sample configuration files should make the setup a snap.


######################################
# Sample -- named.conf (Usual location /etc/named.conf)
######################################
Code:
options {
        directory "/var/named";
        version "This information is not available";
        recursion no;
        /*
        * 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;
};

controls {
        inet 127.0.0.1 allow { localhost; } keys { rndc_key; };
};

key "rndc_key" {
        algorithm hmac-md5;
        secret "a2ffbh5lIGVubBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K";
};

zone "." IN {
        type hint;
        file "root.hints";
};

zone "0.0.127.in-addr.arpa" IN {
        type master;
        file "local.host";
};

zone "1.168.192.in-addr.arpa" IN {
        type master;
        file "lan.host";
};

zone "example.com" {
        type master;
        notify yes;
        allow-query { any; };
        file "zones/example.com.db";
};

zone "slave-example.com" {
        type slave;
        notify yes;
        allow-query { any; };
        masters { 255.255.255.255; };
        file "zones/70sshowirc.com.db";
};
########################################
# Sample -- root.hints (Usual location /var/named/root.hints)
########################################
Code:
;       last update:    Apr 22, 2003
;       related version of root zone:   1997082200
;
;
.                       6D  IN      NS      A.ROOT-SERVERS.NET.
.                       6D  IN      NS      B.ROOT-SERVERS.NET.
.                       6D  IN      NS      C.ROOT-SERVERS.NET.
.                       6D  IN      NS      D.ROOT-SERVERS.NET.
.                       6D  IN      NS      E.ROOT-SERVERS.NET.
.                       6D  IN      NS      F.ROOT-SERVERS.NET.
.                       6D  IN      NS      G.ROOT-SERVERS.NET.
.                       6D  IN      NS      H.ROOT-SERVERS.NET.
.                       6D  IN      NS      I.ROOT-SERVERS.NET.
.                       6D  IN      NS      J.ROOT-SERVERS.NET.
.                       6D  IN      NS      K.ROOT-SERVERS.NET.
.                       6D  IN      NS      L.ROOT-SERVERS.NET.
.                       6D  IN      NS      M.ROOT-SERVERS.NET.
A.ROOT-SERVERS.NET.     6D  IN      A       198.41.0.4
B.ROOT-SERVERS.NET.     6D  IN      A       128.9.0.107
C.ROOT-SERVERS.NET.     6D  IN      A       192.33.4.12
D.ROOT-SERVERS.NET.     6D  IN      A       128.8.10.90
E.ROOT-SERVERS.NET.     6D  IN      A       192.203.230.10
F.ROOT-SERVERS.NET.     6D  IN      A       192.5.5.241
G.ROOT-SERVERS.NET.     6D  IN      A       192.112.36.4
H.ROOT-SERVERS.NET.     6D  IN      A       128.63.2.53
I.ROOT-SERVERS.NET.     6D  IN      A       192.36.148.17
J.ROOT-SERVERS.NET.     6D  IN      A       198.41.0.10
K.ROOT-SERVERS.NET.     6D  IN      A       193.0.14.129
L.ROOT-SERVERS.NET.     6D  IN      A       198.32.64.12
M.ROOT-SERVERS.NET.     6D  IN      A       202.12.27.33

; End of File
########################################
# Sample -- local.host (Usual location /var/named/local.host)
########################################
Code:
;Zone for 127.0.0.1 (LocalHost)
;
$TTL 6H
@       IN      SOA     @ root (
                        2004060801      ; Serial
                        28820	        ; Refresh
                        7200            ; Retry
                        604800          ; Expire
                        86400)          ; Minimum TTL

     IN     NS     @
     IN     A      127.0.0.1
######################################
# Sample -- lan.host (Usual location /var/named/lan.host)
######################################
Code:
;Zone for LAN (Local Area Network)
;
$TTL 3600
1.168.192.in-addr.arpa. IN SOA ns1.example.com. admin.example.com. (
                        2004091701      ; Serial
                        3600	         ; Refresh
                        600             ; Retry
                        1209600         ; Expire
                        3600            ; Minimum TTL
			)	

     IN     NS     ns1.example.com.
     IN     NS     ns2.example.com.
	
0	1H	PTR	server0.example.com.
1	1H	PTR	server1.example.com.
2	1H	PTR	server2.example.com.
################################################
# Sample -- Zone File (Usual location /var/named/zones/domain.com.db)
################################################
Code:
; Zone for Example.Com
;
$TTL 1H
@	IN	SOA	ns1.example.com.	admin.example.com. (
			2004100405 ; serial
			3600       ; refresh (4 hours)
			600        ; retry (2 hours)
			1209600    ; expire (5 weeks 6 days 16 hours)
			3600 )     ; minimum (1 day)

	IN	NS	ns1.example.com.
	IN	NS	ns2.example.com.
	IN	NS	ns3.example.com.
	IN	MX	10	smtp.mailserver.com.
	IN	MX	50	alternate.mailserver.com.
	IN	TXT	"v=spf1 a mx -all"

;;;;;;;;;;;;;;;;;
;; Example.Com ;;
;;;;;;;;;;;;;;;;;

example.com.     1H	A	     25.25.25.25
www	         1H	CNAME	 example.com.

ns1      1H     A            25.25.25.25
ns2      1H	A            26.26.26.26
ns3      1H     A            27.27.27.27

ipv6     1H	  AAAA         3ffe:bc1:f01::1
These of course are just examples. There is quite a bit of information that must be changed to suit your individual needs. Hopefully though these examples will help make your setup time much faster.

If you have any other questions about these config files, or the information contained in them, please just post a reply and I will do my best to help you solve your problems!

Last edited by Darvocet; 09-03-2005 at 08:20 PM.
 
Old 09-04-2005, 12:54 AM   #3
hsfong
LQ Newbie
 
Registered: Sep 2005
Posts: 9

Original Poster
Rep: Reputation: 0
What files(at least) do I need to have ?

Is it nessesary to have zone called : 1.168.192.in-addr.arpa , if it is nessesary , the file name should be (if my IP is 202.123.123.123) ?


Is it nessesary to have all domains I hold namely : *.db ?

Thanks a lot .

Last edited by hsfong; 09-04-2005 at 01:01 AM.
 
Old 09-04-2005, 02:31 AM   #4
hsfong
LQ Newbie
 
Registered: Sep 2005
Posts: 9

Original Poster
Rep: Reputation: 0
0 1H PTR server0.example.com.

What should I type instead of server0.example.com.??My www server?
 
Old 09-04-2005, 04:00 AM   #5
hsfong
LQ Newbie
 
Registered: Sep 2005
Posts: 9

Original Poster
Rep: Reputation: 0
I follow your configurations , but I cannot connect to my server ...


$TTL 1H
@ IN SOA dns1.xxx.info. admin.xxx.info. (
2004100407 ; serial
3600 ; refresh (4 hours)
600 ; retry (2 hours)
1209600 ; expire (5 weeks 6 days 16 hours)
3600 ) ; minimum (1 day)

IN NS dns1.xxx.info.
IN A 202.x.x.x

www 1H A 202.x.x.x

dns1 1H A 202.x.x.x



lan.host

$TTL 3600
x.x.202.in-addr.arpa. IN SOA dns1.xxx.info. webmaster.xxx.info. (
2004091704 ; Serial
3600 ; Refresh
600 ; Retry
1209600 ; Expire
3600 ; Minimum TTL
)
IN NS dns1.xxx.info.

195 1H PTR www.xxx.info.




Sep 4 16:56:47 xxx named[18216]: using 1 CPU
Sep 4 16:56:47 xxx named[18216]: loading configuration from '/etc/named.conf'
Sep 4 16:56:47 xxx named[18216]: no IPv6 interfaces found
Sep 4 16:56:47 xxx named[18216]: listening on IPv4 interface lo, 127.0.0.1#53
Sep 4 16:56:47 xxx named[18216]: listening on IPv4 interface eth0, 202.x.x.x#53
Sep 4 16:56:47 xxx named[18216]: command channel listening on 127.0.0.1#953
Sep 4 16:56:47 xxx named[18216]: zone 0.0.127.in-addr.arpa/IN: loaded serial 2004060801
Sep 4 16:56:47 xxx named[18216]: zone x.x.202.in-addr.arpa/IN: loaded serial 2004091704
Sep 4 16:56:47 xxx named[18216]: zone xxx.info/IN: loaded serial 2004100407
Sep 4 16:56:47 xxx named[18216]: running


; <<>> DiG 9.3.1 <<>> @202.x.x.x xxx.info
; (1 server found)
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 34115
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;xxx.info. IN A

;; AUTHORITY SECTION:
info. 7200 IN SOA tld1.ultradns.net. domadmin.ultradns.net. 2005183514 3600 1800 604800 3600
 
  


Reply



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
setting up DNS Tamara Linux - Newbie 4 04-05-2005 08:14 AM
Setting up DNS UnknownFear Linux - Networking 3 04-10-2004 01:39 AM
Setting UP DNS Ciccio Linux - Networking 1 12-11-2002 10:23 PM
DNS setting Eddie9 Linux - General 1 04-21-2002 09:48 PM
Help with setting up DNS gomer1701ems Linux - Networking 1 06-02-2001 07:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:10 PM.

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
Open Source Consulting | Domain Registration