sshuttle
all
Transparent proxy server that tunnels traffic over an SSH connection. Doesn't require root or any special setup on the remote SSH server, though root access on the local machine is prompted for.
More info →Options (2)
-r, --remotebooleanForward all IPv4 TCP traffic via a remote SSH server
Example:
sshuttle {{[-r|--remote]}} {{username}}@{{sshserver}} {{0.0.0.0/0}}-x, --excludebooleanForward all traffic except that which is bound for a specific subnet
Example:
sshuttle {{[-r|--remote]}} {{username}}@{{sshserver}} {{0.0.0.0/0}} {{[-x|--exclude]}} {{192.168.0.1/24}}Examples (4)
Forward all IPv4 TCP traffic via a remote SSH server
sshuttle [-r|--remote] username@sshserver 0.0.0.0/0Also forward all DNS traffic to the server's default DNS resolver
sshuttle --dns [-r|--remote] username@sshserver 0.0.0.0/0Forward all traffic except that which is bound for a specific subnet
sshuttle [-r|--remote] username@sshserver 0.0.0.0/0 [-x|--exclude] 192.168.0.1/24Use the tproxy method to forward all IPv4 and IPv6 traffic
sshuttle --method tproxy [-r|--remote] username@sshserver 0.0.0.0/0 ::/0 [-x|--exclude] your_local_ip_address [-x|--exclude] ssh_server_ip_addressmade by @shridhargupta | data from tldr-pages