Live data from Hacker News

Building a Simple VPN with WireGuard with a Raspberry Pi as Server

snikt.net

101–110 of 126 posts

Re: Building a Simple VPN with WireGuard with a Raspberry Pi as Server

#101
post #18

Earlier quoted context omitted.

I was only able to get ~60mbps with OpenVPN through a hard wired Raspberry Pi 3 connected to Google Fiber, due to limitations of its bus. The 4 is supposed to be actual gigabit, but I have not yet tried it out to confirm.

Raspberry Pi 3 can do at least 250 Mbps. Perhaps it's limited by something else, like crypto or your actual connection?

Not the original Pi 3B, you're thinking of the 3B+. https://magpi.raspberrypi.org/articles/raspberry-pi-3-specs-...

Re: Building a Simple VPN with WireGuard with a Raspberry Pi as Server

#103

Cool project - if you're looking to set up a secure VPN in a quick, no-nonsense way, be sure to look at [Algo]( https://github.com/trailofbits/algo ). Does WireGuard (and IPSec if you want), only secure, sane defaults, and nothing more. Hands down the easiest, most secure way to setup a modern VPN in a few minutes. Far better than using some random anonymous VPN service running out of some random person's closet that…

Or even quicker (no need to deal with Ansible) for IKEv2 IPSec only, my Bash script: https://github.com/jawj/IKEv2-setup

Re: Building a Simple VPN with WireGuard with a Raspberry Pi as Server

#104

A question for people with experience in this area: I've been considering setting up WireGuard so I can keep my mobile phone always connected to my home network. Will I experience degraded network performance (either latency or bandwidth) if I have my mobile phone always connected to a VPN 24/7? My phone is an iPhone 11 Pro and I would be running WireGuard on a Pi4

Depends on how you want to use it.

If you want all your network traffic to go via your home network instead of normally over the internet, you will experience degraded network performance and it'll mostly depend on how fast your home network is & how far it is network-topologically from your phone.

Re: Building a Simple VPN with WireGuard with a Raspberry Pi as Server

#106
post #98

Ironically this looks considerably simpler than trying to get wireguard working on my OpenWRT router (and with much less collateral damage should I mess up). I might give this a try!

I've been running a WireGuard VPN on my OpenWrt router for quite a while with no issues whatsoever. Rock solid since I set it up, only has a 4 or 5 peers, but it's been excellent and I highly suggest it versus adding yet another single purpose device. Not sure why the RPi is so lauded for this and Pi-Hole (which is just a fancy DNS blocklist) when OpenWrt is just as simple and powerful for both (and more) tasks.

My main issue with doing this with OpenWRT is that it is loaded with abstractions. Network, interfaces, firewall zones, bridged zones, etc. When they all work, it's nice and almost magical.

But when setting up new custom zones from scratch (like this VPN subnet/zone), I never feel quite as home as I do with the traditional Linux command-line and iptables.

Basically OpenWRTs abstractions don't map cleanly to the underlying Linux-primitives I know fairly well. The impedance mismatch there is what make me consider the RPi-based solution more preferable, because I understand how and why it works.

Re: Building a Simple VPN with WireGuard with a Raspberry Pi as Server

#107
post #100
post #52

Earlier quoted context omitted.

+1 for Algo. I've been using it since last year on a VM (took under 5 minutes to setup), for firewall access (SSH, RDP, DBs etc.) to work servers. Works great for secure access from anywhere when working remotely or travelling.

Also check out Streisand[0] if you're interested in this. [0] https://github.com/StreisandEffect/streisand

I've had good luck with Streisand.

The major advantage to using Streisand instead of Algo is that it comes with lots of obfuscation goodies to help get around restrictive firewalls, like shadowsocks.

Also, if you're on a restrictive firewall and you need to quickly assess what ports are even open for egress, you can do `nmap --open allports.exposed` to find them. Then use one of streissand's VPN options and connect.

Re: Building a Simple VPN with WireGuard with a Raspberry Pi as Server

#108

Earlier quoted context omitted.

About how much more consumption?

On an iPhone you will not notice the difference, it's negligible

It does shows around 15% battery usage in settings if wireguard is always on for my iPhone 11

Re: Building a Simple VPN with WireGuard with a Raspberry Pi as Server

#109
post #40

Earlier quoted context omitted.

Rpi 3b has proper gigabit Ethernet though. Edit: 3B+. My bad.

"faster (300 mbps) Ethernet"[1] [1]: https://www.adafruit.com/product/3775

It's basically a 1 Gbps PHY connected to 480 Mbps USB 2.0, so it's 240 Mbps Ethernet.

Re: Building a Simple VPN with WireGuard with a Raspberry Pi as Server

#110

Earlier quoted context omitted.

On an iPhone you will not notice the difference, it's negligible

It does shows around 15% battery usage in settings if wireguard is always on for my iPhone 11

I dont think you can express Wireguard's battery usage by that %.

Imagine these 2 use cases:

#1. You do not use/touch your iPhone for 24 hours. Wireguard will now show 40% of the total battery that was used.

#2. You play the game Tetris for 24 hours. Wireguard will now show less than 1% of the total battery that was used. Because Tetris used the other 99,9%.

Post reply on HN