LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-23-2009, 11:43 PM   #1
windstory
Member
 
Registered: Nov 2008
Posts: 489

Rep: Reputation: 36
Could not browse local dns


Could not browse local dns

My box is centos 5.3 x86. I followed dynamic dns at "http://www.howtoforge.com/fedora_dynamic_dns
".

Ping 192.168.0.4 in and out works, and browses webpage.
But my-server.dyndns.org can't make ping and browsing.

Here are my dns configuration files.

1. named.conf;

Code:
options {
	directory "/var/named";
};
controls {
        inet 127.0.0.1 allow {localhost; } keys { "rndckey"; };
};
// Add local zone definitions here.
zone "my-server.dyndns.org" IN {
        type master;
        file "my-server.dyndns.org.zone";
        allow-update { key "rndckey"; };
        notify yes;
};
zone "0.168.192.in-addr.arpa" IN {
        type master;
        file "0.168.192.in-addr.arpa.zone";
        allow-update { key "rndckey"; };
        notify yes;
};
include "/etc/rndc.key";
2. my-server.dyndns.org.zone;

Code:
$TTL 86400
@	IN	SOA	my-server.dyndns.org	my-server.dyndns.org (
			2007042623	;
			28800;
			7200;
			604800;
			86400;
			)
		IN	NS	my-server.dyndns.org
		IN	A	192.168.0.1
server		IN	A	192.168.0.1
3. 0.168.192.in-addr.arpa.zone;

Code:
$TTL 86400
@	IN	SOA	@ root (
			5;
			28800;
			7200;
			604800;
			86400;
			)
		IN	NS	server
1		IN	PTR	my-server.dyndns.org

Many thanks in advance.
 
Old 08-24-2009, 12:11 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Both your zone files have errors. You miss some trailing dots and the NS record (my-server) does not have an A record. The forward zone file my-server.dyndns.org.zone should do:
Code:
$TTL 86400
@	IN	SOA my-server.dyndns.org.	my-server.dyndns.org. (
			2009082401	;
			28800;
			7200;
			604800;
			86400;
			)
		IN	NS	my-server.dyndns.org.
		IN	A	192.168.0.1
my-server		IN	A	192.168.0.1
Note: I've increased the serial.
Same goes for the reverse:
Code:
$TTL 86400
@	IN	SOA	 my-server.dyndns.org.	my-server.dyndns.org. (
			2009082401 ;
			28800;
			7200;
			604800;
			86400;
			)
		IN	NS	my-server
1		IN	PTR	my-server.dyndns.org.
Restart bind, or use "rndc reload" bind to read the new data.

Cheers

Last edited by bathory; 08-24-2009 at 06:23 AM.
 
Old 08-24-2009, 12:54 AM   #3
vishesh
Member
 
Registered: Feb 2008
Distribution: Fedora,RHEL,Ubuntu
Posts: 661

Rep: Reputation: 66
Check your named.conf error using
#named-checkconf
Check your zone files sysntax using
#named-checkzone my-server.dyndns.org <path of my-server.dyndns.org zone file>

thnks
 
Old 08-24-2009, 01:09 AM   #4
windstory
Member
 
Registered: Nov 2008
Posts: 489

Original Poster
Rep: Reputation: 36
bathory/ Thanks for your kind reply and code.
I want to ask you is this right?

Quote:
IN NS my-server
1 IN PTR my-server.dyndns.org.
I think
Quote:
IN NS my-server.dyndns.org.
1 IN PTR my-server.dyndns.org.

vishesh/ Thank you for your kind advise and tips.


With this my-server.dyndns.org.zone file, "named-checkzone my-server.dyndns.org.zone /var/named/chroot/var/named" has endless error;

my-server.dyndns.org.zone;
Quote:
$TTL 86400
@ IN SOA my-server.dyndns.org. my-server.dyndns.org. (
2009082401 ;
28800;
7200;
604800;
86400;
)
IN NS my-server
1 IN PTR my-server.dyndns.org.
error;
Quote:
.......
dns_master_load: /var/named/chroot/var/named:1: isc_lex_gettoken() failed: I/O error
dns_master_load: /var/named/chroot/var/named:1: I/O error
dns_master_load: /var/named/chroot/var/named:1: isc_lex_gettoken() failed: I/O error
dns_master_load: /var/named/chroot/var/named:1: I/O error
dns_master_load: /var/named/chroot/var/named:1: isc_lex_gettoken() failed: I/O error
dns_master_load: /var/named/chroot/var/named:1: I/O error
dns_master_load: /var/named/chroot/var/named:1: isc_lex_gettoken() failed: I/O error
dns_master_load: /var/named/chroot/var/named:1: I/O error
.............

