Occasionally I need a poor man’s VPN on my Raspberry Pi. Enter sshuttle. If you read the docs, they will tell you to do something like this, if you want to “tunnel everything plus DNS”:

sshuttle --dns -r username@sshserver 0/0

So you try it. You get an error:

client_loop: send disconnect: Broken pipe

What to do? Well, it turns out that some Linux distributions (including Raspbian OS on the Pi) don’t like it when you tunnel everything. You need to explicitly exclude the address of the server you are connecting to. Let’s say you are connecting to a server with the IP address (or hostname) a.b.c.d.

You would need to do this:

sshuttle --dns -r user@a.b.c.d -x a.b.c.d 0/0

Boom! It works. I didn’t figure this out on my own. Some geniuses on GitHub worked it out, here. Thank them. ^_^