Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 10-04-2005, 12:48 AM   #1
Registered: Jun 2004
Posts: 49

Rep: Reputation: 15
SSH "Connection Refused" problem when there is no firewall/router involved in Fedora4

Hi there everyone

this has been really frustrating, I have been googling online and haven't found a solution yet.

I am using a Verizon DSL modem and have my Fedora 4 machine connected to a hub that is directly connected to the modem. I have no firewall on my Fedora 4 and I have checked the iptables and Security Level from Systems Settings. There should not be any port restrictions on the hub(a physical layer device, not a router) and the DSL modem.

Thus, I do not know understand why I can ssh locally with "ssh localhost" but cannot from any other external machine. I have gone to a site like to figure out my external IP and that does not work. When I ssh to that IP, I keep getting port 22 Connection refused.

I only have one network interface on my Fedora 4, and when I do ifconfig eth0, I get :
inet addr: Bcast: Mask:
RX packets:28790 errors:0 dropped:0 overruns:0 frame:0
TX packets:32197 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8862981 (8.4 MiB) TX bytes:3830715 (3.6 MiB)
Interrupt:10 Base address:0x8000

and the inet addr here does not match that of the external IP.

When I do "nmap localhost" I get:

Interesting ports on localhost.localdomain (
(The 1659 ports scanned but not shown below are in state: closed)
22/tcp open ssh
25/tcp open smtp
111/tcp open rpcbind
631/tcp open ipp
Nmap finished: 1 IP address (1 host up) scanned in 1.043 seconds

HOWEVER, when I do "nmap (my external IP)" I get :

All 1663 scanned ports on (external IP) are: closed

Nmap finished: 1 IP address (1 host up) scanned in 1.083 seconds

So does this mean there is still some problems with the Fedora 4 or is there some form of restriction on the DSL modem? I have tried to plug the Fedora machine directly to the modem and the same thing happens. By the way, I just installed Fedora 4 brand new on this machine.

Please share your thoughts, thanks in advance!
Old 10-04-2005, 02:27 AM   #2
Registered: Aug 2004
Location: the coven
Distribution: slackies
Posts: 55

Rep: Reputation: 15
hi there.are you using modem router? Maybe there is a firewall enabled on the modem. There isnt anything wrong on Fedora 4. Maybe you can check what's ur box is listening on by issuing this command :-

[root@pbr tcpip]# netstat -tunlp

It supposed to show this :-

tcp 0 0 :::22 :::* LISTEN 12996/sshd

which means sshd is ready to accept request from anywhere providing that no firewall is blocking it.
Old 10-04-2005, 12:25 PM   #3
Registered: Jun 2004
Posts: 49

Original Poster
Rep: Reputation: 15
Hi there,

I tried "netstat -tunlp" and it shows:
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0* LISTEN 1569/rpc.statd
tcp 0 0* LISTEN 1551/portmap
tcp 0 0* LISTEN 1880/cupsd
tcp 0 0* LISTEN 1865/mDNSResponder
tcp 0 0* LISTEN 1945/sendmail: acce
tcp 0 0 :::22 :::* LISTEN 2896/sshd
udp 0 0* 1569/rpc.statd
udp 0 0* 1569/rpc.statd
udp 0 0* 8414/dhclient
udp 0 0* 7088/dhclient
udp 0 0* 1865/mDNSResponder
udp 0 0* 1551/portmap
udp 0 0* 1880/cupsd

So, yea, there is no firewall on Fedora 4 indeed.

By the way, I was looking on google on my Verizon DSL modem, which is a Westell 6100, and I found out that I can log onto it at , but it says that there is no firewall on it too. However, I do see that Private LAN DHCP is enabled which is why my Fedora 4 gets assigned and IP like which is within a range of available private LAN IPs specified there. Public LAN DHCP is , however, disabled, but what is the difference between public and private LANs here?

Old 10-04-2005, 12:29 PM   #4
Senior Member
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Private IPs are not routable across the web. Apparently your modem is acting as a NAT device, so for this to work you will have to forward requests to port 22 from the modem / NAT device to the local machine's IP.
Old 10-04-2005, 04:29 PM   #5
Registered: Jun 2004
Posts: 49

Original Poster
Rep: Reputation: 15

I will definitely try that. So it seems like the output of the nmap command is determined by what the modem filters then.

Old 10-04-2005, 05:01 PM   #6
Senior Member
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
I also want to mention - running nmap against localhost does not really tell you much. Not all services are attached to the loopback interface.


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
CUPS problem! "localhost:631, connection refused"!!! robbow52 Debian 5 03-04-2009 01:27 PM
suse 9.2 proffesional wlan problem "connection refused" doughustad Linux - Hardware 1 01-24-2005 06:14 PM
SSH PuTTy gives "connection refused" Sathington Linux - Networking 5 03-18-2004 05:10 AM
What is "Xlib: connection to ":0.0" refused by server " rack201 Linux - Software 1 02-04-2004 07:49 AM
lp filename yields "cannot open connection to localhost - Connection refused" jjge Linux - General 3 12-28-2003 11:02 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:20 PM.

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