LinuxQuestions.org
Register a domain and help support LQ
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 11-18-2008, 04:04 PM   #1
Ryan_Sutton
Member
 
Registered: May 2002
Location: California
Distribution: Fedora 9
Posts: 101

Rep: Reputation: 15
SSH not working externally


Hello, trying to SSH in to my fedora 9 computer and am having trouble. My Linux computer is on a private (NAT) network behind a Linksys. I have a few other computers on this network, all windows boxes. From any of the Windows boxes I can SSH (using Putty) in to my Linux box.

When I try to SSH to my Linux box from work or my friends house, I am not able to, the connection times out. I have forwarded all TCP traffic on port 22 from the WAN interface on my router to the private IP of my Linux box. This is the only setting I know of to allow external SSH access to my network. Can anyone offer further troubleshooting?

Thanks,
Ryan
 
Old 11-18-2008, 05:02 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
it sounds like there is possibly some firewall config as well as the NAT config, but a good point to start (in my world at least) is to run tcpdump or wireshark on your ssh server and watch what packets hit it. if your internet connection is working from the box, then there's no reason everything on that box shouldn't be fine so must on the router. also check out portforward.com to step you through config for your router (probably)
 
Old 11-18-2008, 05:25 PM   #3
centos82
Member
 
Registered: Sep 2008
Distribution: CentOS
Posts: 75

Rep: Reputation: 16
Also, and this may be a duh, but remember when you ssh externally you have to ssh to the public IP of your router and not your servers IP.
 
Old 11-18-2008, 05:44 PM   #4
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Try ssh -vvv user@YOUR.PUB.LIC.IP
ssh will report what it is trying to do, what is happening, and (probably) why it is failing.
See man ssh for more details.
 
Old 11-18-2008, 05:45 PM   #5
Ryan_Sutton
Member
 
Registered: May 2002
Location: California
Distribution: Fedora 9
Posts: 101

Original Poster
Rep: Reputation: 15
Thumbs up

Thanks for the feedback. I will run Wire Shark on my Linux box to see if I am even hitting it. I can't imagine needing a guide for the firewall, I simply allowed all WAN facing TCP traffic on port 23 to go directly to the private NAT IP of my Linux box. Maybe the firewall is glitching? Does OpenSSH inherently deny public IP address? I've also allowed all TCP traffic on port 23 in IPtables.

When I am connecting over the internet I am putting the public IP address in Putty, not the private.
 
Old 11-18-2008, 05:52 PM   #6
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Wireshark? I don't think you need that for this level of troubleshooting.
Quote:
I simply allowed all WAN facing TCP traffic on port 23....
ssh defaults to port 22
Maybe that is where your problem lies.
 
Old 11-18-2008, 06:01 PM   #7
Ryan_Sutton
Member
 
Registered: May 2002
Location: California
Distribution: Fedora 9
Posts: 101

Original Poster
Rep: Reputation: 15
23 was a typo =]

Anyways, I just SSH'ed from my Linux box here at work and suprisingly enough, it worked! The only thing I've done since I last tried is reboot the SSH Linux server at my home. Apparently something in the reboot fixed the problem.

Thanks all for your help!

** Good to see you are still around Acid, you were helping me back in 2002 when I was trying to setup a Slackware/Samba setup. Cheers!
 
  


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
cannot connect to mysql database externally lsimon4180 Linux - Software 17 03-02-2005 01:28 PM
Accessing virtual servers externally Inexactitude Linux - Networking 2 04-18-2004 01:39 PM
sending mail externally plisken Linux - Software 0 03-09-2004 01:01 PM
Apache 1.3 - can't connect externally slightcrazed Linux - Software 2 02-03-2004 11:16 AM
vsftpd - Can't connect externally??? Xgkkp Linux - Networking 5 08-30-2003 01:50 PM


All times are GMT -5. The time now is 01:30 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