I am running a DNS server with Named, which, apart from one thing, works fine.
That one thing is that a reverse lookup of my server's IP fails.
I have purchased a domain (which I shall refer to as mydomain.com), and when I remotely or locally do a 'dig' on it then I get my server's IP address, which is what I want. But then, when I remotely do a 'dig -x' on my server's IP address (which I shall refer to as 123.123.456.123) it doesn't return mydomain.com but the domain my ISP has given to my IP addres.
So I decided to set up the reverse zone DNS information for my IP on my server, and get my domain comany to make it the nameserver for mydomain.com .
When all the reverse zone information was set up, I locally (on the server; locally to the server) can dig mydomain.com and it returns the server's IP address, the same one returned when dug locally. But when I do a reverse dig on 123.123.456.123 it doesn't return an answer section; only this:
Code:
; <<>> DiG 9.2.5 <<>> -x 123.123.456.123
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 17325
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;123.456.123.123.in-addr.arpa. IN PTR
;; AUTHORITY SECTION:
123.456.123.123.in-addr.arpa. 86400 IN SOA ns1.mydomain.com. hostmaster.mydomain.com. 200504082 28800 7200 2419200 86400
;; Query time: 3 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Fri Apr 8 12:20:56 2005
;; MSG SIZE rcvd: 109
This is really wierd; I can't see anything wrong with any of my zone files or my 'named.conf' files.
But it's probably something I have no idea about so here are my config files:
named.conf:
Code:
options
{
directory "/var/named";
allow-query { any; };
};
zone "."
{
type hint;
file "root.hints";
};
zone "0.0.127.in-addr.arpa"
{
type master;
file "pz/127.0.0";
};
zone "mydomain.com"
{
type master;
notify no;
file "pz/mydomain.com";
};
zone "123.456.123.123.in-addr.arpa"
{
type master;
notify no;
file "pz/123.456.123.123";
};
mydomain.com:
Code:
$TTL 3D
@ IN SOA ns1.mydomain.com. hostmaster.mydomain.com. (
200504082 ; serial, todays date + todays serial #
8H ; refresh, seconds
2H ; retry, seconds
4W ; expire, seconds
1D ) ; minimum, seconds
;
NS ns1.mydomain.com. ; Inet Address of name server
MX 10 mydomain.com. ; Primary Mail Exchanger
;
localhost A 127.0.0.1
ns1 A 123.123.456.123
mydomain.com. A 123.123.456.123
www A 123.123.456.123
and 123.456.123.123:
Code:
$TTL 3D
@ IN SOA ns1.mydomain.com. hostmaster.mydomain.com. (
200504082 ; Serial, todays date + todays serial
8H ; Refresh
2H ; Retry
4W ; Expire
1D) ; Minimum TTL
NS ns1.mydomain.com.
1 PTR ns1.mydomain.com.
2 PTR mydomain.com.
3 PTR www.mydomain.com.
In case I've done something else wrong in my DNS files, apart from this specific problem, I want enquiries to ns1.mydomain.com, mydomain.com and
www.mydomain.com to go to 123.456.123.123. I also want mail to go to that address.
And yes; all the files are set up in the correct directory. Everything works apart from the local reverse lookup of 123.456.123.123. resolv.conf is setup correctly also, as in:
Code:
search mydomain.com
nameserver 127.0.0.1
is all that's in there.
Anyone got any ideas?