Linux/DNS: Difference between revisions

From Wiki
No edit summary
No edit summary
Line 24: Line 24:


== entry types ==
== entry types ==
<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"
</pre>
* A (Host address)
* A (Host address)
* AAAA (IPv6 host address)
* AAAA (IPv6 host address)
Line 32: Line 66:
* PTR (Pointer)
* PTR (Pointer)
* SOA (Start Of Authority)
* SOA (Start Of Authority)
**
<blockquote>
<pre>
$TTL 86400
@ IN SOA ns1.first-ns.de. postmaster.robot.first-ns.de. (
2000091604  ; Serial
14400      ; Refresh
1800        ; Retry
604800      ; Expire
86400  )    ; Minimum
</pre>
</blockquote>
* SRV (location of service)
* SRV (location of service)
* TXT (Descriptive text)
* TXT (Descriptive text)

Revision as of 09:06, 8 April 2019

host

nslookup

dig

  • 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

entry types

$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"
  • 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)