networking:dns
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| networking:dns [2022/11/07 17:09] – oscar | networking:dns [2023/08/26 07:01] (current) – oscar | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| ===== Querying DNS services ===== | ===== Querying DNS services ===== | ||
| Using dig command you can query DNS name servers for your DNS lookup related tasks. Dig stands for domain information groper. | Using dig command you can query DNS name servers for your DNS lookup related tasks. Dig stands for domain information groper. | ||
| - | === Simple query === | + | ==== Simple query ==== |
| Standard query using the default DNS server configured on your system | Standard query using the default DNS server configured on your system | ||
| < | < | ||
| Line 36: | Line 36: | ||
| * **ADDITIONAL SECTION**: This displays the ip address of the name servers listed in the AUTHORITY SECTION. | * **ADDITIONAL SECTION**: This displays the ip address of the name servers listed in the AUTHORITY SECTION. | ||
| * **Stats section** at the bottom displays few dig command statistics including how much time it took to execute this query | * **Stats section** at the bottom displays few dig command statistics including how much time it took to execute this query | ||
| - | === Use specific DNS server === | + | ==== Use specific DNS server |
| By default dig uses the DNS servers defined in your **/ | By default dig uses the DNS servers defined in your **/ | ||
| - | === Short Output Using dig +short === | + | For example use directly the name server of TransIP (ns0.transip.net): |
| + | dig +short TXT @ns0.transip.net. oscardegroot.nl | ||
| + | ==== Short Output Using dig +short | ||
| To view just the ip-address of a web site (i.e the A record), use the short form option as shown below. | To view just the ip-address of a web site (i.e the A record), use the short form option as shown below. | ||
| < | < | ||
| Line 45: | Line 47: | ||
| 83.86.60.198 | 83.86.60.198 | ||
| </ | </ | ||
| - | === Limit output to specific section === | + | ==== Limit output to specific section |
| The response can be limited to any of the sections. E.g. the next only displays the ANSWER SECTION. | The response can be limited to any of the sections. E.g. the next only displays the ANSWER SECTION. | ||
| < | < | ||
| Line 54: | Line 56: | ||
| oscardegroot.nl. | oscardegroot.nl. | ||
| </ | </ | ||
| - | === Query Record types === | + | ==== Query Record types ==== |
| With the -t option you can select a specific record type. This is one of: **a, any, mx, ns, soa, hinfo, axfr, txt**. The default is: a. Be aware that not all DNS servers have copies of all the records locally. So if this query return incomplete info, use a different DNS server. | With the -t option you can select a specific record type. This is one of: **a, any, mx, ns, soa, hinfo, axfr, txt**. The default is: a. Be aware that not all DNS servers have copies of all the records locally. So if this query return incomplete info, use a different DNS server. | ||
| < | < | ||
| Line 80: | Line 82: | ||
| oscardegroot.nl. | oscardegroot.nl. | ||
| </ | </ | ||
| - | === DNS Reverse Look-up === | + | ==== DNS Reverse Look-up |
| To perform a DNS reverse look up using the ip-address using dig -x as shown below. For example, if you just have an external ip-address and would like to know the website that belongs to it, do the following. | To perform a DNS reverse look up using the ip-address using dig -x as shown below. For example, if you just have an external ip-address and would like to know the website that belongs to it, do the following. | ||
| < | < | ||
| Line 92: | Line 94: | ||
| </ | </ | ||
| ===== Monitor DNS requests ===== | ===== Monitor DNS requests ===== | ||
| + | < | ||
| + | tcpdump -i wlan0 -n -s 0 port 53 | grep fdxx: | ||
| + | </ | ||
| < | < | ||
| script -q -c "sudo tcpdump -l port 53 2>/ | script -q -c "sudo tcpdump -l port 53 2>/ | ||
| </ | </ | ||
networking/dns.1667840962.txt.gz · Last modified: by oscar
