SSH either times out or refuses connection

Issues related to configuring your network
Post Reply
Andromeda
Posts: 3
Joined: 2009/04/02 21:10:17

SSH either times out or refuses connection

Post by Andromeda » 2009/04/02 21:21:33

Im new to Linux so please bear with me. I'm trying to setup a ssh connection from to my house that way I can learn Linux on a box that won't make my boss the sys admin (Im help desk) grind his teeth. He say that ssh port is allowing connections out of the firewall but not in so I can connect to my house. However If I try to connect to my box I get a message stating that the connection has time out. I have port forwarded the 22 to my box and have even changed the port to see if it is my isp blocking me. I am able to connect via SSH internally but when I try outside my house I am running into trouble. I looked up how to disable my fire wall and as far as I know it is.

disable firewall - http://www.cyberciti.biz/faq/turn-on-turn-off-firewall-in-linux/

All help is VERY MUCH appreciated 8-)

Shagbag
Posts: 17
Joined: 2008/07/03 10:08:27

SSH either times out or refuses connection

Post by Shagbag » 2009/04/03 06:24:23

Is your CentOS box sitting behind a home router eg. Netgear, Linksys, etc? If so, have you opened a hole in its firewall that will allow an incoming tcp connection for port 22? You will also need to make sure it also forwards such an incoming connection to the IP address that it has given to your CentOS box (so that the ssh TCP/IP packets will 'flow through' your home router to get to your CentOS box).

Also, you don't need to disable the firewall on your CentOS box. Go to System > Administration > Security Level and Firewall. Then, on the "Firewall Options" tab in the "Trusted Services" area, check the box next to "SSH" and then click the "Apply" button. Finally, make sure the "Firewall:" drop down box is on "Enabled" (change and click the "Apply" button again if necessary). Doing all of this will ensure your firewall only allows incoming ssh connections on port 22.

Andromeda
Posts: 3
Joined: 2009/04/02 21:10:17

Re: Are you using a home router?

Post by Andromeda » 2009/04/03 17:07:07

[quote]
Shagbag wrote:
Is your CentOS box sitting behind a home router eg. Netgear, Linksys, etc? If so, have you opened a hole in its firewall that will allow an incoming tcp connection for port 22? You will also need to make sure it also forwards such an incoming connection to the IP address that it has given to your CentOS box (so that the ssh TCP/IP packets will 'flow through' your home router to get to your CentOS box).

Also, you don't need to disable the firewall on your CentOS box. Go to System > Administration > Security Level and Firewall. Then, on the "Firewall Options" tab in the "Trusted Services" area, check the box next to "SSH" and then click the "Apply" button. Finally, make sure the "Firewall:" drop down box is on "Enabled" (change and click the "Apply" button again if necessary). Doing all of this will ensure your firewall only allows incoming ssh connections on port 22.[/quote]

Yes my box is sitting behind a router and I have port forwarded it to the proper Ip address which I set to static. Which I know works because yum update works. Unless you mean something differnt by poking a hole in my router I think Im down to plugging in the box to the modem directly to see if it'll work that way.

Any other suggestions?

Shagbag
Posts: 17
Joined: 2008/07/03 10:08:27

SYNs being dropped at the router's firewall?

Post by Shagbag » 2009/04/03 18:54:14

Forwarding packets across the interfaces in your router (eg. from WAN to LAN) is one thing.
Letting those packets into your router in the first place, is something different.
I'm not sure how your router's firmware works exactly so I can't tell if one configuration step does both or if you need to do 2 configuration steps in your router's firmware to achieve the above.
If you can give make/model details of your router I can take a look at the online documentation and try and help you out.

btw, 'connection timed out' is usually an indication that packets aren't reaching their destination and they're simply being 'dropped' at [your router's] firewall.

Post Reply