Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
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>
[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
[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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.