Useful Commands

A list of commands / references I’ve found useful. Also see my old wiki page.

stdbuf – Run COMMAND, with modified buffering operations for its standard streams

See stdbuf – Run COMMAND, with modified buffering operations for its standard streams

Tracing the DNS glue record for a domain

To find the glue records (if any) for a domain use (for example):

dig +trace +additional positive-internet.com NS

This will give a full trace on how the NS records for the domain were found, and if they end up using a glue record it will be visible (only if +additional is given in the command) – for example in the lookup above we start with the global servers, then find the servers for .com. and then the next response contains the information from the .com. servers as to where to find positive-internet.com. data and this includes glue records:

$ dig +trace +additional positive-internet.com NS

; <<>> DiG 9.11.5-P4-5.1-Debian <<>> +trace +additional positive-internet.com NS
;; global options: +cmd
. 56582 IN NS a.root-servers.net.
. 56582 IN NS b.root-servers.net.
. 56582 IN NS c.root-servers.net.
. 56582 IN NS d.root-servers.net.
. 56582 IN NS e.root-servers.net.
. 56582 IN NS f.root-servers.net.
. 56582 IN NS g.root-servers.net.
. 56582 IN NS h.root-servers.net.
. 56582 IN NS i.root-servers.net.
. 56582 IN NS j.root-servers.net.
. 56582 IN NS k.root-servers.net.
. 56582 IN NS l.root-servers.net.
. 56582 IN NS m.root-servers.net.
. 56582 IN RRSIG NS 8 0 518400 20191215170000 20191202160000 22545 . SzJXRM/iygBQTO9QxQc80UDO85n+BW2VMHpgR40/QysYjztvE1hBWosV sn8nutFppr9hBw90c+gFuDDDoYnSTG0SBy7+Dma5eJCWuVOC67/szT4+ ZRg2ai0u2uQci71vh3sJ1yoOZjx0HkS0iDyZL/CLUtbc+GJ3Z1PMzkAr sEquado5d/OIPxdyhvnshKm5BGc4sAfeHX62omXu6VHe76sOUvZLIC7d z9pJG+W5KBaaaXELY3yJtnCcTTmYMreV90RNmkjFsZRvzHoo46+abquS ZFPxfE7pLRZB/lZn1oapuKtqf1I6x++LjgwrNfuvmb2w+CU7qa7Ek/16 Qn7hig==
;; Received 525 bytes from 8.8.4.4#53(8.8.4.4) in 2 ms

