LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 06: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, 07: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, 07: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, 07: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, 07: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, 07: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, 07: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, 07: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, 01: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, 11:19 AM   #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, 12: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 12:21 PM.
 
  


Reply



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-06-2005 11:48 PM
LocalHost:631 - cannot connect sitka Linux - Networking 6 05-30-2005 03:30 PM
Cannot connect to anything on localhost JohnKFT Slackware 17 05-11-2005 02:21 AM
can't connect to localhost acidblue Fedora 0 12-05-2004 07:20 PM
Can't connect to localhost Brendon Linux - Networking 11 07-30-2002 10:13 AM

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

All times are GMT -5. The time now is 09:26 PM.

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
Open Source Consulting | Domain Registration