Skip to content

SSH Tunneling

Description

SSH port forwarding is a mechanism in SSH for tunneling application ports from the client machine to the server machine, or vice versa. It can be used for adding encryption to legacy applications, going through firewalls, and some system administrators and IT professionals use it for opening backdoors into the internal network from their home machines.

Usage

Map port from remote machine/network on local machine

ssh -L 9002:127.0.0.1:3306 qu35t@qu35t.pw   

Make local port accessable to remote machine

ssh -R 9004:127.0.0.1:9002 qu35t@qu35t.pw   

ssh -D 7000 qu35t@qu35t.pw
qu35t@qu35t.pw:~$ ~C
ssh> -L 9002:127.0.0.1:3306

Proxychains

Add this following line at the end of the /etc/proxychains.conf file.

socks5 127.0.0.1 7000

proxychains -q nmap -T4 -sn 172.10.0.0/24

References