Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Servers & Networking
FedoraForum Search

Forgot Password? Join Us!

Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 25th November 2008, 03:09 PM
apetickler Offline
Registered User
 
Join Date: Oct 2008
Posts: 8
Opening up a nonstandard port for SSH

Hello all.

Recently, I tried unsuccessfully to SSH to my machine from outside my local network. I found through some Googling that Comcast seems to be blocking port 22. For this reason, and for security, I'm trying to reconfigure my system for SSH over a different port.

So, I edited the "port=" lines in both ssh_config and sshd_config accordingly, and I used the GUI firewall configuration tool to allow TCP connections over my chosen port.

But when I try to open an SSH connection (at this point, I'm still testing over the local network), I get "Connection refused."

As might be expected, I also now get the same result trying to connect over port 22 (which now blocked by the firewall).

Additionally, when I type "netstat -ntlu," I don't see my new port listed.

As a test, I tried clicking on the big red "disable" button in the firewall configuration tool, but I still got the same results. I didn't reboot in between, though (I don't know whether or not that's necessary), and the next time I did reboot, the firewall was back up again.

Is there something I'm missing? What can I tell from my "netstat" results? Does this mean the sshd service isn't listening, or does it mean the port is still being blocked systemwide?

Thanks in advance, folks.

Last edited by apetickler; 25th November 2008 at 03:12 PM.
Reply With Quote
  #2  
Old 25th November 2008, 03:28 PM
Jordanlw Offline
Registered User
 
Join Date: Nov 2008
Posts: 30
Have you tried to open the port on your hardware firewall?
ssh_config is for your client side connections.
sshd_config is the configuration for the daemon.
Reply With Quote
  #3  
Old 26th November 2008, 12:45 AM
apetickler Offline
Registered User
 
Join Date: Oct 2008
Posts: 8
The only hardware firewall I've got is my router, and it only appears to filter traffic coming in from outside the network. There isn't even any real configuration for it.
Reply With Quote
  #4  
Old 26th November 2008, 01:38 AM
scottro's Avatar
scottro Offline
Retired Community Manager -- Banned from Texas by popular demand.
 
Join Date: Sep 2007
Location: NYC
Posts: 8,142
The silly question--did you restart sshd after making the change.

Also, I don't believe it's a port= line. The only change you should have to make is in /etc/ssh/sshd_config. There's a line, Port 22 which is commented out with a #. (The commented lines often refer to the defaults and you only uncomment them if change them.

So, change that to whatever,

Port 1333
Change the firewall to allow it in.
service sshd restart
Then try.
I would also recommend disabling root login.

If you still can't login, see if the error's in what you did with the firewall

service iptables stop

That turns off the firewall for a minute

Try again.

If it works, then the error's in your firewall configuration.

As for connecting from outside, I know Linksys routers have port forwarding--usually under their applications and games menu or something similar.
Reply With Quote
  #5  
Old 26th November 2008, 04:22 PM
apetickler Offline
Registered User
 
Join Date: Oct 2008
Posts: 8
It's working this morning, after a second reboot. I suspected that something was off after the first reboot when I saw that one of my hard drives failed to mount. Didn't change anything, just rebooted again. Now everything's peachy. I'm in non-standard port SSH heaven!

Thanks, folks. This is really going to open up a whole new dimension of goofing off at work.
Reply With Quote
Reply

Tags
nonstandard, opening, port, ssh

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora 7 port opening bug? iamscottevil Servers & Networking 20 14th November 2007 02:21 AM
Trouble opening port 139 UDP hadekoya Servers & Networking 0 1st June 2007 04:52 PM


Current GMT-time: 05:57 (Sunday, 19-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat