OpenVPN Gateway + Wireguard VPN + PiHole and Dnscrypt

Hi everyone, I would like to buy a commercial VPN and I would like to be set on my Raspberry with OpenVPN so that all users connected to my network connect to the Raspberry and therefore to the VPN, without having to set each device (user) individually. On the Raspberry I have already installed my personal VPN server with Wireguard and PiHole (which also acts as a DHCP server) with Dnscrypt and it works great. My question is: can all of this be integrated into a single Raspberry? And if the answer is yes, how?

Welcome, Gory98 - this is the Pi-hole community forum. :slight_smile:

While we are good at helping with Pi-hole issues, your situation seems to revolve more around VPN gateways and RPis in general. (click for more)

By setting up your RPi as a VPN gateway, you will effectively turn it into a router, probably forcing all your network traffic (public and private, download and upload) to pass through your RPi, with at least public traffic still passing through your router (which will remain your RPi's gateway).

An RPi can be configured that way, yet I cannot unconditionally recommend that in general, for two reasons.

A RPi has at most one onboard Ethernet port, meaning that all traffic will enter and leave via that single cable.
With ISP download rates at or above 50MBit/s, this can become a serious bottleneck.

If you attach one or more secondary Ethernet ports via USB, your local traffic will hit reason number two:
RPis lack dedicated switching hardware that could route network packets with next to zero CPU and RAM usage, so every data packet has to be copied into RAM first, where CPU will decide on routing before pushing it back to the NIC.

Depending on your ISP's download speed, the number of clients in your network, your RPi's ethernet speed, and your personal overall network usage, these may negatively impact your perceived network speed anywhere from barely noticeable at all to excruciatingly slow.

So, if your router suppports it, consider making that your VPN gateway.
Its hardware is better equipped for gateway duty, and its software may well supply features you'd have to be careful to install and enable on your RPi (e.g. priority routing for VoIP and video streaming data).


You may have better chances for more specific advice on your how? at OpenVPN's or your aspiring VPN provider's forums. :wink: