sshuttle
If we have root privileges and a client that allows ssh w/ python installed we can use sshuttle. sshuttle however, is not a lightweight option.
Basic Usage
Sshuttle can be extremely useful for automating the execution of iptables and adding pivot rules for the remote host.
Running sshuttle
To use sshuttle, -r
connects to a remote server with a username and password. We then include the network or IP we want to route traffic to.
NOTE: sshuttle automatically creates an entry in our iptables to redirect all traffic to the 172.16.5.0/23 network through the pivot host.
Using Tools with Shuttle
Another Example
This example we set up a ssh tunnel on our jump host to a server on the internal network that has ssh enabled: 10.4.50.215:22
We specifying the SSH connection want to use, as well as the subnets that we want to tunnel through this connection (10.4.50.0/24 and 172.16.50.0/24). (The ssh connection is the tunnel on our jump host - traffic flows to 10.4.50.215:22).
Sshuttle is incredibly powerful because we can specify what subnets we want to tunnel our traffic through.
Last updated