hi guys
I am trying to setup DNS/Bind but it is not working
my linux client cannot ping server by name neither can my DNS server.
Network Information
DNS Server: 192.168.1.128 (Firewall disabled) Netmask:24
Linux Machine IP: 192.168.10 (Static)
They can ping each by IP.
Linux Machine Configuration
resolv.conf
Code:
search training.com
nameserver 192.168.1.128
/etc/syconfig/network
Code:
NETWORKING=yes
HOSTNAME=station1.training.com
Server Configuration
resolv.conf
Code:
search training.com
nameserver 127.0.0.1
/etc/sysconfig/network
Code:
NETWORKING=yes
HOSTNAME=masterdns.training.com
/var/named/chroot/etc/named.conf
Code:
options {
directory "/var/named";
allow-transfer {
localhost;
};
recursion yes;
allow-recursion {
127.0.0.1;
192.168.1.0/24;
};
listen-on {
127.0.0.1;
192.168.1.128;
};
};
zone "training.com" {
type master;
file "data/training.com.db";
};
zone "localhost" {
type master;
file "data/localhost.db";
};
zone "0.0.127.in-addr.arpa" {
type master;
file "data/127.0.0.rev";
};
zone "." in {
type hint;
file "data/named.ca";
};
Data Files-/var/named/chroot/var/named/data
training.com.db
Code:
$TTL 2d ; 172800 seconds
$ORIGIN training.com.
@ IN SOA training.com. hostmaster.training.com. (
2008051200 ; serial number (change when you modify DNS)
1d12h ; refresh = 1 day 12 hours
15M ; update retry = 15 minutes
3W12h ; expiry = 3 weeks + 12 hours
2h20M ) ; minimum = 2 hours + 20 minutes
@ IN NS ns1.training.com.
@ IN A 192.168.1.128
ns1 IN A 192.168.1.128
www IN A 192.168.1.128
mail IN A 192.168.1.128
127.0.0.rev
Code:
$TTL 2d
$ORIGIN 0.0.127.in-addr.arpa.
@ IN SOA localhost. admin.localhost. (
2008051101 ; serial number (change when you modify DNS)
1d12h ; refresh = 1 day 12 hours
15M ; update retry = 15 minutes
3W12h ; expiry = 3 weeks + 12 hours
2h20M ) ; minimum = 2 hours + 20 minutes
@ IN NS localhost.
1 IN PTR localhost.
localhost.db
Code:
$TTL 2d
$ORIGIN localhost.
@ IN SOA localhost. hostmaster.localhost. (
2008051101 ; serial number (change when you modify DNS)
1d12h ; refresh = 1 day 12 hours
15M ; update retry = 15 minutes
3W12h ; expiry = 3 weeks + 12 hours
2h20M ) ; minimum = 2 hours + 20 minutes
@ IN NS localhost.
@ IN A 127.0.0.1
Logs - /var/log/messages
This log is after I did a restart to check the whole named process
Code:
ov 19 00:47:52 masterdns named[5803]: shutting down: flushing changes
Nov 19 00:47:52 masterdns named[5803]: stopping command channel on 127.0.0.1#953
Nov 19 00:47:52 masterdns named[5803]: stopping command channel on ::1#953
Nov 19 00:47:52 masterdns named[5803]: no longer listening on 127.0.0.1#53
Nov 19 00:47:52 masterdns named[5803]: no longer listening on 192.168.1.128#53
Nov 19 00:47:52 masterdns named[5803]: exiting
Nov 19 00:47:54 masterdns named[6447]: starting BIND 9.3.4-P1 -u named -t /var/named/chroot
Nov 19 00:47:54 masterdns named[6447]: found 1 CPU, using 1 worker thread
Nov 19 00:47:54 masterdns named[6447]: loading configuration from '/etc/named.conf'
Nov 19 00:47:54 masterdns named[6447]: listening on IPv4 interface lo, 127.0.0.1#53
Nov 19 00:47:54 masterdns named[6447]: listening on IPv4 interface eth0, 192.168.1.128#53
Nov 19 00:47:54 masterdns named[6447]: command channel listening on 127.0.0.1#953
Nov 19 00:47:54 masterdns named[6447]: command channel listening on ::1#953
Nov 19 00:47:54 masterdns named[6447]: zone 0.0.127.in-addr.arpa/IN: loaded serial 2008051101
Nov 19 00:47:54 masterdns named[6447]: zone training.com/IN: loaded serial 2008051200
Nov 19 00:47:54 masterdns named[6447]: zone localhost/IN: loaded serial 2008051101
Nov 19 00:47:54 masterdns named[6447]: running
Nov 19 00:47:54 masterdns named[6447]: zone training.com/IN: sending notifies (serial 2008051200)
Nov 19 00:47:54 masterdns named[6447]: client 192.168.1.128#54975: received notify for zone 'training.com'
Test.
Code:
[root@station1 ~]# nslookup training.com
Server: 192.168.1.128
Address: 192.168.1.128#53
Name: training.com
Address: 192.168.1.128
[root@station1 ~]# nslookup masterdns.training.com
Server: 192.168.1.128
Address: 192.168.1.128#53
** server can't find masterdns.training.com: NXDOMAIN
What could be causing this?