WireGuard PiHole VPN for Raspberry Pi with iPhone (iOS)

Hi everyone,

I have successfully setup WireGuard to work with my PiHole on my Raspberry Pi Zero v1.3. I just wanted to share some links and a few comments:

WireGuard compiling and installation:

Notes:
Only follow the compiling and installation guide, ignore the rest.

Generating certificates and configuring the server and client:

Notes:
This missing piece to routing with my internal LAN and Internet, was adding the IP tables information to the server config file.

iPhone (iOS) client - TunSafe:
https://itunes.apple.com/us/app/tunsafe-vpn/id1441020790?mt=8

Notes:
Copy the config file from your terminal window or transfer the actual file into TunSafe VPN client. It should handle the rest of the setup for you.

Reasons why to use WireGuard over OpenVPN:

  1. It’s easier on the batteries of mobile devices due to smaller memory and CPU footprint, than OpenVPN.
  2. Supposedly it’s more secure than OpenVPN, due to smaller code base - I personally don’t think that’s true, because any software can be vulnerable regardless of the size of its code base.
  3. Works with switching between networks (e.g. going from WiFi to Cellular or vice versa).

I will add Android when I get a chance, but this is what I had time to try out for now.

Edit:

Just wanted to add this Arstechnica Article:

I will add android info when I get a chance. I have kids, house, and wife and two jobs taking up my free time to to work on that.

Edit 2:

Since there are questions about TunSafe’s security or code, here is the source code:

I appreciate anyone bringing stuff to my attention or correcting any mistakes or thing I overlooked. I have a very busy life, so I don’t have the time I used to have to research stuff. That’s why I love reddit, because the hive mind has informed in ways I couldn’t have done by myself- thank you all very much!

If you want to try out the the official WireGuard iOS app it’s currently available as beta in TestFlight

Hopefully there will be a simple installer for wireguard like PiVPN

You missed one of the biggest benefits of WireGuard: the connection speed. WireGuard is almost instant, whereas OpenVPN can take up to a minute to create the tunnel.

I run mine 24/7 with little no difference in battery life

Does this work on macOS? One of the main reasons I use a vpn is to remote in and I’d rather use a computer than an app if I’m doing anything besides a checkup on something or changing my blink1 status for a test

angle materialistic wipe bake treatment fuel party distinct lavish license

This post was mass deleted and anonymized with Redact

Interesting didn’t know there was an app for WG

Oh yes. Looking forward to the Android update. Well done.

So what server does this connect to? Do I need to host one and then use this when I’m abroad? Or do I use this with a slot from a host I pay for?

Is guess I’m trying to figure out the difference between this and nord or ipvanish

Thanks for the compilation of stuff. Wireguard is billed as “easier to set up than OpenVPN” but for me it’s the opposite.

Can you post (minus the keys, of course) what your conf file looks like so that all traffic passes through the VPN? Currently, when I run wireguard, it just takes down the internet at my house… :frowning:

Can I run it on TCP port from my router? The guard only mentioned UDP.

Where it says “1, Install kernel headers via rpi-source” then there is just a github link, what exactly do I do with it?

Thanks for the guide and pointers. Got this setup on my pi and have peers working from Mac, Android phone and chrome os. I have a question. In order to get pi hole DNS working I had to enable listen on all interfaces, permit all origins config in pi hole. Bit of a noob in this field so was wondering if this is fine or if there is a better way to set it up.

Edit: also for Android I had to change allowed ips to 192.168.2.0/24 instead of 192.168.2.1/24 as that would give me a bad address error. Config documented worked fine on my mac.

What kind of throughput are you getting?

What should I put in Endpoint?

The performance over OpenVPN is insane. I’ve been using Wireguard for years and never once noticed any performance hit.

The battery difference for my initial test is barely noticeable, maybe 15 minutes extra battery life on an iPhone 7 Plus. However, the VPN connects ridiculously faster than OpenVPN and surfing the web over Visible (a Verizon MVNO) is much faster too. I will likely use both VPNs, with WebGuard for mobile devices and OpenVPN for beefier machines (laptops).

There is a Windows app:

Cheers!

Could you please share this info on this thread?

I think it would help a lot and me as well, since my time for experimentation is quite limited.