Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
37
rated 0 times [  37] [ 0]  / answers: 1 / hits: 130205  / 3 Years ago, sat, may 22, 2021, 12:53:50

Can anybody explain to me about the dns-search directive in /etc/network/interfaces file:



iface eth0 inet static
address 192.168.3.3
netmask 255.255.255.0
gateway 192.168.3.1
dns-search example.com
dns-nameservers 192.168.3.45 192.168.8.10


Is it mandatory? And how can I configure it?


More From » networking

 Answers
7

dns-search determines which domain is appended for dns lookups.



Normally you will specify here the same domain as returned by hostname -f.



For detailed information see the following quote from man resolv.conf:



search Search list for host-name lookup.
The search list is normally determined from the local domain name; by
default, it contains only the local domain name. This may be changed by listing
the desired domain search path following the search keyword with spaces or tabs
separating the names. Resolver queries having fewer than ndots dots (default
is 1) in them will be attempted using each component of the search path in turn
until a match is found. For environments with multiple subdomains please read
options ndots:n below to avoid man-in-the-middle attacks and unnecessary traffic
for the root-dns-servers. Note that this process may be slow and will generate
a lot of network traffic if the servers for the listed domains are not local,
and that queries will time out if no server is available for one of the domains.

The search list is currently limited to six domains with a total of 256 characters.

[#32291] Saturday, May 22, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
looweets

Total Points: 52
Total Questions: 114
Total Answers: 111

Location: Turkmenistan
Member since Sat, Apr 16, 2022
2 Years ago
looweets questions
Fri, Apr 29, 22, 09:47, 2 Years ago
Thu, Nov 3, 22, 03:32, 2 Years ago
Sun, Mar 5, 23, 00:43, 1 Year ago
;