I know this is a basic topic, and I have set these up many a time in simple environements and gotten the machine to work but I wanted to ask the forum about this question since I have read several help files online that have not really NAILED DOWN my question on /etc/hosts in a way in which I may want to use it.
I'm looking for the best practice in setting up the /etc/hosts for a linux box called "linuxserv" with an internal domain of abc.com and external domain of xyz.com.
Heres how I set up a basic system, IS IT WRONG TO GIVE IT TWO NAMES THAT POINT TO 127.0.0.1?
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
127.0.0.1 linuxserv.abc.com linuxserv
What about adding the internal IP address of the system like so, DOES THE FORMAT BELOW LOOK ACCEPTABLE?
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
127.0.0.1 linuxserv.abc.com linuxserv
192.168.1.2 linuxserv.abc.com linuxserv
Now lets say linuxserv also had a second network interface that links to the external network. What about adding the external IP address of the system like so, DOES THE FORMAT BELOW LOOK ACCEPTABLE?
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
127.0.0.1 linuxserv.abc.com linuxserv
192.168.1.2 linuxserv.abc.com linuxserv
234.X.X.X linuxserv.xyz.com linuxserv
What would make any of these unacceptable, or wrong in a best practice environement?