com. 172800 IN NS a.gtld-servers.net.
com. 172800 IN NS b.gtld-servers.net.
com. 172800 IN NS c.gtld-servers.net.
com. 172800 IN NS d.gtld-servers.net.
com. 172800 IN NS e.gtld-servers.net.
com. 172800 IN NS f.gtld-servers.net.
com. 172800 IN NS g.gtld-servers.net.
com. 172800 IN NS h.gtld-servers.net.
com. 172800 IN NS i.gtld-servers.net.
com. 172800 IN NS j.gtld-servers.net.
com. 172800 IN NS k.gtld-servers.net.
com. 172800 IN NS l.gtld-servers.net.
com. 172800 IN NS m.gtld-servers.net.
com. 86400 IN DS 30909 8 2 E2D3C916F6DEEAC73294E8268FB5885044A833FC5459588F4A9184CF C41A5766
com. 86400 IN RRSIG DS 8 1 86400 20191216050000 20191203040000 22545 . MVqSzDbsmBO7A5ZOZM+nsI6B/afLgrCqOMNCyfyPl5W8nBnv0VhpB1qr By6um9s9OgjJ/XRLtWfLYtIr5UPINMEbxY3OMyvdPCI4Tqe/kuG0hsCr iJM+X26kh+QTMQ4mpL1cj04SKek8f394KIAO0UeSeYvM/JQ9N4a0WdrT sHpDOUlssYvhnxR8LP1ZZGiCZz4ZRTpcdFJoRGBFyB4K3mSZDSpmoE7B fS3jz+ucDvZvXx39SO7kjvpQwhcaZRJBXauhY3AfCBH3PxZtRqZDzZrE BcOSXGu5+gXHA8YHxZ69ktZVRbGvOSEwGRr7vLYveeBIhitzf/V4Zn5z OHgUEw==
a.gtld-servers.net. 172800 IN A 192.5.6.30
b.gtld-servers.net. 172800 IN A 192.33.14.30
c.gtld-servers.net. 172800 IN A 192.26.92.30
d.gtld-servers.net. 172800 IN A 192.31.80.30
e.gtld-servers.net. 172800 IN A 192.12.94.30
f.gtld-servers.net. 172800 IN A 192.35.51.30
g.gtld-servers.net. 172800 IN A 192.42.93.30
h.gtld-servers.net. 172800 IN A 192.54.112.30
i.gtld-servers.net. 172800 IN A 192.43.172.30
j.gtld-servers.net. 172800 IN A 192.48.79.30
k.gtld-servers.net. 172800 IN A 192.52.178.30
l.gtld-servers.net. 172800 IN A 192.41.162.30
m.gtld-servers.net. 172800 IN A 192.55.83.30
a.gtld-servers.net. 172800 IN AAAA 2001:503:a83e::2:30
b.gtld-servers.net. 172800 IN AAAA 2001:503:231d::2:30
c.gtld-servers.net. 172800 IN AAAA 2001:503:83eb::30
d.gtld-servers.net. 172800 IN AAAA 2001:500:856e::30
e.gtld-servers.net. 172800 IN AAAA 2001:502:1ca1::30
f.gtld-servers.net. 172800 IN AAAA 2001:503:d414::30
g.gtld-servers.net. 172800 IN AAAA 2001:503:eea3::30
h.gtld-servers.net. 172800 IN AAAA 2001:502:8cc::30
i.gtld-servers.net. 172800 IN AAAA 2001:503:39c1::30
j.gtld-servers.net. 172800 IN AAAA 2001:502:7094::30
k.gtld-servers.net. 172800 IN AAAA 2001:503:d2d::30
l.gtld-servers.net. 172800 IN AAAA 2001:500:d937::30
m.gtld-servers.net. 172800 IN AAAA 2001:501:b1f9::30
;; Received 1181 bytes from 198.41.0.4#53(a.root-servers.net) in 2 ms

positive-internet.com. 172800 IN NS dns0.positive-internet.com.
positive-internet.com. 172800 IN NS dns1.positive-internet.com.
CK0POJMG874LJREF7EFN8430QVIT8BSM.com. 86400 IN NSEC3 1 1 0 - CK0Q1GIN43N1ARRC9OSM6QPQR81H5M9A NS SOA RRSIG DNSKEY NSEC3PARAM
CK0POJMG874LJREF7EFN8430QVIT8BSM.com. 86400 IN RRSIG NSEC3 8 2 86400 20191209054950 20191202043950 12163 com. S9i2P8sKc5s+dCJwh/UR7HlyuiRL5Iz6cCd3oPPV71iyHoYlqq7Q8qFO OVZj5tJP0BTXw9po8arg1iBmd5yJ7mpHCaVCKmY+dssg3fyfPlSl/lXd a4YL4xoHWNCa0Ow5Ywds7/AqtqDfhN0dnP6i+eaFD9rgrmfO6CVoto6B UYrEQbB2Es6vyUvE/ITtkZUI8wfOQjmLXp3jnQ7PUcWSdw==
9TGN6VUVFJDLIK48NOHMG6ADF00T2TE8.com. 86400 IN NSEC3 1 1 0 - 9TGQN4OD010J6U1VJTK17DQC41T443N8 NS DS RRSIG
9TGN6VUVFJDLIK48NOHMG6ADF00T2TE8.com. 86400 IN RRSIG NSEC3 8 2 86400 20191210064042 20191203053042 12163 com. Zw1RCTzYCr8hfCyDmR9WaP5+FVrZsVNYKXYdIMg2JxacvzBXptJ1EDxc fKzIueNxH/JKJX/Jx61VAcJP1vLR7lpaFjU3fu0C4OTjXs3LOFa8SVYf WUb1wZ1o3dwytPFgxUJLIFoNiQIaIatlteLdG1oFYWscOde/K8PGIf6k sZ0ZNCGunHE2RiBtAZSz6xuJOIlnlK68V++vNuxHdGoT9w==
dns0.positive-internet.com. 172800 IN A 80.87.128.65
dns1.positive-internet.com. 172800 IN A 80.87.136.65
;; Received 669 bytes from 192.31.80.30#53(d.gtld-servers.net) in 12 ms