Last edited by windstory; 08-24-2009 at 01:14 AM.
 
Old 08-24-2009, 02:01 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
I want to ask you is this right?

Quote:
IN NS my-server
1 IN PTR my-server.dyndns.org.
I think
Quote:
IN NS my-server.dyndns.org.
1 IN PTR my-server.dyndns.org.
The 2nd is more safe to use. Don't forget to increase serial when you do changes in the zone files.
 
Old 08-24-2009, 02:19 AM   #6
windstory
Member
 
Registered: Nov 2008
Posts: 489

Original Poster
Rep: Reputation: 36
Quote:
Originally Posted by bathory View Post
The 2nd is more safe to use. Don't forget to increase serial when you do changes in the zone files.
bathory/

I changed "my-server.dyndns.org.zone" to this.
Quote:
IN NS my-server.dyndns.org.
1 IN PTR my-server.dyndns.org.
And, how can I fix The error from "named-checkzone my-server.dyndns.org.zone /var/named/chroot/var/named"


Quote:
.......
dns_master_load: /var/named/chroot/var/named:1: isc_lex_gettoken() failed: I/O error
dns_master_load: /var/named/chroot/var/named:1: I/O error
dns_master_load: /var/named/chroot/var/named:1: isc_lex_gettoken() failed: I/O error
dns_master_load: /var/named/chroot/var/named:1: I/O error
dns_master_load: /var/named/chroot/var/named:1: isc_lex_gettoken() failed: I/O error
dns_master_load: /var/named/chroot/var/named:1: I/O error
dns_master_load: /var/named/chroot/var/named:1: isc_lex_gettoken() failed: I/O error
dns_master_load: /var/named/chroot/var/named:1: I/O error
.............
 
Old 08-24-2009, 02:28 AM   #7
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
And, how can I fix The error from "named-checkzone my-server.dyndns.org.zone /var/named/chroot/var/named"
The correct command is:
Code:
named-checkzone my-server.dyndns.org -t /var/named/chroot /var/named/my-server.dyndns.org.zone
because you're running named chrooted in /var/named/chroot
 
Old 08-24-2009, 05:24 AM   #8
windstory
Member
 
Registered: Nov 2008
Posts: 489

Original Poster
Rep: Reputation: 36
Quote:
Originally Posted by bathory View Post
The correct command is:
Code:
named-checkzone my-server.dyndns.org -t /var/named/chroot /var/named/my-server.dyndns.org.zone
because you're running named chrooted in /var/named/chroot
bathory/
I got these errors with named.conf you gave.


Code:
[root:localhost]# named-checkconf -t /var/named/chroot/var/named my-server.dyndns.org.zone
my-server.dyndns.org.zone:1: unknown option '$TTL'
my-server.dyndns.org.zone:4: unknown option '28800'
my-server.dyndns.org.zone:5: unknown option '7200'
my-server.dyndns.org.zone:6: unknown option '604800'
my-server.dyndns.org.zone:7: unknown option '86400'
my-server.dyndns.org.zone:8: unknown option ')'
my-server.dyndns.org.zone:10: unexpected token near end of file
named.conf;
Quote:
$TTL 86400
@ IN SOA my-server.dyndns.org. my-server.dyndns.org. (
2009082401 ;
28800;
7200;
604800;
86400;
)
IN NS my-server.dyndns.org.
1 IN PTR my-server.dyndns.org.
And,
Quote:
named-checkzone my-server.dyndns.org -t /var/named/chroot /var/named/my-server.dyndns.org.zone
results this message;
Quote:
[root:localhost]# named-checkzone my-server.dyndns.org -t /var/named/chroot /var/named/my-server.dyndns.org.zone
zone my-server.dyndns.org/IN: loading master file -t: file not found

Last edited by windstory; 08-24-2009 at 05:26 AM.
 
Old 08-24-2009, 05:39 AM   #9
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
These are 2 different command named-checkzone and named-checkconf.
The syntax for named-checkzone, is:
Code:
named-checkzone -t /var/named/chroot my-server.dyndns.org /var/named/my-server.dyndns.org.zone
And for named-checkconf
Code:
named-checkconf -t /var/named/chroot /etc/named.conf
You can take a look at the manpages of those commands for details.
 
