LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-27-2012, 10:03 AM   #1
slacker_et
Member
 
Registered: Dec 2009
Distribution: Slackware
Posts: 138

Rep: Reputation: 27
Question PTR record suddenly not being returned


Hello,

For years I've run servers for my domain using my own Linux machines at home. All the services; named, http, mail, etc..; are run locally on my machines.
There are PTR records setup for my static ip addresses.

Recently outgoing mail started failing.
And I noticed it's because my Linux machines are unable to obtain the PTR record for my ip addresses.
When executing "host ip_address", "nslookup ip_adress", or "dig -x ip_address" on my machines. All commands fail to find the PTR record.
But executing those same commands on machines other than my own (ie outside of my network) do return the PTR record.

Although I recently upgraded the hardware of one of my machines.
(new motherboard)
I have not made any software changes on any of my machines.

What could cause my machines to suddenly fail to obtain PTR records for my ip addresses ?
 
Old 09-27-2012, 12:05 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
PTR records are generally used for IPs (reverse lookups) whereas A, CNAME and other records are used for names (forward lookups).

When you register a domain you tell the registrar what to use for DNS servers (typically your own if you have them). That would insure all foward lookups are sent to your DNS servers. However the registrar has nothing to do with the IP (unless they also happen to be your ISP). This means that you ALSO have to tell your ISP to delegate name resolution to your DNS servers.

Your case is odd in that you say it works externally but not internally. That seems to imply your ISP is providing PTR records in their DNS servers but you are somehow preventing lookups from going to the ISP.

Have you tried running dig +trace externally? Internally?

Have you tried specifying your name server after the "dig -x <ip>" so it is "dig -x <ip> <nameserver>"? Do you get different results?
 
Old 09-27-2012, 12:24 PM   #3
slacker_et
Member
 
Registered: Dec 2009
Distribution: Slackware
Posts: 138

Original Poster
Rep: Reputation: 27
Quote:
Originally Posted by MensaWater View Post
PTR records are generally used for IPs (reverse lookups) whereas A, CNAME and other records are used for names (forward lookups).

When you register a domain you tell the registrar what to use for DNS servers (typically your own if you have them). That would insure all foward lookups are sent to your DNS servers. However the registrar has nothing to do with the IP (unless they also happen to be your ISP). This means that you ALSO have to tell your ISP to delegate name resolution to your DNS servers.

Your case is odd in that you say it works externally but not internally. That seems to imply your ISP is providing PTR records in their DNS servers but you are somehow preventing lookups from going to the ISP.

Have you tried running dig +trace externally? Internally?

Have you tried specifying your name server after the "dig -x <ip>" so it is "dig -x <ip> <nameserver>"? Do you get different results?
I've noticed that if I specify a nameserver other than my own machine; either by specifying it on the cmd line or modifying /etc/resolv.conf; then a PTR record is returned.
But I've made absolutely no changes to my nameserver or bind configurations.
And in the past my PTR record would be returned.

Very confusing.
 
Old 09-27-2012, 12:42 PM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Quote:
Originally Posted by slacker_et View Post
I've noticed that if I specify a nameserver other than my own machine; either by specifying it on the cmd line or modifying /etc/resolv.conf; then a PTR record is returned.
So if you DO specify your own nameserver on command line it does NOT give the PTR record?

Did you try the "dig +trace -x <IP>"?
 
Old 09-27-2012, 01:01 PM   #5
slacker_et
Member
 
Registered: Dec 2009
Distribution: Slackware
Posts: 138

Original Poster
Rep: Reputation: 27
Quote:
Originally Posted by MensaWater View Post
So if you DO specify your own nameserver on command line it does NOT give the PTR record?

Did you try the "dig +trace -x <IP>"?
Correct; specifying my own nameserver does NOT give the PTR record.

Here is the difference dig specifying my isp's nameserver and my nameserver:
Code:
ns$ dig +trace -x 216.178.73.3 ns1.netcarrier.net

; <<>> DiG 9.4.2 <<>> +trace -x 216.178.73.3 ns1.netcarrier.net
;; global options:  printcmd
.                       514595  IN      NS      b.root-servers.net.
.                       514595  IN      NS      f.root-servers.net.
.                       514595  IN      NS      e.root-servers.net.
.                       514595  IN      NS      g.root-servers.net.
.                       514595  IN      NS      c.root-servers.net.
.                       514595  IN      NS      d.root-servers.net.
.                       514595  IN      NS      j.root-servers.net.
.                       514595  IN      NS      i.root-servers.net.
.                       514595  IN      NS      l.root-servers.net.
.                       514595  IN      NS      k.root-servers.net.
.                       514595  IN      NS      h.root-servers.net.
.                       514595  IN      NS      m.root-servers.net.
.                       514595  IN      NS      a.root-servers.net.
;; Received 512 bytes from 10.0.0.13#53(10.0.0.13) in 2 ms

