Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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 ?
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?
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.
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?
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$
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.
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.)
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.