DNS: Difference between revisions
Jump to navigation
Jump to search
Created page with "Domain Name Service. Bind a name to IP-addresses. Disable resolving IPv6 addresses by editing /etc/default/bind9 to have <code>OPTIONS="-4 -u bind"</code>" |
No edit summary |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
[[Category:Networking]] | |||
[[Category:Linux/Unix]] | |||
Domain Name Service. Bind a name to IP-addresses. | Domain Name Service. Bind a name to IP-addresses. | ||
=Server side= | |||
Zone transfer between master and slave server is on TCP port 53. | |||
Disable resolving IPv6 addresses by editing /etc/default/bind9 to have <code>OPTIONS="-4 -u bind"</code> | Disable resolving IPv6 addresses by editing /etc/default/bind9 to have <code>OPTIONS="-4 -u bind"</code> | ||
=Client side= | |||
Clients query the nameserver on UDP port 53. | |||
;host <hostname or IPaddress> | |||
:Resolve hostname to IPadddres or IPaddress to hostname | |||
;host <host or IP> <nameserver> | |||
:Resolve using the specified nameserver | |||
;dig <hostname> @<nameserver> | |||
:Resolve hostname with extra info from the optinoal <nameserver> | |||
;/etc/resolv.conf | |||
<syntaxhighlight lang=text> | |||
options timeout:1 attempts:1 rotate | |||
nameserver <dns-server1 IP> | |||
nameserver <dns-server2 IP> | |||
options <interface> | |||
search <default search domain> | |||
</syntaxhighlight> | |||
;If the systemd-resolved is active | |||
/etc/resolv.conf has 127.0.0.53 as nameserver | |||
;resolvectl status | |||
:Show which nameservers are used by the systemd-resolved | |||
Latest revision as of 15:13, 18 May 2026
Domain Name Service. Bind a name to IP-addresses.
Server side
Zone transfer between master and slave server is on TCP port 53.
Disable resolving IPv6 addresses by editing /etc/default/bind9 to have OPTIONS="-4 -u bind"
Client side
Clients query the nameserver on UDP port 53.
- host <hostname or IPaddress>
- Resolve hostname to IPadddres or IPaddress to hostname
- host <host or IP> <nameserver>
- Resolve using the specified nameserver
- dig <hostname> @<nameserver>
- Resolve hostname with extra info from the optinoal <nameserver>
- /etc/resolv.conf
options timeout:1 attempts:1 rotate
nameserver <dns-server1 IP>
nameserver <dns-server2 IP>
options <interface>
search <default search domain>
- If the systemd-resolved is active
/etc/resolv.conf has 127.0.0.53 as nameserver
- resolvectl status
- Show which nameservers are used by the systemd-resolved