Skip to content

Tunneling and proxying through SSH

Lately I have found myself in situations in which I needed to bypass some limitations of the network I was connected to, name it bypassing an paranoid firewall or proxying my connection when my ISP lost access to part of the Internet.

Whatever you use it for, it is none of my business… it is not rocket science and is available anywhere online, but I also blog it so that I can use it as a reference in the future :)

SOCKS proxy server (makes the remote machine act as a SOCKS proxy server through a port of the local machine)

ssh -D localport remote.machine.com

REVERSE TUNNEL (makes a port in the remote machine connect directly to a port in the local machine)

ssh -nNT -R localport:local.machine.com:remoteport remote.machine.com

FORWARD TUNNEL (makes a port in the remote machine available in a port in the local machine)

ssh -L localport:local.machine.com:remoteport remote.machine.com

Hope it will be useful for you too… and if you know of more possibilities, do not hesitate to share them with the rest :)

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

Post a Comment

Your email is never published nor shared. Required fields are marked *