Linux/DNS: Difference between revisions
Appearance
< Linux
No edit summary |
|||
| Line 1: | Line 1: | ||
== host (scripting) == | == host (scripting) == | ||
== dig (testing) == | == dig (testing) == | ||
| Line 22: | Line 19: | ||
* Trace DNS path | * Trace DNS path | ||
<pre>dig google.com +trace</pre> | <pre>dig google.com +trace</pre> | ||
== nslookup == | |||
<pre> | |||
nslookup google.com | |||
nslookup -query=ANY google.com | |||
<pre> | |||
== DNS entry == | == DNS entry == | ||
Revision as of 09:39, 8 April 2019
host (scripting)
dig (testing)
- install
apt install dnsutils
- Basic query
dig google.com
- Query all record types
dig google.com ANY
- Query specific DNS server
dig google.de @8.8.8.8
- Reverse DNS lookup
dig -x 193.99.144.80
- Trace DNS path
dig google.com +trace
nslookup
nslookup google.com
nslookup -query=ANY google.com
<pre>
== DNS entry ==
<pre>
$TTL 86400
@ IN SOA ns1.first-ns.de. postmaster.robot.first-ns.de. (
2000091604 ; Serial
14400 ; Refresh
1800 ; Retry
604800 ; Expire
86400 ) ; Minimum
@ IN NS ns1.first-ns.de.
@ IN NS robotns2.second-ns.de.
@ IN NS robotns3.second-ns.com.
localhost IN A 127.0.0.1
@ IN A 1.2.3.4
www IN A 2.3.4.5
www IN AAAA 2001:db8::1
mail IN A 2.3.4.5
loopback IN CNAME localhost
pop IN CNAME www
smtp IN CNAME www
relay IN CNAME www
imap IN CNAME www
ftp 3600 IN CNAME ftp.anderedomain.de.
@ IN MX 10 mail
technik IN A 5.6.7.8
technik IN MX 10 technik
@ IN TXT "v=spf1 mx -all"
DNS entry types
- ANY (all types)
- A (Host address)
- AAAA (IPv6 host address)
- ALIAS (Auto resolved alias)
- CNAME (Canonical name for an alias)
- MX (Mail eXchange)
- NS (Name Server)
- PTR (Pointer)
- SOA (Start Of Authority)
$TTL 86400 @ IN SOA ns1.first-ns.de. postmaster.robot.first-ns.de. ( 2000091604 ; Serial 14400 ; Refresh 1800 ; Retry 604800 ; Expire 86400 ) ; Minimum
- SRV (location of service)
- TXT (Descriptive text)