Tunnel all Internet traffic - Pi-hole documentation (2024)

Routing your entire Internet traffic is optional, however, it can be advantageous in cases where you are expecting eavesdropping on the network. This may not only happen in insecure open Wi-Fi networks (airports, hotels, trains, etc.) but also in encrypted Wi-Fi networks where the creator of the network can monitor client activity.

Rerouting the Internet traffic through your Pi-hole will furthermore cause all of your Internet traffic to reach the Internet from the place where your WireGuard server is located. This can be used to obfuscate your real location as well as to be allowed to access geo-blocked content, e.g., when your Pi-hole is located in Germany but you are traveling in the United States. If you want to access a page only accessible from within Germany (like the live-broadcast of Tagesschau, etc.), this will typically not work. However, if you route your entire Internet through your Pi-hole, your network traffic will originate from Germany, allowing you to watch the content.

Create a second profile

Instead of editing your existing configuration, you can easily add a new one with the modified AllowedIPs line as above. This will give you two tunnel variants and you decide - at any time from mobile - which variant you want. The one with only the DNS traffic being safely forwarded to your Pi-hole or the variant where your entire Internet traffic is encrypted and sent through your Pi-hole. You can choose at any time which is the best solution in your current situation (e.g., trusted network, unencrypted airport Wi-Fi, etc.).

Ensure you're already forwarding traffic

The following assumes you have already prepared your Pi-hole for IP forwarding and enabled NAT. If this is not the case, follow the steps over there before continuing here.

If you haven't done this, your clients will apparently have no Internet connection whilst local connections may still work. This is a hard to debug situation so please ensure you have everything set up to avoid hours of troubleshooting.

To route all traffic through the tunnel to a specific peer, add the default route (0.0.0.0/0 for IPv4 and ::/0for IPv6) to AllowedIPs in the [Peer] section of your clients's WireGuard config files:

AllowedIPs = 0.0.0.0/0, ::/0
Exemplary client config file with this change
[Interface]PrivateKey = [your client's private key]Address = [Wireguard-internal IPs of your client, e.g. 10.100.0.2/32, fd08:4711::2/128]DNS = 10.100.0.1[Peer]AllowedIPs = 0.0.0.0/0, ::/0Endpoint = [your server's public IP or domain]:47111PublicKey = [public key of the server]PresharedKey = [pre-shared key of this client]PersistentKeepalive = 25

The important change is setting the [Peer] -> AllowedIPs entry to 0.0.0.0/0, ::/0

Change this setting only on your clients

Do not set this on the server in the [Interface] section. WireGuard will automatically take care of setting up correct routing so that networking still functions on all your clients.

That's all you need to do. You should use an online check (e.g. www.wieistmeineip.de) to check if your IP changed to the public IP address of your WireGuard server after this change. It is possible to add this change only for a few clients, leaving the others without a full tunnel for all traffic (e.g., where this is not necessary or not desired).

Tunnel all Internet traffic - Pi-hole documentation (2024)

FAQs

Does WireGuard tunnel all traffic? ›

0.0/0 means all trafic gets routed through your wireguard VPN. But you could also only send specific IP's through the VPN. For eg with: 192.168. 1.100/32, 192.168.

Can Pi-hole be used as a VPN? ›

Via this VPN, you can: use the DNS server and full filtering capabilities of your Pi-hole from everywhere around the globe. access your admin interface remotely. encrypt your Internet traffic.

How do I tunnel all traffic through VPN? ›

Navigate to VPN | Settings and create the VPN policy for the Remote site. You can name the policy as VPN to Central Network. Select the Network tab and under Local Networks you can chose X0 Subnet. Under Remote Networks, select Use this VPN Tunnel as the default route for all Internet traffic.

Is WireGuard full tunnel? ›

WireGuard supports Full Tunnel VPN routing.

Which is better SSH or WireGuard tunnel? ›

WireGuard is cryptographically superior to SSH, attaches at a network layer without fussy interactions with a Unix shell (that then also needs to be accounted for in a security model), has higher performance, is practically bulletproof in terms of keeping connections alive, and gets you direct access to whatever ...

Does WireGuard encrypt all traffic? ›

WireGuard is used to secure the connection between your device and a VPN server. This is achieved with the creation of an encrypted tunnel through which your internet traffic is sent.

Does Pi-hole slow wifi? ›

The only way for Pi-hole to slow down your network is if you've set up something to route all traffic via the Pi-hole server. Pi-hole only handles DNS queries, there is no way for it to slow down the internet connection at all, it doesn't see or handle any traffic other than DNS queries.

Does Pi-hole track websites? ›

