Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Feb 10, 2011 5:03 pm 
Offline
Senior Newbie

Joined: Sun Mar 08, 2009 11:51 pm
Posts: 7
I'm using Ubuntu 10.04 and wanted to know if you could change how the system references ports once they've been changed elsewhere.

One common example is ssh:
Irregardless of whether it is more secure to change the port from 22 to another number in /etc/ssh/sshd_config.

Once this is done, it seems other programs still reference ssh as running under port 22. For example "ufw allow ssh" opens port 22, not the new port.

Any config files that include "port: ssh" don't seem to work unless I manually edit them to the new number.

Is there a method to let the system and all other installed programs, config files, etc. know that a port has been permanently changed and to use the new number instead?

Thanks in advance.


Top
   
 Post subject:
PostPosted: Thu Feb 10, 2011 5:33 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
edit /etc/services

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Thu Feb 10, 2011 6:36 pm 
Offline
Senior Member

Joined: Sat May 03, 2008 4:01 pm
Posts: 569
Website: http://www.mattnordhoff.com/
I imagine quite a lot of software will always assume SSH is port 22 instead of following /etc/services, though...

_________________
Matt Nordhoff (aka Peng on IRC)


Top
   
 Post subject:
PostPosted: Thu Feb 10, 2011 8:51 pm 
Offline
Senior Newbie

Joined: Sun Mar 08, 2009 11:51 pm
Posts: 7
Thanks, that seems to have done it.


Top
   
 Post subject:
PostPosted: Fri Feb 11, 2011 2:00 am 
Offline
Junior Member

Joined: Mon Oct 23, 2006 12:09 am
Posts: 26
mnordhoff wrote:
I imagine quite a lot of software will always assume SSH is port 22 instead of following /etc/services, though...


I doubt it. That would mean I would have to include some sort of list of port names and their numeric mapping with my software, instead of just calling getservbyname() and letting a system library do the work for me.


Top
   
 Post subject:
PostPosted: Sat Feb 12, 2011 6:46 pm 
Offline
Senior Member

Joined: Sat May 03, 2008 4:01 pm
Posts: 569
Website: http://www.mattnordhoff.com/
piglet wrote:
I doubt it. That would mean I would have to include some sort of list of port names and their numeric mapping with my software, instead of just calling getservbyname() and letting a system library do the work for me.


I was thinking more along the lines of software that uses SSH, not something that would need a general list of ports. OTOH, such software probably just calls out to /usr/bin/ssh itself. Shrug.

Edit: Thinking about it again, SSH client software isn't very relevant to this discussion anyway. Never mind.

_________________
Matt Nordhoff (aka Peng on IRC)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group