How to create reverse dynamic ssh port forwarding
On local side (Server S), start your openssh server server. This will start ssh server by default on port 22 - you could change this port in /etc/ssh/sshd_config file, if necessary.
service ssh start
On remote side (Client A), start a socks proxy AND set a remote port on the local side to connect to the socks proxy.
ssh -N -D 127.0.0.1:8888 -p 22 <server-s>
ssh -N -R 2222:127.0.0.1:8888 -p 22 <server-s>
On local side (Server S), use socks proxy setup on port 2222 via e.g. to connect to Google.
curl --socks5 127.0.0.1:2222 https://www.google.com
Comments
Post a Comment