I've generally considered an SSH tunnel as a poor man's VPN.
If you're going to the effort to spinup a machine, and use SSH anyway, i find it much easier to use `ssh user@server.com -D 4444` then I can set my browser's proxy settings to use localhost:4444 as a SOCKS5 proxy.
For those apps that don't have native proxy support, I use proxychains to force them over a proxy connection.<p>Ofcourse this is only useful for a single user, and for devices that can use ssh and proxies.
Or you could just use sshuttle with far less steps: <a href="https://github.com/sshuttle/sshuttle" rel="nofollow">https://github.com/sshuttle/sshuttle</a>
Since basically always, I'm still using PiVPN <a href="https://www.pivpn.io/" rel="nofollow">https://www.pivpn.io/</a><p>Is that out of favor nowadays, given new technologies like Wireguard have become mainstream? Would I be better off using this, or the Algo scripts that another commenter mentioned? (<a href="https://github.com/trailofbits/algo" rel="nofollow">https://github.com/trailofbits/algo</a>)
How does this compare to Algo[1]?<p>[1] <a href="https://github.com/trailofbits/algo" rel="nofollow">https://github.com/trailofbits/algo</a>
I followed a guide and made my own using OpenVPN on AWS Lightsail not (Digital Ocean). But once my AWS Lightsail trial was over the cost crept up and was quickly getting out of hand. I had to stop it and even delete everything since I was still being charged for a powered off VM!<p>It is an interesting project and it looks good on your resume if you're just starting out in IT.
`ssh -qND localhost:8080 user@ip` sets up a SOCKS proxy at localhost:8080. In your browser connection settings (at least in Firefox) you can set it up to route your traffic through the connection. It's not as good as a proper VPN for prolonged use, but for a quick one-off, it'll do the job.
My cyberghost vpn is under 3$/mo and has unlimited usage. It's hard to imagine any pay-as-you-go scheme coming even close from a cost perspective.
If you're spending $5 on a VPS, aren't there actual VPN services that cost $5 or less that you don't have to manually set up and destroy?<p>If you're just doing it for fun (kinda like "hosting your own mail") I recommend setting up an IKEv2 IPSec VPN. It might be the hardest VPN to set up? But you learn a good deal about VPNs and networking. Most OSes ship with a native IPSec VPN implementation, and most "enterprise" VPNs are some variation of IPSec. Mobile devices, internal firewalls, internet gateways, enterprise AWS tunnels, etc. You can keep getting fancier by adding VLANs, GRE, BGP, certificates, RADIUS.
Heh, right now i use WireGuard for exposing some of my homelab servers to the internet and to work around my ISPs NAT setup, WireGuard is really pleasant to use and simple to set up!<p>I recall using OpenVPN a few years ago for a similar use case in my university dorm, it was comparatively way worse - the configuration parameters were unclear, some of the documentation was out of date and even when using the faster (but less secure) methods of encryption, i found myself having a VPS that was overwhelmed and had almost 100% CPU usage (on its single core, since VPSes are generally expensive) whereas the client couldn't get much past 10 - 20 Mbps when the connection speed itself was closer to 100 Mbps.<p>Nowadays, for a VPN, i just use Time4VPS <a href="https://www.time4vps.com/virtual-private-network/?affid=5294" rel="nofollow">https://www.time4vps.com/virtual-private-network/?affid=5294</a> (affiliate link so i get discounts for signups, i also use them for most of my VPS hosting) because they're affordable and have more locations than i can get VPSes in those locations for comparable amounts of money. It seems like their offering is OpenVPN based which is surprising, since it works pretty well - makes me think that either i royally screwed up my own config back in the day (though default config should never hit 100% CPU usage like that, which happened to me), something was wrong with the system packages, or they just have beefier servers behind it, despite many users.
While it does not yet exist as an end to end solution, BlindTLS[0] is a technique which perfectly fits the description of a "poor man's vpn". You pay the vpn provider for a tiny fraction of the traffic, and you can safely route the rest directly through your own ISP. This should work around most censorship techniques or geographic blocking. It doesn't promise privacy though.<p>[0] <a href="https://dl.acm.org/doi/abs/10.1145/3473604.3474564" rel="nofollow">https://dl.acm.org/doi/abs/10.1145/3473604.3474564</a>
OP mentions DigitalOcean as a compute provider. Is there much info on which compute providers will ban you for, say, P2P or BitTorrent activity? Presumably this is against the ToS for most providers.
I'm suprised no one has mentioned Outline (<a href="https://getoutline.org/" rel="nofollow">https://getoutline.org/</a>) which provides full capability to setup a VPN easily on any major cloud providers with 1-click. It also provides mobile apps to use as well.<p>A great experience, and I'd say it just works.
Another cool tool to easily launch a VPN of your choice (WireGuard, OpenVPN, SSH) in a cloud provider.<p>I tried it out before just to test it out, it's pretty cool.<p><a href="https://github.com/StreisandEffect/streisand" rel="nofollow">https://github.com/StreisandEffect/streisand</a>
Could this be turned into a bash script without loss of functionality? I'm not trying to denigrate the work or Ansible as a tool in more complex scenarios.
The author's use for this is to circumvent geographical jurisdictional restrictions. If that is the aim (rather than privacy), then I don't understand how a $5 (per month) VPS along with all of the config and steps required (read: non-negligble time cost) is the "Poor man's" solution. Surely using any of the free forever unlimited VPNs would do the job at near zero cost?
it depends what your use case is, but if you are trying to mask you public IP, I'd been using Squid Proxy [0] for decades and even have production networks using it for scraping activity in a load balanced way<p>[0] <a href="https://en.m.wikipedia.org/wiki/Squid_(software)" rel="nofollow">https://en.m.wikipedia.org/wiki/Squid_(software)</a>
> Make sure you can ssh into the machine […]<p>This is the tricky part. SSH gets blocked in some LANs, so then you would have no way to spontaneously deploy your VPN server. So better deploy it ahead of time.
> Motivation: Lately due to GDPR many websites are blocking access in the EU. For me, I cannot order medicines back home via netmeds.com<p>Blaming GDPR for this is a bit like blaming a lead mine for getting shot. Yes, it's involved but it's not the reason. It only seems to be certain large US websites that carte-blanch refuse to serve EU visitors over GDPR, mostly those with large, tendril-filled advertising networks that have no "easy opt-out". Some sites (healthcare ones that tended to be SEO'd to the max when I searched for drug names as well as more mainstream ones like, iirc, the Washington Post) carte-blanch refuse to let you browse them without accepting unnecessary cookies; this <i>is</i> a direct breach of the legislation and yet they still want your traffic.<p>If someone won't sell you something because of GDPR -- legislation that protects your privacy, and in particular considers medical information as especially sensitive -- then you perhaps have to think rather carefully about if you wish to do business with them.<p>(For what it's worth, from a Danish IP, the site listed in the github repo works perfectly on my home network which admittedly contains a pihole-provided dns-level adblocking. It blocks tor and I don't have an easy way of testing it otherwise).