[Mageia-discuss] Setting up a port forward

Thomas Backlund tmb at mageia.org
Fri Aug 31 21:42:26 CEST 2012


31.08.2012 14:41, Anne Wilson skrev:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I need to set up ssh in such a way that it comes in on a high port,
> say 5122 which is forwarded to 22 - or otherwise to have ssh listen on
> 5122.  I assume this is beyond MCC, and will entail editing iptables.
>   This is not something I'm familiar with.  Can someone please advise me?
>

Why not simply have sshd listen on 2 ports and skip need for port 
forwarding?


Just uncomment the "Port 22" line in /etc/ssh/sshd_config
and add a second line with the second port

so it would look like

Port 22
Port 5122

and restart sshd

with this all access that expects port 22 will continue to work,
and you can also access it through the new 5122 port.

Simple and effective, and no portforwarding needed.

--
Thomas





More information about the Mageia-discuss mailing list