Live data from Hacker News

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

snikt.net

61–70 of 126 posts

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

#61

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!

WireGuard on OpenWRT isn't too different or difficult.

The luci-app-wireguard package is a bit quirky at times though.

You'll run into cpu bottlenecks with some of the lower end hardware though.

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

#62
post #49

Earlier quoted context omitted.

That's not open source. They make the source available but open source does not restrict what you can do with it other than sometimes requiring that you share the source for your binaries.

Open source just means you have or can get access to the source. FOSS Free open source software also gives you the rights to use the source.

FOSS implies restrictions on the developer in the service of end-user freedom, eg. copyleft and anti-tivoization.

Open source implies nearly unlimited rights for the developer, like BSD, MIT, or Apache.

With these idiosyncratic restrictions (noncommercial, research only, do no evil, etc) we typically say “disclosed source.”

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

#63
post #57
post #53

For anyone else wanting to set this up at home, I’d recommend installing the vyatta-wireguard module [1] on an EdgeRouter X instead. It costs about the same as a Raspberry Pi, and you get a reliable network appliance with four gigabit ports and PoE, rather than a general purpose Linux box with graphics and USB. I’ve found the WireGuard module to be fast enough to keep up with my 100/40 Mbps internet connection, and n…

I upgraded from an ER-X to an ER-4 because the X can’t do full 1000 Mbit with PPPoE fiber without hardware offload. With hardware offload turned on there’s a bug in the hardware that causes some sites, most notably Netflix, to not route at all. The ER-4 has been great with the Cavium hardware. No hardware offload issues like this. Edit: The ER-X tops out around 500 Mbit with hardware offload turned off.

Love my ER-4 and all its offloading capabilities. I just wish it had a switch chip so you could bridge ports without a performance penalty.

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

#64
post #49

Earlier quoted context omitted.

Open source just means you have or can get access to the source. FOSS Free open source software also gives you the rights to use the source.

FOSS implies restrictions on the developer in the service of end-user freedom, eg. copyleft and anti-tivoization. Open source implies nearly unlimited rights for the developer, like BSD, MIT, or Apache. With these idiosyncratic restrictions (noncommercial, research only, do no evil, etc) we typically say “disclosed source.”

[deleted]

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

#65
post #49

Earlier quoted context omitted.

Open source just means you have or can get access to the source. FOSS Free open source software also gives you the rights to use the source.

FOSS implies restrictions on the developer in the service of end-user freedom, eg. copyleft and anti-tivoization. Open source implies nearly unlimited rights for the developer, like BSD, MIT, or Apache. With these idiosyncratic restrictions (noncommercial, research only, do no evil, etc) we typically say “disclosed source.”

>Open source implies nearly unlimited rights for the developer, like BSD, MIT, or Apache.

Wrong: the GPL for example is defined as open-source by the Open Source Initiative (source: https://opensource.org/licenses) -- a fact that has not changed since the coining of the term "open source" over 20 years ago.

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

#66
post #49

Earlier quoted context omitted.

That's not open source. They make the source available but open source does not restrict what you can do with it other than sometimes requiring that you share the source for your binaries.

Open source just means you have or can get access to the source. FOSS Free open source software also gives you the rights to use the source.

>Open source just means you have or can get access to the source.

No, that is "source-code available". "Open source" was defined over 20 years ago by this document and that is still how most software people still use the term: https://opensource.org/osd

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

#67

Earlier quoted context omitted.

From their site: > commercial license is only needed if you want to offer a paid network management service or embed it into a proprietary device or app. A cursory look suggests that it's open source, with restrictions that they clearly list on their site here[0]. I get your point, but I personally don't mind if a business open sources their software and allows free use of it for non commercial cases. [0] https://www…

That's not open source. They make the source available but open source does not restrict what you can do with it other than sometimes requiring that you share the source for your binaries.

Open source and the developer's choice of license that let you do or not do something are two separate matters.

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

#68
post #59

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

Some bandwidth and latency downgrade seems certain. Google, Netflix, and others invest a lot to cache content closer to your phone. A VPN circumvents that approach. The experience, though, is individual enough, that nothing other than trying it would tell if it it's "good enough" for you.

You don't have to route all your traffic through the VPN (though it's unclear from the question whether or not that's the goal). If he only wants access to resources on his home network, it's entirely feasible to set that up while still routing other traffic out through the public internet via your ISP/carrier.

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

#69
post #53

For anyone else wanting to set this up at home, I’d recommend installing the vyatta-wireguard module [1] on an EdgeRouter X instead. It costs about the same as a Raspberry Pi, and you get a reliable network appliance with four gigabit ports and PoE, rather than a general purpose Linux box with graphics and USB. I’ve found the WireGuard module to be fast enough to keep up with my 100/40 Mbps internet connection, and n…

I have this router and set up the wg interface but got stuck at how to route all my home traffic through wg. Any recommendations on how to troubleshoot this part?

I believe you can do this with policy based routing rules. Effectively you create a second routing table where the default route goes through your wireguard device and then you create firewall modify rules that assign traffic to that routing table by source, your local LAN range and interface in this case.

The following article has an example of using policy based routing. Your setup isn't all that different, you don't need to have more than one default route in each routing table is all and you also might only need one additional route table.

https://help.ubnt.com/hc/en-us/articles/204952274-EdgeMAX-Po...

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

#70

I think there's some issues in the config. First of all, at least one of the CIDRs is wrong ("Address = 10.200.200.2/24"). Also by setting AllowedIPs to to 10.200.200.0/24 in the client , only traffic to that subnet will actually go through the VPN, not all traffic. Isn't there also some missing host/RPI system so that the 10.200.200.0/24 can route to the public internet? If someone has an example of a full VPN confi…

> First of all, at least one of the CIDRs is wrong ("Address = 10.200.200.2/24"). Also by setting AllowedIPs to to 10.200.200.0/24 in the client, only traffic to that subnet will actually go through the VPN, not all traffic.

Not sure what your issue is with the address line.

As for the AllowedIPs, that's intentional. From the first lines of the article:

> An Linux Laptop that should use the VPN only accessing network services that are exposed to the VPN

VPNs aren't just for routing your public traffic through some trusted host.

Post reply on HN