4 ms·
I prefer to tunnel my traffic through an SSH tunnel. VPNs are OK too, but SSH does what I want, and I can control it.
by innocentoldguy 10y ago
I prefer to tunnel my traffic through an SSH tunnel. VPNs are OK too, but SSH does what I want, and I can control it.
- gricardo99 10y agoCould you provide a few more details on how your setup works? You SSH tunnel to where? Your own cloud instance?
- selckin 10y agocheck out sshuttle for one cool way to do it
- innocentoldguy 10y agoSure. Basically, I set up SSH on a server somewhere (I actually have many), and a local SSH key (I don't use passwords with SSH). The SSH server can be a cloud server or a physical one; it doesn't matter. Then, I create an alias in my .zshrc or .bashrc configuration file to easily create a tunnel to that server, like this: alias <alias_name>="ssh -D 8080 -f -C -q -N <username>@<host>" Then, I go into my network settings and create a local SOCKS 5 proxy that points to the port I'm tunneling through (8080 in this case). Once I've done this, everything between me and the remote server is encrypted, and it appears that I'm browsing from the remote location. This works well for services that are not available in my country, as long as I can set up a server in the country I want to appear to be coming from. If you want to keep the SSH tunnel open all the time, you can use autossh, like this: autossh -M 20000 -p <port> -D 8088 -f -C -q -N <username>@<host>
- derwiki 10y agoHow do you do this on your phone?
- rz2k 10y agoYou could probably do this with Termius (formerly ServerAuditor) https://termius.com/ https://termius.com/
- davidcollantes 10y agoVPN also does what I want, and I can control it[0]. Client connection works out of the box on Windows, macOS and iOS, no further fiddling. [0] https://github.com/hwdsl2/setup-ipsec-vpn https://github.com/hwdsl2/setup-ipsec-vpn
- innocentoldguy 10y agoThe problem with VPN services, at least when used to circumvent regional restrictions, is that a lot of other people do the same thing, and the VPN provider ends up getting blocked. I've never had that problem when using SSH. Also, with SSH, I own both the client and server, and setting it up is extremely easy. Setting up a VPN, when you do own both client and server, takes more effort, I think.