I know that this basic information is on the web somewhere, but I can't focus my search enough to separate out the answer to my specific question. Maybe someone can point me to the answer or knows the answer off the top his head.
I am trying to determine the correct contents of my /etc/hosts file. Here's my network configuration...
(IP addresses and domain names are generalized)
- I have a static IP, xxx.yyy.zzz.www, from my ISP
- I have a registered domain name -- mydomain.com
- I have a linksys router between my ISP and my local network
- I have a local network, 192.168.1.xxx
- My Fedora10 linux server, "srv1", has the static IP 192.168.1.14 on my local network
It may matter to the discussion that my ISP does not provide rDNS for residential static IP.
My /etc/hosts file currently contains...
127.0.0.1 localhost.localdomain localhost
192.168.1.14 srv1.mydomain.com srv1 mydomain.com
xxx.yyy.zzz.www srv1.mydomain.com srv1 mydomain.com
:1 localhost6.localdomain6 localhost6
As far as I can tell, everything works okay, but I have hints in my log files that my setup may not be correct.
When I try to connect thru SSH to mydomain.com from another (Windows) machine on my local network, I get this entry in /var/log/secure...
Feb 20 05:59:19 srv1 sshd: Address xxx.yyy.zzz.www maps to srv1.mydomain.com, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Similarly, when I send mail using a POP3 client from another (Windows) machine on my local network, I get this entry in /var/log/maillog...
Feb 20 07:20:46 srv1 postfix/smtpd: warning: xxx.yyy.zzz.www: address not listed for hostname srv1.mydomain.com
Feb 20 07:20:46 srv1 postfix/smtpd: connect from unknown[xxx.yyy.zzz.www]
The pop3 client mentioned above uses mydomain.com as the mail server name -- not the local network IP address of the server.
It seems that my server does not know that it is IP xxx.yyy.zzz.www.
I'm reluctant to just experiment with /etc/hosts because I have in the past and I have caused weird behaviors that took days to sort out (see my one of my recent posts for details).
Advice would be appreciated. I have tried to be complete, but if you need more information, please let me know and I will post it.