I am trying to setup a BIND server. I have read some tutorials on the internet, but I have still not got it to work. The OS of the machine that is runnig the BIND daemon is CentOS 6.4 with IP address 192.168.1.13.
In /etc/named.conf
I have added these lines:
zone "mydomain.com" IN {
type master;
file "mydomain.com.zone";
allow-update { none; };
};
zone "0.168.192.in-addr.arpa" {
type master;
file "mydomain.com.rev";
};
In /var/named/mydomain.com.zone
I have this:
$ORIGIN mydomain.com.
$TTL 3D
@ SOA ns.mydomain.com. root.mydomain.com. (12 4h 1h 1w 1h)
@ IN NS ns.mydomain.com.
ns.mydomain.com. IN A 192.168.1.13
www IN A 192.168.1.13
In /var/named/mydomain.com.rev
I have this:
$ORIGIN 0.168.192.in-addr.arpa.
$TTL 3D
@ SOA ns.mydomain.com. root.mydomain.com. (12 4h 1h 1w 1h)
@ IN NS ns.mydomain.com.
211 IN PTR ns.mydomain.com
On my other machine I have configured /etc/resolv.conf
to contain these lines:
domain mydomain.com
search mydomain.com
nameserver 192.168.1.13
When I run nslookup www.mydomain.com
I just get
Server: 192.168.1.13
Address: 192.168.1.13#53
**server can`t find www.mydomain.com.mydomain.com: REFUSED
I have checked with netstat that BIND is listening for all connections, IPTables is not blocking incomming connections and port 53 is open on the BIND server when I run nmap from my other computer.
And, of course, BIND is running.
Have I missed something?
/etc/named.conf
also check the logfile of BIND if it logged any errors.