in-addr.arpa.           172800  IN      NS      b.in-addr-servers.arpa.
in-addr.arpa.           172800  IN      NS      e.in-addr-servers.arpa.
in-addr.arpa.           172800  IN      NS      f.in-addr-servers.arpa.
in-addr.arpa.           172800  IN      NS      c.in-addr-servers.arpa.
in-addr.arpa.           172800  IN      NS      a.in-addr-servers.arpa.
in-addr.arpa.           172800  IN      NS      d.in-addr-servers.arpa.
;; Received 419 bytes from 192.228.79.201#53(b.root-servers.net) in 356 ms

216.in-addr.arpa.       86400   IN      NS      r.arin.net.
216.in-addr.arpa.       86400   IN      NS      t.arin.net.
216.in-addr.arpa.       86400   IN      NS      u.arin.net.
216.in-addr.arpa.       86400   IN      NS      v.arin.net.
216.in-addr.arpa.       86400   IN      NS      w.arin.net.
216.in-addr.arpa.       86400   IN      NS      x.arin.net.
216.in-addr.arpa.       86400   IN      NS      y.arin.net.
216.in-addr.arpa.       86400   IN      NS      z.arin.net.
;; Received 179 bytes from 199.253.183.183#53(b.in-addr-servers.arpa) in 201 ms

73.178.216.in-addr.arpa. 86400  IN      NS      ns1.netcarrier.net.
73.178.216.in-addr.arpa. 86400  IN      NS      ns2.netcarrier.net.
;; Received 93 bytes from 72.52.71.2#53(w.arin.net) in 195 ms

3.73.178.216.in-addr.arpa. 3600 IN      PTR     ns.trimmer.org.
73.178.216.in-addr.arpa. 3600   IN      NS      ns2.netcarrier.net.
73.178.216.in-addr.arpa. 3600   IN      NS      ns1.netcarrier.net.
;; Received 153 bytes from 216.178.92.114#53(ns2.netcarrier.net) in 214 ms

.                       514594  IN      NS      b.root-servers.net.
.                       514594  IN      NS      a.root-servers.net.
.                       514594  IN      NS      e.root-servers.net.
.                       514594  IN      NS      k.root-servers.net.
.                       514594  IN      NS      h.root-servers.net.
.                       514594  IN      NS      c.root-servers.net.
.                       514594  IN      NS      l.root-servers.net.
.                       514594  IN      NS      m.root-servers.net.
.                       514594  IN      NS      g.root-servers.net.
.                       514594  IN      NS      j.root-servers.net.
.                       514594  IN      NS      f.root-servers.net.
.                       514594  IN      NS      d.root-servers.net.
.                       514594  IN      NS      i.root-servers.net.
;; Received 512 bytes from 10.0.0.13#53(10.0.0.13) in 2 ms

net.                    172800  IN      NS      g.gtld-servers.net.
net.                    172800  IN      NS      h.gtld-servers.net.
net.                    172800  IN      NS      b.gtld-servers.net.
net.                    172800  IN      NS      c.gtld-servers.net.
net.                    172800  IN      NS      i.gtld-servers.net.
net.                    172800  IN      NS      f.gtld-servers.net.
net.                    172800  IN      NS      e.gtld-servers.net.
net.                    172800  IN      NS      m.gtld-servers.net.
net.                    172800  IN      NS      k.gtld-servers.net.
net.                    172800  IN      NS      l.gtld-servers.net.
net.                    172800  IN      NS      a.gtld-servers.net.
net.                    172800  IN      NS      j.gtld-servers.net.
net.                    172800  IN      NS      d.gtld-servers.net.
;; Received 493 bytes from 192.112.36.4#53(g.root-servers.net) in 767 ms

netcarrier.net.         172800  IN      NS      ns1.netcarrier.net.
netcarrier.net.         172800  IN      NS      ns2.netcarrier.net.
;; Received 100 bytes from 192.33.14.30#53(b.gtld-servers.net) in 280 ms

ns1.netcarrier.net.     10800   IN      A       216.178.92.98
netcarrier.net.         10800   IN      NS      ns2.netcarrier.net.
netcarrier.net.         10800   IN      NS      ns1.netcarrier.net.
;; Received 100 bytes from 216.178.92.98#53(ns1.netcarrier.net) in 185 ms

