Skip to content

Instantly share code, notes, and snippets.

@isaaguilar
Created December 28, 2017 18:40
Show Gist options
  • Select an option

  • Save isaaguilar/2c99b21b37fdd8e385fc5d4495c68736 to your computer and use it in GitHub Desktop.

Select an option

Save isaaguilar/2c99b21b37fdd8e385fc5d4495c68736 to your computer and use it in GitHub Desktop.

sshuttle usage

Start with sshuttle -r to sepcify the remote NAT/bastion/VPN host you'll want to tunnel through.

Then specify the subnet you'll want to use pass traffic to through the remote server. If you want to forward all traffic, use 0.0.0.0/0 or for a specific subnet (ie. like the subnet that the bastion can actually reach) just specify the block.

Finally -v is used for verbose output. Otherwise, it will run as a daemon.

sshuttle -r $REMOTE_USER@$REMOTE_SERVER $SUBNET_TO_FORWORD -v

Example

sshuttle -r ec2-user@54.91.56.20 10.100.0.0/16 -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment