Hi Terry,
At the meeting last night you used a command to discover the IP
address of your domain. Â Paul just asked me what it was, but all I
could remember was that it was a TLA something like git, (but not
git).
It was dig(1); domain information groper. Here's some examples to send
onto Paul.
$ dig google.com
; DiG 9.4.2-P2.1 google.com
;; global options: printcmd
;; Got answer:
;; -HEADER- opcode: QUERY, status: NOERROR, id: 29412
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;google.com.IN A
;; ANSWER SECTION:
google.com. 161 IN A 74.125.230.80
google.com. 161 IN A 74.125.230.82
google.com. 161 IN A 74.125.230.84
google.com. 161 IN A 74.125.230.81
google.com. 161 IN A 74.125.230.83
;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Wed Jan 12 08:50:00 2011
;; MSG SIZE rcvd: 108
$
$ dig +short google.com # More terse.
74.125.230.83
74.125.230.80
74.125.230.82
74.125.230.84
74.125.230.81
$
$ dig +short google.com mx # Want MX records instead of default A.
400 google.com.s9b2.psmtp.com.
100 google.com.s9a1.psmtp.com.
300 google.com.s9b1.psmtp.com.
200 google.com.s9a2.psmtp.com.
$
$ dig +short google.com soa
ns1.google.com. dns-admin.google.com. 1438691 7200 1800 1209600 300
$
$ dig +multiline google.com soa # Explain SOA numbers.
; DiG 9.4.2-P2.1 +multiline google.com soa
;; global options: printcmd
;; Got answer:
;; -HEADER- opcode: QUERY, status: NOERROR, id: 58553
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;google.com.IN SOA
;; ANSWER SECTION:
google.com. 57 IN SOA ns1.google.com. dns-admin.google.com. (
1438691; serial
7200 ; refresh (2 hours)
1800 ; retry (30 minutes)
1209600; expire (2 weeks)
300; minimum (5 minutes)
)
;; Query time: 81 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Wed Jan 12 08:50:33 2011
;; MSG SIZE rcvd: 78
$
$ dig +short google.com ns # Get nameservers.
ns1.google.com.
ns3.google.com.
ns2.google.com.
ns4.google.com.
$
$ dig +short @ns2.google.com google.com txt # Send query to particular NS.
v=spf1 include:_netblocks.google.com ip4:216.73.93.70/31
ip4:216.73.93.72/31 ~all
$
nslookup(1) predates dig but dig is more commonly used these days.
Cheers,
Ralph.
--
Next meeting: Bournemouth, Tue or Wed 2011-02-?? 20:00
Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/
How to Report Bugs Effectively: http://goo.gl/4Xue