Old 08-24-2009, 05:44 AM   #10
windstory
Member
 
Registered: Nov 2008
Posts: 489

Original Poster
Rep: Reputation: 36
bathory/ Your new commands got this results ;

Code:
[root:localhost]# named-checkconf -t /var/named/chroot /etc/named.conf
[root:localhost]# named-checkzone -t /var/named/chroot my-server.dyndns.org /var/named/my-server.dyndns.org.zone
/var/named/my-server.dyndns.org.zone:10: file does not end with newline
zone my-server.dyndns.org/IN: loaded serial 2009082401
OK
 
Old 08-24-2009, 05:58 AM   #11
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
So named-checkconf is OK. That is the meaning of no output. You can use "-z" to see the zones bind is authoritative for.

Regarding named-checkzone, it is also OK. Just note that I've never seen the "file does not end with newline", but I guess if you add a newline at the end of the file it will go away.
You should increase the serial after making any changes in the zone files, otherwise bind will not be aware of these changes.
 
Old 08-24-2009, 06:09 AM   #12
windstory
Member
 
Registered: Nov 2008
Posts: 489

Original Poster
Rep: Reputation: 36
bathory/

I did not add any new lines, I just change my-server to my dns name.

my-server.dyndns.org still could not browse and answer ping.


And, ping and dig's result is here;

Quote:
[root:localhost]# ping my-server.dyndns.org
PING my-server.dyndns.org (121.151.61.40) 56(84) bytes of data.

--- my-server.dyndns.org ping statistics ---
16 packets transmitted, 0 received, 100% packet loss, time 14993ms

[root:localhost]# dig @192.168.0.15 my-server.dyndns.org

; <<>> DiG 9.3.4-P1 <<>> @192.168.0.15 my-server.dyndns.org
; (1 server found)
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 51611
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;my-server.dyndns.org. IN A

;; AUTHORITY SECTION:
my-server.dyndns.org. 86400 IN SOA my-server.dyndns.org. my-server.dyndns.org. 2009082402 28800 7200 604800 86400

;; Query time: 0 msec
;; SERVER: 192.168.0.15#53(192.168.0.15)
;; WHEN: Mon Aug 24 20:05:49 2009
;; MSG SIZE rcvd: 73
 
Old 08-24-2009, 06:32 AM   #13
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
[root:localhost]# dig @192.168.0.15 my-server.dyndns.org
Who is 192.168.0.15? I thought that your dns IP is 192.168.0.1
 
Old 08-24-2009, 06:54 AM   #14
windstory
Member
 
Registered: Nov 2008
Posts: 489

Original Poster
Rep: Reputation: 36
Quote:
Originally Posted by bathory View Post
Who is 192.168.0.15? I thought that your dns IP is 192.168.0.1
bathory/

192.168.0.1 is router machine, and 192.168.0.15 is this centos's ip.

I forgot posting dhcpd.conf.
Quote:
authoritative;
include "/etc/rndc.key";

server-identifier server;
ddns-domainname "my-server.dyndns.org";
ddns-rev-domainname "in-addr.arpa.";
ddns-update-style interim;
ddns-updates on;
ignore client-updates;

zone my-server.dyndns.org {
primary 127.0.0.1;
key rndckey;
}
default-lease-time 21600;
max-lease-time 43200;

option domain-name "my-server.dyndns.org.";
option ip-forwarding off;
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.100 192.168.0.200;
option routers 192.168.0.1;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option domain-name-servers 192.168.0.1;
zone 0.168.192.in-addr.arpa. {
primary 192.168.0.15;
key rndckey;
}
zone localdomain. {
primary 192.168.0.15;
key rndckey;
}
}

Last edited by windstory; 08-24-2009 at 07:00 AM.
 
Old 08-24-2009, 07:20 AM   #15
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
So you have to use 192.168.0.15 in the NS record of your zone file (forward and reverse)
 
  


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
Browse Local Network shawnbishop Linux - Networking 1 06-15-2006 06:38 AM
cannot browse PDF links which are not local philippeP Linux - Software 3 05-03-2006 06:47 AM
Need to browse local filesystem from browser - how? Bob2 Programming 3 08-03-2004 04:29 PM
Browse local network fatrandy13 Linux - Wireless Networking 1 07-04-2004 10:41 AM
Using Konqueror to Browse Local Intranet sacants Linux - Newbie 1 02-21-2003 06:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:08 AM.

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