Using sshuttle

Problem: You need access to a machine on private network. The IP address to the machine is NOT public

Solution: If you have ssh access to a machine on the target network, use sshuttle to create proxy, allowing access to the rest of the network

Block diagram of an ssh connection
  1. Establish the ssh tunnel sshuttle -r <USER>:<PASSWORD>@<Host IP Address> <Allowable-Connections> -D
    1. -r – flag to input the hostname and user/password on the command line
    2. USER – user of the host machine
    3. PASSWORD – password to the host machine
    4. Host IP Address – IP address of the host proxy server
    5. Allowable-Connections – You can establish a range of IP addresses that will route through your ssh tunnel. Define this range using CIDR notation. By default, all connections are allowed (0/0)
    6. -D – flag to run sshuttle in a background process
  2. The tunnel created is an open connection to the private network via an ssh connection to a server on the private network
  3. Access a machine on the private network!

Helpful links:

Sshuttle Docs

Sshuttle Video Tutorial

Sshuttle Manual Page

Leave a Reply

Your email address will not be published. Required fields are marked *