Every program which needs to map between URL and IP address (gethostbyname
and such) will use /etc/hosts
and DNS. The order is configurable via nsswitch.conf
.
When is it ok to assume /etc/hosts file will be used
Domanda
This may be a bit of an open ended question, and truth be told I would prefer an exhaustive list, however, this has been bugging me for a while: When is it ok for me to assume a program will use the hostnames specified in /etc/hosts
?
Will any of these programs use it?
- ssh (via
~/.ssh/config
) YES - dhcp (via
/etc/dhcp/dhcpd.conf
) YES - iptables ?
Soluzione
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow