LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-11-2014, 01:15 PM   #1
thealmightyos
Member
 
Registered: Mar 2009
Distribution: CentOS 6.5 / 7
Posts: 119

Rep: Reputation: 1
Connecting to CENTOS7 via SSH over WAN/Internet


Hello All.

I am messing with the new CentOS7. Installed it fresh last night from the "Everything" ISO. Also created an image last night of the fresh install so don't worry too much about mucking anything up.

I am having a problem SSH'ing into the box via remote system. Local systems on the same LAN (such as my gaming box I am RD'd into now to SSH into my server) work. But the moment I attempt to connect via my work system I get a connection refused. I have checked the usual suspects such as firewalls and port forwarding. The port is open and directed to the correct pc. So I am thinking it is a configuration issue. I have looked over the sshd_config and I do not see anything preventing access though I could be mistaken.

Oh, and I am not looking for a whole lot of security on this system. This is a throw away install for me to test out CentOS7. Anything goes wrong I will just reimage and try again

EDIT: So I was attempting to port forward from #### to 22 using my router's NAT (I should have included that info. Did not realize it could be connected). My install did not like that and refused the connection. However, when I switched it back to 22 to 22 it worked just fine. So it is a setting I am just missing in the sshd_config.

Last edited by thealmightyos; 08-11-2014 at 02:47 PM. Reason: New Info
 
Old 08-11-2014, 03:25 PM   #2
notKlaatu
Senior Member
 
Registered: Sep 2010
Location: Lawrence, New Zealand
Distribution: Slackware
Posts: 1,077

Rep: Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732
I installed RHEL7 last week and SSH worked out of the box without modification to the sshd_config file. Did you make changes to it?

The things that come to mind from what you describe is the builtin software Firewall. Did you mark SSH as a trusted port in the current firewall? Also, is SSH running? I know in both cases, an LAN SSH would have failed, so I'm assuming/hoping there was a reboot between your LAN tests and your WAN attempts.

Is this running in a VM or is it on a real live PC? that could also make a difference in terms of routing...
 
Old 08-11-2014, 03:41 PM   #3
thealmightyos
Member
 
Registered: Mar 2009
Distribution: CentOS 6.5 / 7
Posts: 119

Original Poster
Rep: Reputation: 1
It seems I have solved it (for now)

The edit in my above post shows that the issue was in fact my port forwarding in my router. A common practice I use is making the external facing port different from then internal. Here is an example using FTP (I do not have FTP installed or configured so these ports are bogus)

Code:
Application: FTP
Protocol: TCP
Port from: 54321
IP Address: 1.2.3.4
Port to: 21
When I did this with ssh it did not like it and refused the connection. I have reversed this and now the outward facing port is the same as the internal and it works fine. I will have to go into the config and change it.

As far as VM/PC, this is running on hardware. No vm. And everything seems to be running fine now so I think it was just the NAT that caused the issue

Last edited by thealmightyos; 08-11-2014 at 03:44 PM.
 
Old 08-11-2014, 03:44 PM   #4
notKlaatu
Senior Member
 
Registered: Sep 2010
Location: Lawrence, New Zealand
Distribution: Slackware
Posts: 1,077

Rep: Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732
I see. You should mark the post as solved. I think that is in Thread Tools > Mark as Solved or thereabouts..
 
Old 08-11-2014, 03:45 PM   #5
thealmightyos
Member
 
Registered: Mar 2009
Distribution: CentOS 6.5 / 7
Posts: 119

Original Poster
Rep: Reputation: 1
Will do. Was just looking for the button. Thanks
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Connecting to my Virtual OS from remotely, WAN, connect from outside world? cyberdome Linux - Virtualization and Cloud 4 05-04-2014 07:12 AM
newbie - connecting to internet with ssh, is there a better way? brandonweinberg Linux - Networking 6 01-14-2011 12:14 AM
can't ssh from WAN baikonur Linux - Networking 6 07-24-2009 03:06 PM
can't access ssh on wan wazilian Linux - Networking 0 06-02-2005 02:12 PM
FreeS/Wan Vs. OpenS/Wan Vs. StrongS/Wan bkankur Linux - Security 1 03-01-2005 09:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:33 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
Open Source Consulting | Domain Registration