Pi-hole records DNS queries only (domain names), and then only if you have configured it to keep records. This information is retained both in an SQL database (/etc/pihole/pihole-FTL.

Is Pi-hole vulnerable? ›

A vulnerability has been discovered in Pihole that allows an authenticated user on the platform to read internal server files arbitrarily, and because the application runs from behind, reading files is done as a privileged user.

Does OpenVPN redirect all traffic? ›

Pushing the redirect-gateway option to clients will cause all IP network traffic originating on client machines to pass through the OpenVPN server. The server will need to be configured to deal with this traffic somehow, such as by NATing it to the internet, or routing it through the server site's HTTP proxy.

What is the difference between WireGuard full tunnel and split tunnel? ›

The main difference between a split tunnel vs. full tunnel VPN is that a full tunnel VPN shields all your online traffic with VPN encryption, while a split tunnel VPN allows you to divide your traffic, routing a portion of it through a VPN server while the rest of it travels the internet directly.

Which is more secure, WireGuard or OpenVPN? ›

There are no known security flaws in either protocol. If security is your topmost priority, the conservative option is OpenVPN. It has simply been around much longer than WireGuard, gone through more third-party security audits, and has a far longer track record than WireGuard.

Is IPsec faster than WireGuard? ›

IPsec and WireGuard VPNs are comparable performance-wise across most platforms, with WireGuard being slightly faster.

How many lines of code is WireGuard? ›

WireGuard requires about 4,000 lines of code versus OpenVPN's 70,000 lines of code, which makes security audits and verification much easier for researchers.

Does all my traffic go through VPN? ›

With a VPN, all the user's traffic is routed through a single IP address of the VPN server they're connected to. Without a VPN, the traffic will show that it's being routed through many different IP addresses, based on the different websites the user visits.

Can VPN see all network traffic? ›

Your data is encrypted between your device and the VPN server, but the VPN server decrypts the data as it leaves the VPN tunnel from your drive, and encrypts it as it enters the VPN tunnel to your device. This means that your VPN service can see your unencrypted internet traffic.

How do I know if my WireGuard tunnel is working? ›

To view the status of one or more WireGuard tunnels, use the show wireguard [<instance>] command. This command prints the status of all WireGuard tunnels and can optionally limit the output to a specific instance.

Top Articles
20 Ways to Save $20—Again and Again! – Prosperity Economics™
Top 10 most dangerous cities in the US
Jordanbush Only Fans
Kem Minnick Playboy
Metra Union Pacific West Schedule
Lifewitceee
Pinellas County Jail Mugshots 2023
Craigslist Vans
Rainbird Wiring Diagram
Gore Videos Uncensored
Ribbit Woodbine
Graveguard Set Bloodborne
Planets Visible Tonight Virginia
Alaska Bücher in der richtigen Reihenfolge
Cranberry sauce, canned, sweetened, 1 slice (1/2" thick, approx 8 slices per can) - Health Encyclopedia
‘Accused: Guilty Or Innocent?’: A&E Delivering Up-Close Look At Lives Of Those Accused Of Brutal Crimes
Where does insurance expense go in accounting?
Industry Talk: Im Gespräch mit den Machern von Magicseaweed
Jc Post News
Nj State Police Private Detective Unit
Busted Barren County Ky
Procore Championship 2024 - PGA TOUR Golf Leaderboard | ESPN
Simpsons Tapped Out Road To Riches
Dignity Nfuse
使用 RHEL 8 时的注意事项 | Red Hat Product Documentation
Unforeseen Drama: The Tower of Terror’s Mysterious Closure at Walt Disney World
Scout Shop Massapequa
Is Windbound Multiplayer
Doublelist Paducah Ky
Olivia Maeday
15 Primewire Alternatives for Viewing Free Streams (2024)
Marilyn Seipt Obituary
Stockton (California) – Travel guide at Wikivoyage
Renfield Showtimes Near Marquee Cinemas - Wakefield 12
How to Watch the X Trilogy Starring Mia Goth in Chronological Order
Texas Baseball Officially Releases 2023 Schedule
Zero Sievert Coop
New Gold Lee
Henry County Illuminate
How are you feeling? Vocabulary & expressions to answer this common question!
Ksu Sturgis Library
2023 Fantasy Football Draft Guide: Rankings, cheat sheets and analysis
Walmart Pharmacy Hours: What Time Does The Pharmacy Open and Close?
Kutty Movie Net
Blackwolf Run Pro Shop
Jaefeetz
Pickwick Electric Power Outage
Server Jobs Near
Unit 4 + 2 - Concrete and Clay: The Complete Recordings 1964-1969 - Album Review
Bunbrat
Dr Seuss Star Bellied Sneetches Pdf
Latest Posts
Article information

Author: Maia Crooks Jr

Last Updated:

Views: 5754

Rating: 4.2 / 5 (63 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Maia Crooks Jr

Birthday: 1997-09-21

Address: 93119 Joseph Street, Peggyfurt, NC 11582

Phone: +2983088926881

Job: Principal Design Liaison

Hobby: Web surfing, Skiing, role-playing games, Sketching, Polo, Sewing, Genealogy

Introduction: My name is Maia Crooks Jr, I am a homely, joyous, shiny, successful, hilarious, thoughtful, joyous person who loves writing and wants to share my knowledge and understanding with you.