positive-internet.com. 10800 IN NS dns0.positive-internet.com.
positive-internet.com. 10800 IN NS dns1.positive-internet.com.
dns0.positive-internet.com. 10800 IN A 80.87.128.65
dns1.positive-internet.com. 10800 IN A 80.87.136.65
;; Received 120 bytes from 80.87.128.65#53(dns0.positive-internet.com) in 8 ms

This is the penultimate block, the final block is the response from one of the above highlighted servers with the final query response.

In comparison, bjdean.id.au does not have glue records because I’m using FastMail DNS – in this case the trace does not indicate in glue records and ends:

bjdean.id.au. 900 IN NS ns2.messagingengine.com.
 bjdean.id.au. 900 IN NS ns1.messagingengine.com.
 34u1ge5tcesltvlop9rnir9p77pkbs56.id.au. 900 IN NSEC3 1 1 1 D399EAAB 3A52251DEQT6EVMJ349FGHMU3VS2QCDT NS SOA RRSIG DNSKEY NSEC3PARAM
 34u1ge5tcesltvlop9rnir9p77pkbs56.id.au. 900 IN RRSIG NSEC3 8 3 900 20190226231724 20190205221724 41808 id.au. D+k4Kkv4VYF1np67H5udk1Xe7Q6gs+xXGRoAX7wO4tQH/co/CKnfanh2 S0sDjiRKe6h/fNUhbSG7yzRTVB2hnPjzEVIstqahz7dyHyrzlXe1lM50 e7MOWaB0jho7xCkY8s7pnqa7NdPoBJouMIuMWO5hnD0F/OFcXU+DHL+Q /hM=
 j1ss22o2o4fd0u80kpaa2hpb762rnh1k.id.au. 900 IN NSEC3 1 1 1 D399EAAB K55H9U7SS2SKE5FCUHU61RFCE9BRMA1Q NS DS RRSIG
 j1ss22o2o4fd0u80kpaa2hpb762rnh1k.id.au. 900 IN RRSIG NSEC3 8 3 900 20190222162327 20190201152327 41808 id.au. A40Lzoo7MXF4EpSvSvTCq8nTikkgp95YJfPmMwTB9/SFL2HICko3EStF +bE1XgYWV3zPemAMERV6P+oTys8XSTXzWYu36zxJ9qQMk09phC/rFzzt t54q3XpDzAB1GevlTZ3YjX+NfwveBmexu7U1qjEoxOOMsiz+jcb+nl7p RlM=
 ;; Received 593 bytes from 65.22.196.1#53(q.au) in 530 ms

bjdean.id.au. 3600 IN NS ns2.messagingengine.com.
bjdean.id.au. 3600 IN NS ns1.messagingengine.com.
ns2.messagingengine.com. 3600 IN A 162.159.25.191
ns1.messagingengine.com. 3600 IN A 162.159.24.178
 ;; Received 128 bytes from 162.159.25.191#53(ns2.messagingengine.com) in 280 ms

 

Leave a Reply

Your email address will not be published. Required fields are marked *