LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-12-2004, 07:42 PM   #1
DaddyBad
Member
 
Registered: Jan 2004
Location: New Haven
Distribution: rh9, fc2
Posts: 35

Rep: Reputation: 15
cannot connect to localhost (RH9)


This started out as a sendmail problem, but now I'm finding that
I cannot connect to localhost. 'telnet localhost' says 'connection
Refused'. Sendmail does it too. There were no entries at all in
/etc/hosts.allow or /etc/hosts.deny. I added 127.0.0.1 to hosts.allow.
The documentation at the top of the file says it's for tcpd, but
tcpd does not show up in '/sbin/service --status-all'. Nor does tcpd
show up when I do 'ps -ax|grep tcpd'. Also nothing about it in
/sbin/chkconfig.

How does tcpd normally get started, and is this even my problem?

scott
 
Old 03-12-2004, 08:03 PM   #2
sirpimpsalot
Member
 
Registered: Feb 2004
Posts: 141

Rep: Reputation: 15
what did you set your firewall settings at during install? it sounds like you have everything except http blocked...

redhat... go to START - > System Settings - Security Level and disable the firewall... see if it works now...
 
Old 03-12-2004, 08:12 PM   #3
DaddyBad
Member
 
Registered: Jan 2004
Location: New Haven
Distribution: rh9, fc2
Posts: 35

Original Poster
Rep: Reputation: 15
Ok. I dug a little deeper and found more.

telnet is off. I think that means the daemon. If sendmail is working I should
be able to 'telnet localhost 25' and get a '220:' greeting. It works from any other host on my local network.

So. Why is port 25 closed to localhost?
 
Old 03-12-2004, 08:17 PM   #4
DaddyBad
Member
 
Registered: Jan 2004
Location: New Haven
Distribution: rh9, fc2
Posts: 35

Original Poster
Rep: Reputation: 15
I've had the firewall disabled all along.

BTW: I'm in runlevel 3, none o'that gui stuff for me.

It's not a port blocking problem, 'cuz I can get in from another host.

Any other ideas?
 
Old 03-12-2004, 08:28 PM   #5
sirpimpsalot
Member
 
Registered: Feb 2004
Posts: 141

Rep: Reputation: 15
sorry if this sounds stupid/simplistic... im just trying to help....

but what does localhost resolve to? can you ping localhost? what happens when you ping/telnet/etc 127.0.0.1? could be a very simple missing host entry problem...
 
Old 03-12-2004, 08:30 PM   #6
sirpimpsalot
Member
 
Registered: Feb 2004
Posts: 141

Rep: Reputation: 15
IOW...

make sure you have an entry like this:

127.0.0.1 localhost


in your /etc/hosts file...
 
Old 03-12-2004, 08:33 PM   #7
DaddyBad
Member
 
Registered: Jan 2004
Location: New Haven
Distribution: rh9, fc2
Posts: 35

Original Poster
Rep: Reputation: 15
Not stupid or simplistic at all. gotta rule it out...

ping localhost
PING localhost.localdomain (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=1 ttl=64 time=0.091 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=2 ttl=64 time=0.081 ms

[root@amnesia scott]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost

I think it's finding the localhost ip ok, just not allowing itself in.
 
Old 03-12-2004, 08:39 PM   #8
sirpimpsalot
Member
 
Registered: Feb 2004
Posts: 141

Rep: Reputation: 15
thats truely a strange one.... Ill duck out now and leave this one to the experts...

good luck though brutha...
 
Old 03-13-2004, 02:59 PM   #9
DaddyBad
Member
 
Registered: Jan 2004
Location: New Haven
Distribution: rh9, fc2
Posts: 35

Original Poster
Rep: Reputation: 15
Got this part figured out.
See
http://www.linuxquestions.org/quest...3804#post813804
 
Old 03-15-2004, 12:19 PM   #10
sirpimpsalot
Member
 
Registered: Feb 2004
Posts: 141

Rep: Reputation: 15
bad hyperlink.... can you redo or explain.... im curious..

Thanks- Tom
 
Old 03-15-2004, 01:15 PM   #11
DaddyBad
Member
 
Registered: Jan 2004
Location: New Haven
Distribution: rh9, fc2
Posts: 35

Original Poster
Rep: Reputation: 15
from post 813804:

I can now send mail between users. The problem was the DAEMON_OPTIONS
setting in /etc/mail/sendmail.mc:
dnl #
dnl # The following causes sendmail to only listen on the IPv4 loopback address
dnl # 127.0.0.1 and not on any other network devices. Remove the loopback
dnl # address restriction to accept email from the internet or intranet.
dnl #
DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
dnl # DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl

Note how the entry with 127.0.0.1 address is commented out. I, misunderstanding the docmentation, had replaced 127.0.0.1 with my local ip addr. I didn't understand that the address must be removed entirely from the entry.

That's why I are called a newbie.

Thanks for your help pimpster. Although I did, in the final analysis, figure it out for myself, it really helps to have a little guidance along the way.

scott

Last edited by DaddyBad; 03-15-2004 at 01:21 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
printer can't connect to localhost tincat2 Slackware 8 08-07-2005 12:48 AM
LocalHost:631 - cannot connect sitka Linux - Networking 6 05-30-2005 04:30 PM
Cannot connect to anything on localhost JohnKFT Slackware 17 05-11-2005 03:21 AM
can't connect to localhost acidblue Fedora 0 12-05-2004 08:20 PM
Can't connect to localhost Brendon Linux - Networking 11 07-30-2002 11:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration