talira

sshuttle

Where transparent proxy meets VPN meets ssh

open sourceLGPL-2.1self-hostablefree

sshuttle is a transparent proxy that works like a VPN over SSH: give it a remote host you can reach with ssh and the subnets behind it, and traffic from your machine (or a router) to those subnets goes through the SSH connection, with no port forward per host and no admin access needed on the remote network. It avoids TCP-over-TCP by carrying data streams rather than packets, which the docs explain gives better performance than OpenSSH's tunnel feature. It can forward DNS, and on Linux it works through NAT (iptables), nftables or TPROXY, which also carries UDP; on macOS, FreeBSD, OpenBSD and pfSense it uses pf, and Windows support is experimental. It can run as a systemd service that notifies systemd when the tunnel is up.

Problems it solves

  • reach every host on a remote network through SSH without setting up a VPN
  • I only have SSH access to a jump box but need to reach the whole private subnet behind it
  • openssh port forwarding one port at a time is tedious and slow
  • a poor man's VPN for a network I don't administer
  • route DNS lookups through the remote network over SSH

Features

  • VPN-like access to remote subnets over SSH
  • no admin access needed on the remote side
  • avoids TCP-over-TCP
  • DNS forwarding
  • Linux NAT, nftables and TPROXY methods (TPROXY adds UDP)
  • pf method on macOS, FreeBSD, OpenBSD and pfSense
  • IPv4 and IPv6
  • systemd service with readiness notification

Limitations

  • UDP is forwarded only with the Linux TPROXY method; the other methods carry TCP and DNS only.1
  • Windows support is experimental.1
  • It needs sudo or root on the client machine, and Python 3.10 or later on both the client and the server.1

Capabilities

Has a command line toolplan not known

Alternatives

The same job

These do what sshuttle does.

  1. Tailscale Private WireGuard networks made easy
  2. WireGuard Fast, modern, secure VPN tunnel
  3. Pangolin Secure access to your apps, infrastructure and AI, built on WireGuard
  4. Pritunl Enterprise Distributed OpenVPN WireGuard and IPsec Server

Compare sshuttle with the top 3