I'v got some problems with my DNS server.
Ok first question, how do I change my host name.
This is what i get when I run host localhost
Code:
[root@localhost root]# host localhost
localhost.vic.bigpond.net.au has address 127.0.0.1
I am thinking that localhost.vic.bigpond.net.au is my hostname?
This is whats in the /etc/resolv.conf
Code:
[root@localhost root]# more /etc/resolv.conf
nameserver 61.9.128.14
nameserver 61.9.192.15
search vic.bigpond.net.au
If i change the vic.bigpond.net.au to anything else it fails;
Such as xemous.net (my test domain) i get this:
Code:
[root@localhost root]# host localhost
Host localhost not found: 3(NXDOMAIN)
The hosts file is this:
Code:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
Ok now this is the DNS stuff which isnt working, probably due to the above problems
The named.conf
Code:
// generated by named-bootconf.pl
options {
directory "/var/named";
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};
//
// a caching only nameserver config
//
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
type hint;
file "named.ca";
};
zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};
zone "xemous.net" {
type master;
file "xemous.net.db";
};
zone "1.168.192.in-addr.arpa" {
type master;
file "xemous.net.rev";
};
include "/etc/rndc.key";
And the /var/named/xemous.net.db file:
Code:
$TTL 604800
xemous.net. IN SOA localhost.xemous.net. hostmaster.xemous.net. (
2005011000 ;serial number
10800 ;refresh rate in secounds (3 hours)
1800 ;retry rate in secounds (30 minutes)
1209600 ;expire in seconds (2 weeks)
604800 ) ;minimum in secounds (1 week)
IN NS 61.9.128.14
IN NS 61.9.192.15
xp IN A 192.168.0.187
gn IN A 192.168.0.121
sw IN A 192.168.0.194
x IN CNAME 192.168.0.187
And the /var/named/xemous.net.rev file
Code:
$TTL 604800
xemous.net. IN SOA 1.168.192.in-addr.arpa. hostmaster.xemous.net. (
2005011001 ;serial
10800 ;refresh rate (3 hours)
1800 ;retry (30 minutes)
1209600 ;expire (2 weeks)
604800 ) ;minimum (1 week)
IN NS 61.9.128.14
IN NS 61.9.192.15
187 IN PTR xp.xemous.net.
121 IN PTR sq.xemous.net.
194 IN PTR gn.xemous.net.
I ran a ps -C named
and then kill -HUP the lowest PID on the list to commit the changes.
I can still ping google.com but whenever I try say; xp.xemous.net which should ping to 192.168.0.187, I get an unkown host.
By the way, the system is Redhat 7.3 running on vmware.
I'm not sure on what version BIND is.
Please help!