|
The Hosts tab allows you to add, edit, or remove hosts to or from the /etc/hosts file. This file contains IP addresses and their corresponding hostnames. When your system tries to resolve a hostname to an IP address or determine the hostname for an IP address, it refers to the /etc/hosts file before using the nameservers (if you are using the default Red Hat Linux configuration). If the IP address is listed in the /etc/hosts file, the nameservers are not used. If your network contains computers whose IP addresses are not listed in DNS, it is recommended that you add them to the /etc/hosts file.
To add an entry to the /etc/hosts file, click Add in the Hosts tab, provide the requested information, and click OK. Click Apply to write the entry to the file.
Warning | Do not remove the localhost entry. |
Tip | To change lookup order, edit the /etc/host.conf file. The line order hosts, bind specifies that the /etc/hosts file takes precedence over the nameservers. Changing the line to order bind, hosts configures your system to resolve hostnames and IP addresses using the nameservers first. If the IP address cannot be resolved through the nameservers, your system looks for the IP address in the /etc/hosts file. |
|