ns$ 







ns$ dig +trace -x 216.178.73.3 localhost

; <<>> DiG 9.4.2 <<>> +trace -x 216.178.73.3 localhost
;; global options:  printcmd
.                       514581  IN      NS      i.root-servers.net.
.                       514581  IN      NS      a.root-servers.net.
.                       514581  IN      NS      c.root-servers.net.
.                       514581  IN      NS      e.root-servers.net.
.                       514581  IN      NS      m.root-servers.net.
.                       514581  IN      NS      l.root-servers.net.
.                       514581  IN      NS      j.root-servers.net.
.                       514581  IN      NS      b.root-servers.net.
.                       514581  IN      NS      d.root-servers.net.
.                       514581  IN      NS      k.root-servers.net.
.                       514581  IN      NS      f.root-servers.net.
.                       514581  IN      NS      g.root-servers.net.
.                       514581  IN      NS      h.root-servers.net.
;; Received 288 bytes from 10.0.0.13#53(10.0.0.13) in 2 ms

in-addr.arpa.           172800  IN      NS      a.in-addr-servers.arpa.
in-addr.arpa.           172800  IN      NS      b.in-addr-servers.arpa.
in-addr.arpa.           172800  IN      NS      c.in-addr-servers.arpa.
in-addr.arpa.           172800  IN      NS      d.in-addr-servers.arpa.
in-addr.arpa.           172800  IN      NS      e.in-addr-servers.arpa.
in-addr.arpa.           172800  IN      NS      f.in-addr-servers.arpa.
;; Received 419 bytes from 199.7.83.42#53(l.root-servers.net) in 346 ms

216.in-addr.arpa.       86400   IN      NS      r.arin.net.
216.in-addr.arpa.       86400   IN      NS      t.arin.net.
216.in-addr.arpa.       86400   IN      NS      u.arin.net.
216.in-addr.arpa.       86400   IN      NS      v.arin.net.
216.in-addr.arpa.       86400   IN      NS      w.arin.net.
216.in-addr.arpa.       86400   IN      NS      x.arin.net.
216.in-addr.arpa.       86400   IN      NS      y.arin.net.
216.in-addr.arpa.       86400   IN      NS      z.arin.net.
;; Received 179 bytes from 196.216.169.10#53(c.in-addr-servers.arpa) in 465 ms

73.178.216.in-addr.arpa. 86400  IN      NS      ns1.netcarrier.net.
73.178.216.in-addr.arpa. 86400  IN      NS      ns2.netcarrier.net.
;; Received 93 bytes from 63.243.194.2#53(v.arin.net) in 195 ms

3.73.178.216.in-addr.arpa. 3600 IN      PTR     ns.trimmer.org.
73.178.216.in-addr.arpa. 3600   IN      NS      ns2.netcarrier.net.
73.178.216.in-addr.arpa. 3600   IN      NS      ns1.netcarrier.net.
;; Received 153 bytes from 216.178.92.114#53(ns2.netcarrier.net) in 203 ms

.                       514580  IN      NS      g.root-servers.net.
.                       514580  IN      NS      l.root-servers.net.
.                       514580  IN      NS      h.root-servers.net.
.                       514580  IN      NS      j.root-servers.net.
.                       514580  IN      NS      c.root-servers.net.
.                       514580  IN      NS      m.root-servers.net.
.                       514580  IN      NS      a.root-servers.net.
.                       514580  IN      NS      b.root-servers.net.
.                       514580  IN      NS      d.root-servers.net.
.                       514580  IN      NS      i.root-servers.net.
.                       514580  IN      NS      f.root-servers.net.
.                       514580  IN      NS      e.root-servers.net.
.                       514580  IN      NS      k.root-servers.net.
;; Received 288 bytes from 10.0.0.13#53(10.0.0.13) in 2 ms

.                       86400   IN      SOA     a.root-servers.net. nstld.verisign-grs.com. 2012092701 1800 900 604800 86400
;; Received 102 bytes from 192.36.148.17#53(i.root-servers.net) in 997 ms

ns$
 
Old 09-27-2012, 03:20 PM   #6
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
When you do the +trace do NOT specify a name server as the +trace tells it to go to the root servers and trace from there.

My question was what happens if you the the dig -x <ip> <nameserver>?

