Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
; <<>> DiG 9.2.4 <<>> -x 192.168.7.222
;; global options: printcmd
;; connection timed out; no servers could be reached
this file is reverse.rev.
$TTL 86400
@ IN SOA dns.com. root (
2005111401
10800
3600
604800
86400 )
@ IN NS server.dns.com.
@ IN NS www ; server.dns.com.
222 IN PTR server.dns.com.
9 IN PTR bax1.dns.com.
10 IN PTR bax2.dns.com.
~
when i check with command
# named-checkzone dns.com /var/named/chroot/var/named/reverse.com
zone dns.com/IN: loaded serial 2005111401
OK
# vi /var/log/messages
Jan 28 12:51:22 server named: named startup succeeded
Jan 28 12:51:22 server named[3745]: loading configuration from '/etc/named.conf'
Jan 28 12:51:22 server named[3745]: listening on IPv4 interface lo, 127.0.0.1#53
Jan 28 12:51:22 server named[3745]: listening on IPv4 interface eth0, 192.168.7.222#53
Jan 28 12:51:22 server named[3745]: command channel listening on 127.0.0.1#953
Jan 28 12:51:22 server named[3745]: zone 0.in-addr.arpa/IN: loaded serial 42
Jan 28 12:51:22 server named[3745]: zone 0.0.127.in-addr.arpa/IN: loaded serial 1997022700
Jan 28 12:51:22 server named[3745]: zone 255.in-addr.arpa/IN: loaded serial 42
Jan 28 12:51:22 server named[3745]: zone 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: loaded serial 1997022700
Jan 28 12:51:22 server named[3745]: zone dns.com/IN: loaded serial 2004100801
Jan 28 12:51:22 server named[3745]: zone 7.168.192.in-addr-arpa/IN: loaded serial 2005111401
Jan 28 12:51:22 server named[3745]: zone localdomain/IN: loaded serial 42
Jan 28 12:51:22 server named[3745]: zone localhost/IN: loaded serial 42
Jan 28 12:51:22 server named[3745]: running
[root@server ~]#/etc/hosts
192.168.7.222 server.dns.com server
192.168.7.9 bax1.dns.com
192.168.7.10 bax2.dns.com
[root@server ~]#/etc/named.conf
};
zone "dns.com" IN {
type master;
notify no;
file "dns.com";
allow-query { any; };
};
zone "7.168.192.in-addr-arpa" IN {
type master;
notify no;
file "reverse.com";
allow-query { any; };
};
for the default named.conf i made these two changes for file.
[root@server ~]#vi /var/named/chroot/var/named/dns.com (after the changes)
$TTL 86400
@ IN SOA server.dns.com. root.dns.com (
2004100801 ;serial
3600 ;refresh seconds
3600 ;retry, seconds
3600 ; expiry, seconds
3600 ) ;minimum, seconds
IN NS server.dns.com.
server IN A 192.168.7.222
bax1 IN A 192.168.7.9
bax2 IN A 192.168.7.10
[root@server ~]#vi /var/named/chroot/var/named/reverse.com (after the changes)
$TTL 86400
@ IN SOA server.dns.com. root.dns.com (
2005111401
10800
3600
604800
86400 )
IN NS server.dns.com.
IN A 192.168.7.222
222 IN PTR server.dns.com.
9 IN PTR bax1.dns.com.
10 IN PTR bax2.dns.com.
these only the my configuration file please correct it.
[root@server ~]#named-checkzone 7.168.192.in.addr.arpa. /var/named/chroot/var/named/reverse.com
zone 7.168.192.in.addr.arpa/IN: loaded serial 2005111401
OK
[root@server ~]# named-checkzone dns.com /var/named/chroot/var/named/dns.com
zone dns.com/IN: loaded serial 2004100801
OK
[root@server ~]#dig server.dns.com
global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 48546
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;server.dns.com. IN A
;; AUTHORITY SECTION:
dns.com. 3600 IN SOA server.dns.com.dns.com. root.server.dns.com.dns.com. 2004100801 3600 3600 3600 3600
According to the zonefile you've posted, there is no www.server.dns.com or www.dns.com, but just server.dns.com, that's why you cannot find them. You have to add them and of course increase the serial and reload the zone.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.