Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 19/20 > Servers & Networking
FedoraForum Search

Forgot Password? Join Us!

Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 20th February 2009, 01:12 PM
rshartog Offline
Registered User
 
Join Date: Jan 2009
Posts: 14
Question Need advice on /etc/hosts for static ISP IP, router, LAN, static LAN IP

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...

Code:
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...
Code:
Feb 20 05:59:19 srv1 sshd[1856]: 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...

Code:
Feb 20 07:20:46 srv1 postfix/smtpd[13208]: warning: xxx.yyy.zzz.www: address not listed for hostname srv1.mydomain.com
Feb 20 07:20:46 srv1 postfix/smtpd[13208]: 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.

--Scott
Reply With Quote
  #2  
Old 20th February 2009, 02:03 PM
SuperSkippy Offline
Registered User
 
Join Date: Jan 2009
Posts: 72
Here is my answer, but I'm only 8 out of 10 on this....

There is nothing you can do. /etc/hosts is for forward resolution only, that is to say name to IP. What POP3 and SSHd are doing is looking up the ip address, and trying to find out the name. /etc/hosts doesn't work this way round. Whoever looks up the IP addresses needs to set up reverse DNS for you.
Reply With Quote
  #3  
Old 21st February 2009, 05:24 AM
rshartog Offline
Registered User
 
Join Date: Jan 2009
Posts: 14
Question

Thanks for your reply.

Your reminder that
Quote:
the /etc/hosts file is for forward resolution only
has made me realize that one of the lines in my /etc/host file must be ignored (or overwritten). I have
Quote:
srv1.mydomain.com srv1 mydomain.com
listed in my file twice with a different IP address each time -- one LAN and the other WAN. In the end, /etc/hosts can only assign one of the IP addresses to these names.

Code:
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
For my configuration which do you think it should it be -- LAN or WAN? Or is more information required to determine the correct choice?

--Scott
Reply With Quote
Reply

Tags
advice, isp, lan, or etc or hosts, router, static

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Router/Modem has taken static IP from my Apache server. InfRecursion Servers & Networking 1 1st December 2008 06:49 PM
Static router from NIC to NIC lovswr Servers & Networking 1 6th August 2005 07:47 PM
assigning static IP on linksys router for ftp server LackeyLad Servers & Networking 1 12th March 2005 03:39 AM
FC2 Overriding static if in favor of dhcp system set for static pkraus109 Servers & Networking 2 21st September 2004 05:13 PM


Current GMT-time: 04:02 (Friday, 31-10-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Blora Travel Photos on Instagram - Rondonopolis - Ostrov