| Linode Forum https://forum.linode.com/ |
|
| Can you change how ubuntu references changed ports? https://forum.linode.com/viewtopic.php?f=19&t=6686 |
Page 1 of 1 |
| Author: | thorrx [ Thu Feb 10, 2011 5:03 pm ] |
| Post subject: | Can you change how ubuntu references changed ports? |
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. |
|
| Author: | obs [ Thu Feb 10, 2011 5:33 pm ] |
| Post subject: | |
edit /etc/services |
|
| Author: | mnordhoff [ Thu Feb 10, 2011 6:36 pm ] |
| Post subject: | |
I imagine quite a lot of software will always assume SSH is port 22 instead of following /etc/services, though... |
|
| Author: | thorrx [ Thu Feb 10, 2011 8:51 pm ] |
| Post subject: | |
Thanks, that seems to have done it. |
|
| Author: | piglet [ Fri Feb 11, 2011 2:00 am ] |
| Post subject: | |
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. |
|
| Author: | mnordhoff [ Sat Feb 12, 2011 6:46 pm ] |
| Post subject: | |
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. |
|
| Page 1 of 1 | All times are UTC-04:00 |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|