Note that "localhost" is a special pointer to 127.0.0.1. Specifying localhost as your nameserver implies that you are running the DNS server on the host from which you're attempting to do the dig. That is to say while using localhost might be valid from your actual DNS server (running BIND or a similar product) it would NOT be valid on other servers in your environment. Those servers should resolve from your actual DNS server. For it to be valid on your localhost for the DNS server itself you'd have to insure the configuration allowed for digs on the lo interface.

My question wasn't what happens if you say "dig -x <ip> localhost" but rather what happens if you do it specifying the name or IP of the name server as nameserver to query.
 
Old 09-27-2012, 07:29 PM   #7
slacker_et
Member
 
Registered: Dec 2009
Distribution: Slackware
Posts: 138

Original Poster
Rep: Reputation: 27
Sorry; I misunderstood.
I am running the DNS server on the host from which I'm attempting to do the dig.
Here is the output specifying the server via both name and ip.
(And btw; thanks for helping.)

Code:
ns$ dig -x 216.178.73.3 ns.trimmer.org

; <<>> DiG 9.4.2 <<>> -x 216.178.73.3 ns.trimmer.org
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 210
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;3.73.178.216.in-addr.arpa.	IN	PTR

;; AUTHORITY SECTION:
3.73.178.216.in-addr.arpa. 2592000 IN	SOA	et.trimmer.org. root.et.trimmer.org. 10099 43200 3600 3600000 2592000

;; Query time: 2 msec
;; SERVER: 10.0.0.13#53(10.0.0.13)
;; WHEN: Thu Sep 27 20:22:47 2012
;; MSG SIZE  rcvd: 98

;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58128
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 1

;; QUESTION SECTION:
;ns.trimmer.org.			IN	A

;; ANSWER SECTION:
ns.trimmer.org.		2592000	IN	A	216.178.73.3

;; AUTHORITY SECTION:
trimmer.org.		2592000	IN	NS	ns.trimmer.org.
trimmer.org.		2592000	IN	NS	et.trimmer.org.

;; ADDITIONAL SECTION:
et.trimmer.org.		2592000	IN	A	216.15.65.99

;; Query time: 1 msec
;; SERVER: 10.0.0.13#53(10.0.0.13)
;; WHEN: Thu Sep 27 20:22:47 2012
;; MSG SIZE  rcvd: 95

ns$ dig -x 216.178.73.3 216.178.73.3  

; <<>> DiG 9.4.2 <<>> -x 216.178.73.3 216.178.73.3
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43523
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;3.73.178.216.in-addr.arpa.	IN	PTR

;; AUTHORITY SECTION:
3.73.178.216.in-addr.arpa. 2592000 IN	SOA	et.trimmer.org. root.et.trimmer.org. 10099 43200 3600 3600000 2592000

;; Query time: 2 msec
;; SERVER: 10.0.0.13#53(10.0.0.13)
;; WHEN: Thu Sep 27 20:23:17 2012
;; MSG SIZE  rcvd: 98

;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 61939
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;216.178.73.3.			IN	A

;; AUTHORITY SECTION:
.			10800	IN	SOA	a.root-servers.net. nstld.verisign-grs.com. 2012092701 1800 900 604800 86400

;; Query time: 315 msec
;; SERVER: 10.0.0.13#53(10.0.0.13)
;; WHEN: Thu Sep 27 20:23:17 2012
;; MSG SIZE  rcvd: 105

ns$
 
Old 09-28-2012, 08:47 AM   #8
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
My bad - I told you to do "dig <whatever> <nameserver>" - it should actually be "dig <whatever> @<nameserver>" to specify which name server to use for resolution.

When I do digs from here for your domain and your IP I get both the ptr and the A record.
 
Old 09-28-2012, 04:22 PM   #9
slacker_et
Member
 
Registered: Dec 2009
Distribution: Slackware
Posts: 138

Original Poster
Rep: Reputation: 27
Hmmm; then I must have changed something recently (past couple months ?) without realizing it.
Because I know my own machines use to be able to verify their PTR record for themselves and from themselves.
I wonder if my provider changed something.

Anyway; thanks for helping.
If I stumble across the cause; I'll post it here and marked this thread as SOLVED.
I can't be the only person who's ever experienced this issue.

Thanks again.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] DNS: A Record and PTR Record hydraMax Linux - Server 4 12-21-2010 10:28 PM
How can i create Ptr Record? epamuk Linux - General 2 03-09-2010 12:26 AM
DDNS record and a static PTR record mou5e Linux - Networking 2 01-22-2008 01:16 AM
PTR record OTIM Linux - Server 3 11-22-2007 12:16 PM
Creating A record and PTR record daemonkl *BSD 3 10-03-2007 04:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration