Skip to content

Commit 10e0a68

Browse files
author
marci
committed
Füge Anleitung zur Verwendung von Pihole VPN mit Wireguard hinzu
1 parent cbef024 commit 10e0a68

3 files changed

Lines changed: 139 additions & 5 deletions

File tree

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
---
2+
title: “Use Pihole VPN with Wireguard in 2024”
3+
date: 2024-02-27
4+
descripton: “Use Pihole VPN with Wireguard | In this tutorial, I will show you how you can use Pihole on the go with the help of VPN.”
5+
hero: /images/posts/pihole/pihole-raspberry-vpn.png
6+
menu:
7+
sidebar:
8+
name: Pi-hole with WireGuard and piVPN
9+
identifier: pihole-vpn
10+
parent: pihole
11+
categories:
12+
- “Linux”
13+
- ‘Network’
14+
- “Security”
15+
- “Tutorials”
16+
- “Video”
17+
tags:
18+
- “linux”
19+
- “pi-hole”
20+
- “security”
21+
- ‘tutorials’
22+
- “video”
23+
---
24+
## Pihole VPN - No ads on your smartphone
25+
In this tutorial, ‘**pihole VPN with Wireguard**’, I would like to show you how you can use the ‘**PiVPN**’ application to access your **Pihole** on your **smartphone, tablet, or laptop** and thus enjoy the benefits of Pihole, namely surfing without annoying ads, even when you're **on the go**.
26+
I'll show you how it all works in my video on my YouTube channel!
27+
28+
29+
### Prerequisites for this tutorial
30+
To make setting up a VPN server with Pi-hole as easy as possible, your setup must meet the following requirements.
31+
32+
> ### Note
33+
>
34+
> **If you do not meet these requirements, you can recreate the individual requirements here:**
35+
>
36+
> - [Install Pi-hole](https://secure-bits.org/pi-hole-auf-einen-raspberry-pi-installieren/ “Install Pihole on a Raspberry Pi”)
37+
>
38+
> - [Pi-hole and Fritzbox](https://secure-bits.org/fritzbox-pi-hole-fritzbox-konfigurieren/ “Configure Fritzbox for Pihole”)
39+
>
40+
> - DynDNS with DuckDNS
41+
> - Optionally, I would recommend securing SSH access
42+
Secure SSH access
43+
- **A finished and running Pi-Hole instance on a Raspberry Pi or similar (VM, Banana Pi, etc.).**
44+
- **The Pi-hole is set up as an internal DNS server on your Fritzbox.**
45+
- **You have set up a DynDNS address in your Fritzbox (e.g., DuckDNS).**
46+
Optional:
47+
- **Secure SSH access**
48+
## Video tutorial on ‘pihole VPN with Wireguard’.
49+
{{< youtube 4N0fkV7nS6k >}}
50+
## Commands for setting up Pi-hole, PiVPN, and WireGuard
51+
All commands I use in the video to install PiVPN and configure Pi-hole and WireGuard are listed here in chronological order.
52+
### Please note!
53+
This blog post only summarizes the commands for installing and setting up PiVPN with Pi-hole. **You can see the individual setup steps in the video!**
54+
### Pihole VPN - Installing the UFW firewall
55+
To secure the Raspberry Pi with Pi-hole and PiVPN, the UFW firewall is installed and configured on the system.
56+
```bash
57+
# Installing the UFW firewall
58+
sudo apt install ufw
59+
# Configuring the UFW firewall
60+
sudo ufw allow 80,53,67/tcp
61+
# Only allow SSH access from your internal network area. Important!!! Adjust the IP address range (in this example 192.168.178.0/24) to your network area if necessary
62+
sudo allow from 192.168.178.0/24 to any port 22/tcp<figcaption>
63+
sudo ufw allow 53,67,58120/udp # 51820 is the port for WireGua<figcaption>
64+
# When using IPv6
65+
sudo ufw allow 546:547/udp
66+
# Activating the firewall
67+
# Please note that the correct port for SSH is specified above in the rules! Otherwise, you will lock yourself out via SSH!
68+
sudo ufw enable
69+
```
70+
### Pihole VPN - Installing and setting up PiVPN on the Raspberry Pi
71+
Here are the commands for installing PiVPN on the Raspberry Pi.
72+
```bash
73+
# Command to install PiVPN
74+
sudo curl -L https://install.pivpn.io | bash
75+
```
76+
#### PiVPN WireGuard - Command list
77+
Here is a list of all commands for configuring WireGuard under PiVPN as well as the PiVPN package itself.
78+
```bash
79+
# List of all commands for PiVPN WireGuard
80+
pivpn -a -> Create client
81+
pivpn -c -> List all connected clients
82+
pivpn -d -> Start a debugging session for troubleshooting
83+
pivpn -l -> List all configured clients
84+
pivpn -qr -> Display a QR code for configuring a mobile client (e.g., cell phone, tablet with the WireGuard app)
85+
pivpn -r -> Delete a client
86+
pivpn -h -> Display the help dialog
87+
pivpn -u -> Uninstall PiVPN
88+
pivpn -up -> Update PiVPN
89+
pivpn -bk -> Create a backup of the VPN configurations and user profiles
90+
```
91+
### Additional information on the topic ‘Pi-hole VPN’
92+
For more information on this topic, I have compiled some links here:
93+
94+
**Everything about WireGuard:**
95+
96+
- [https://www.wireguard.com/](https://www.wireguard.com/)
97+
98+
**Everything about PiVPN:**
99+
100+
- [https://docs.pivpn.io/](https://docs.pivpn.io/)
101+
102+
- [https://github.com/pivpn/pivpn](https://github.com/pivpn/pivpn)

content/posts/pihole/pihole-with-the-latest-php-version.en.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ hero: /images/posts/pihole/pihole-raspberry-php.png
55
date: 2024-03-06
66
menu:
77
sidebar:
8-
name: Pi-hole mit der aktuellsten PHP-Version installieren
8+
name: Pihole always with the latest PHP version
99
identifier: pihole-php
1010
parent: pihole
1111
categories:

hugo.yaml

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,37 @@ outputs:
9393
- JSON
9494

9595
# Enable global emoji supportimaging:
96+
enableEmoji: true
97+
anchor: Smart
98+
bgColor: '#ffffff'
99+
hint: photo
100+
quality: 75
101+
resampleFilter: box
102+
103+
104+
imaging:
96105
anchor: Smart
97106
bgColor: '#ffffff'
98107
hint: photo
99108
quality: 75
100109
resampleFilter: box
101-
enableEmoji: true
110+
111+
lazyload:
112+
enable: true
113+
# Use the native lazy loading feature of the browser
114+
native: true
115+
# Use the native lazy loading feature of the browser for images
116+
images:
117+
native: true
118+
# Use the native lazy loading feature of the browser for iframes
119+
iframes: true
120+
# Use the native lazy loading feature of the browser for videos
121+
videos:
122+
native: true
123+
102124

103125
# Site parameters
104-
# public_key unter Linux und macOS auf einen Remote-Server kopieren
126+
105127
params:
106128

107129
# Background image of the landing page
@@ -114,6 +136,14 @@ params:
114136
# Background image of the landing page for dark theme
115137
#darkBackground: /images/site/background.jpg
116138

139+
analytics:
140+
enabled: false
141+
services:
142+
matomo:
143+
instance: https://analytics.securebits.org
144+
siteID: 1
145+
146+
117147
# Provide logos for your site. The inverted logo will be used in the initial
118148
# transparent navbar and the main logo will be used in the non-transparent navbar.
119149
logo:
@@ -165,7 +195,7 @@ params:
165195
enable: false
166196

167197
flowchart:
168-
enable: false
198+
enable: true
169199
services:
170200
katex:
171201
delimiters:
@@ -184,7 +214,7 @@ params:
184214
# Site parameters
185215

186216
videoPlayer:
187-
enable: true
217+
enable: false
188218
services:
189219
# convert .js-player class into video player via https://plyr.io/
190220
# Can play HTML5 Video, Audio, Youtube, Vimeo.
@@ -236,3 +266,5 @@ params:
236266

237267
newsletter:
238268
enable: false
269+
270+

0 commit comments

Comments
 (0)