LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 04-09-2003, 06:15 AM   #1
lhiggins
Member
 
Registered: Jan 2003
Location: Sydney, Australia
Distribution: FedoraCore
Posts: 105

Rep: Reputation: 15
Question Changing sshd listening port


Hey guys,

I have smoothwall version 1.0.

Basically with my ISP (optusnet) I have major troubles accessing my server for ports 1024 and below. I tried to change the default ssh port (222) by editing the file:
/usr/local/etc/sshd_config. After I changed the default port and restarted the daemon I lost the service completly!

I also tried sshd -p xxxx
This didnt work either. Can someone please give me some info on how to change the port?

Thanks in advance!

Last edited by lhiggins; 04-09-2003 at 09:57 PM.
 
Old 04-09-2003, 06:54 AM   #2
JamesF1
Member
 
Registered: Nov 2001
Location: Spain
Distribution: Mandrake 9.1
Posts: 48

Rep: Reputation: 15
The default port for ssh is 22 - not 222. I suspect Smoothwall is will allow you to use port 22 for access the machine with ssh so try again with that. You'll probably have to restart the sshd server again if you've changed the port for the sshd server to listen on.

If check also that you have the correct ssh protocol (either 1 or 2).

 
Old 04-09-2003, 07:10 AM   #3
lhiggins
Member
 
Registered: Jan 2003
Location: Sydney, Australia
Distribution: FedoraCore
Posts: 105

Original Poster
Rep: Reputation: 15
By default smoothwall blocks port 22 and uses 222 for ssh. The ssh protocol is correct also. I have always locally been able to ssh into port 222 but now I would like to change it to something higher than 1024.
 
Old 04-09-2003, 07:38 AM   #4
JamesF1
Member
 
Registered: Nov 2001
Location: Spain
Distribution: Mandrake 9.1
Posts: 48

Rep: Reputation: 15
Okay if that's that port you sshd server is listening on then okay. Your correct that Smoothwall will block 22 by default - so too for port 222 - but that depends on your firewall configuration. What you need to do is look in the firewall configuration and simply change the 222 port for the one that you want to change it to. Save your changes and restart the firewall. You could also try forwarding requests to port 222 to the new port number. Check out the documentation on it.
http://us0.download.smoothwall.org/d...fig.screen.pdf
 
Old 04-09-2003, 07:47 AM   #5
lhiggins
Member
 
Registered: Jan 2003
Location: Sydney, Australia
Distribution: FedoraCore
Posts: 105

Original Poster
Rep: Reputation: 15
Yeah I have read that PDF file. My firewall rules are correct. My ISP is actually filtering some ports below 1024 like ftp and www so i cant host. I need
 
Old 04-09-2003, 08:02 AM   #6
JamesF1
Member
 
Registered: Nov 2001
Location: Spain
Distribution: Mandrake 9.1
Posts: 48

Rep: Reputation: 15
I can understand their motives but I would imagine that if they are doing it for ports below 1024 then they also do if for those above as well. By the way are you trying to access the machine remotely or locally. If it's locally and you can't access it by using the public ip of the machine, try doing it with 127.0.0.1 instead. That way you can be sure that the problem isn't with the sshd server.
 
Old 04-09-2003, 09:56 PM   #7
lhiggins
Member
 
Registered: Jan 2003
Location: Sydney, Australia
Distribution: FedoraCore
Posts: 105

Original Poster
Rep: Reputation: 15
my admin page has been configured on a higher port than 1024. Now I can access it through the interent (red). Where as before when it was port 445 i couldnt. I definitly know this cause I asked my ISP. Therefore the ssh listening port must be above 1024. I can easily contact the default port through localhost and my green network. All I need to do is change the default port for sshd to something above 1024 like 2222.

I think I must have to edit more files than my sshd_config.
 
Old 04-10-2003, 04:46 AM   #8
JamesF1
Member
 
Registered: Nov 2001
Location: Spain
Distribution: Mandrake 9.1
Posts: 48

Rep: Reputation: 15
You should only have to edit your firewall for the ports (and IPs if necessary) and any configuration files for the services you want to access from the outside the firewall. I can't think of anything else that would have any effect (unless you have a router with access control lists defined to block ports).
It seems very strange that your provider would leave the higher port numbers open and just the lower ones. They might be using a proxy and that might be where the problem lies.
 
Old 04-10-2003, 09:34 AM   #9
lhiggins
Member
 
Registered: Jan 2003
Location: Sydney, Australia
Distribution: FedoraCore
Posts: 105

Original Poster
Rep: Reputation: 15
Yes they have a transparent proxy. Yes its the sshd listening port. Believe me this time. I used to have SME server and Gateway which was configured on port 2222 which worked. The default web admin page runs on port 445 which didnt work until I put it on a port higher than 1024.
 
Old 04-24-2003, 12:12 PM   #10
zeroX
LQ Newbie
 
Registered: Apr 2003
Location: BE
Distribution: Slackware
Posts: 1

Rep: Reputation: 0
a simple solution could be forwarding port 2222 on the red to 222 on your green ip... i guess didn't test it
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Smoothwall Ports Above 1024 inraindreams Linux - Networking 0 03-21-2003 02:49 PM
Smoothwall Ports Above 1024 inraindreams Linux - Hardware 0 03-21-2003 02:48 PM
Allowing Outgoing ports in Smoothwall 0.9.9 AndyShark Linux - Security 2 10-06-2002 08:07 AM
help with closing ports Smoothwall ???? stevep119 Linux - Newbie 0 01-27-2002 10:52 AM
Smoothwall: How do I make ports available??(newbie) Caffinated Linux - Networking 0 11-20-2001 07:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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