WireGuard VPS Installatiehandleiding 2026: Bouw Je Eigen VPN
TUTORIAL 10 min read fordnox

WireGuard VPS Installatiehandleiding 2026: Bouw Je Eigen VPN

Stel WireGuard VPN in op je VPS in 10 minuten. Volledige handleiding met configuratie, client-installatie en beste beveiligingspraktijken.


WireGuard VPS Installatie: Je Eigen VPN in 10 Minuten

WireGuard is het snelste en eenvoudigste VPN-protocol. Stel het in op een goedkope VPS en je hebt je eigen privé-VPN — geen abonnementen, geen logs, volledige controle.

Waarom WireGuard?

VPN-protocolSnelheidEenvoudCodeomvang
WireGuardSnelst~4.000 regelsKlein
OpenVPNGoed~100.000 regelsGroot
IPSecGoed~400.000 regelsEnorm

WireGuard is:

VPS-vereisten

WireGuard is ongelooflijk licht:

De VPS-specificaties zijn belangrijker voor je bandbreedte dan voor WireGuard.

Beste VPS voor WireGuard

ProviderPlanPrijsBeste voor
VultrVC2$6/mnd32 locaties
HetznerCX11€3,79/mndBeste waarde
HostingerKVM1$4,99/mndGoed allround
DigitalOceanBasic$6/mndEenvoudige installatie

Voor VPN is locatie het belangrijkst. Kies een regio dicht bij je voor snelheid, of ver weg om geoblokkades te omzeilen.

Snelle Installatie (5 Minuten)

Stap 1: VPS Aanmaken

Elke Ubuntu 22.04+ VPS werkt. Log in via SSH:

ssh root@your-vps-ip

Stap 2: WireGuard Installeren

apt update
apt install wireguard -y

Stap 3: Sleutels Genereren

cd /etc/wireguard
wg genkey | tee privatekey | wg pubkey > publickey
chmod 600 privatekey

Stap 4: Serverconfiguratie Aanmaken

cat > /etc/wireguard/wg0.conf << 'EOF'
[Interface]
PrivateKey = YOUR_SERVER_PRIVATE_KEY
Address = 10.0.0.1/24
ListenPort = 51820
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE

[Peer]
PublicKey = CLIENT_PUBLIC_KEY
AllowedIPs = 10.0.0.2/32
EOF

Vervang:

Stap 5: IP-forwarding Inschakelen

echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf
sysctl -p

Stap 6: Firewall Openzetten

ufw allow 51820/udp

Stap 7: WireGuard Starten

systemctl enable wg-quick@wg0
systemctl start wg-quick@wg0

Verifieer:

wg show

Client-installatie

Clientsleutels Genereren

Op de server:

cd /etc/wireguard
wg genkey | tee client1-privatekey | wg pubkey > client1-publickey

Clientconfiguratie Aanmaken

cat > client1.conf << 'EOF'
[Interface]
PrivateKey = CLIENT_PRIVATE_KEY
Address = 10.0.0.2/24
DNS = 1.1.1.1

[Peer]
PublicKey = SERVER_PUBLIC_KEY
Endpoint = YOUR_VPS_IP:51820
AllowedIPs = 0.0.0.0/0
PersistentKeepalive = 25
EOF

Vervang:

Client aan Server Toevoegen

Bewerk /etc/wireguard/wg0.conf en voeg toe:

[Peer]
PublicKey = CONTENTS_OF_CLIENT1_PUBLICKEY
AllowedIPs = 10.0.0.2/32

Herladen:

wg syncconf wg0 <(wg-quick strip wg0)

Configuratie naar Client Overzetten

Optie 1: QR-code (voor mobiel)

apt install qrencode
qrencode -t ansiutf8 < client1.conf

Optie 2: Bestand veilig kopieren

cat client1.conf
# Copy contents to your device

Client-installatie per Platform

macOS

brew install wireguard-tools
# Create /etc/wireguard/wg0.conf with client config
sudo wg-quick up wg0

Of gebruik de WireGuard-app uit de Mac App Store.

Windows

  1. Download van wireguard.com
  2. Tunnel importeren → configuratie plakken
  3. Activeren

Linux

sudo apt install wireguard
# Create /etc/wireguard/wg0.conf
sudo wg-quick up wg0

iOS/Android

  1. Installeer de WireGuard-app
  2. Tunnel toevoegen → QR-code scannen of bestand importeren
  3. Verbinden

Meerdere Clients

Elke client heeft unieke sleutels en een uniek IP nodig:

# Generate for client2
wg genkey | tee client2-privatekey | wg pubkey > client2-publickey

Toevoegen aan serverconfiguratie:

[Peer]
PublicKey = CLIENT2_PUBLIC_KEY
AllowedIPs = 10.0.0.3/32

Maak de client2-configuratie aan met:

Split Tunneling

Routeer alleen specifiek verkeer via de VPN:

Alleen Bepaalde IP’s Routeren

In de clientconfiguratie:

AllowedIPs = 10.0.0.0/24, 192.168.1.0/24

Alleen deze subnetten gaan via de VPN.

Lokaal Netwerk Uitsluiten

AllowedIPs = 0.0.0.0/0, ::/0
PostUp = ip route add 192.168.1.0/24 via 192.168.1.1

DNS-configuratie

Cloudflare DNS Gebruiken

In de clientconfiguratie:

DNS = 1.1.1.1, 1.0.0.1

Je Eigen DNS Gebruiken (Pi-hole)

Als je Pi-hole op dezelfde VPS draait:

DNS = 10.0.0.1

DNS-lekken Blokkeren

Op de server, externe DNS blokkeren:

iptables -I FORWARD -i wg0 -p udp --dport 53 -j DROP
iptables -I FORWARD -i wg0 -p tcp --dport 53 -j DROP
iptables -I FORWARD -i wg0 -d 10.0.0.1 -p udp --dport 53 -j ACCEPT

Prestatie-optimalisatie

MTU-afstemming

Optimale MTU vinden:

ping -c 5 -M do -s 1400 your-vps-ip
# Decrease until no fragmentation

Instellen in configuratie:

[Interface]
MTU = 1420

Persistent Keepalive

Voor clients achter NAT:

PersistentKeepalive = 25

Stuurt elke 25 seconden een pakket om de verbinding actief te houden.

Beveiligingsverharding

Standaardpoort Wijzigen

Gebruik een niet-standaard poort (minder scanning):

Server:

ListenPort = 44321

Client:

Endpoint = your-vps-ip:44321

Fail2Ban voor WireGuard

# WireGuard doesn't log auth failures by default
# But you can monitor connection attempts
cat > /etc/fail2ban/jail.d/wireguard.local << 'EOF'
[wireguard]
enabled = false
# WireGuard is already secure by design
EOF

WireGuard is van nature veilig — onbekende sleutels worden stilletjes genegeerd.

Firewall Alleen voor WireGuard-poort

Voor een uitgebreide firewall-configuratie, zie onze VPS-beveiligingshandleiding.

ufw default deny incoming
ufw allow ssh
ufw allow 51820/udp
ufw enable

Probleemoplossing

Kan Geen Verbinding Maken

# Check WireGuard is running
wg show

# Check firewall
ufw status

# Check port is open
nc -zvu your-vps-ip 51820

Geen Internet via VPN

# Check IP forwarding
cat /proc/sys/net/ipv4/ip_forward
# Should be 1

# Check NAT rules
iptables -t nat -L POSTROUTING

Lage Snelheden

# Test without VPN
speedtest-cli

# Test with VPN
# If much slower, try different MTU

Verbinding Valt Weg

Voeg toe aan de client:

PersistentKeepalive = 25

Gebruik met Docker

WireGuard Container

version: '3.8'
services:
  wireguard:
    image: linuxserver/wireguard
    container_name: wireguard
    cap_add:
      - NET_ADMIN
      - SYS_MODULE
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=UTC
      - SERVERURL=your-vps-ip
      - PEERS=5
    volumes:
      - ./config:/config
    ports:
      - 51820:51820/udp
    sysctls:
      - net.ipv4.conf.all.src_valid_mark=1
    restart: unless-stopped

Genereert automatisch configuraties voor 5 peers in ./config/peer*.

WireGuard vs Commerciele VPN

FactorWireGuard VPSNordVPN/etc
Kosten~$5/mnd$3-12/mnd
Servers1 (van jou)5000+
SnelheidSnelstGoed
PrivacyVolledigVertrouw hen
LoggingGeen”Geen logs”
ControleVolledigGeen

Je eigen VPS = je eigen regels. Als je de voorkeur geeft aan zero-config VPN met SSO, bekijk dan Tailscale.

Multi-locatie Setup

Voor meerdere uitgangspunten:

  1. Maak een VPS aan in verschillende regio’s
  2. Stel WireGuard in op elk ervan
  3. Maak configuraties aan voor elk
  4. Wissel ertussen
# Switch to US exit
wg-quick down wg0
wg-quick up wg-us

# Switch to EU exit
wg-quick down wg-us
wg-quick up wg-eu

Veelgestelde Vragen

Is WireGuard veilig?

Absoluut. Maakt gebruik van moderne cryptografie (Curve25519, ChaCha20, Poly1305). Geauditeerd door beveiligingsonderzoekers.

Kan mijn ISP zien dat ik een VPN gebruik?

Ze kunnen versleuteld verkeer naar het IP-adres van je VPS zien, maar niet de inhoud.

Hoeveel apparaten kunnen verbinding maken?

Onbeperkt. Voeg meer [Peer]-secties toe.

Werkt WireGuard in China?

Soms. Het kan worden geblokkeerd. Overweeg obfuscatietools zoals udp2raw.

WireGuard vs OpenVPN?

WireGuard is sneller en eenvoudiger. OpenVPN is meer configureerbaar. Voor de meeste gebruikers wint WireGuard.

Aanbevolen Setup

GebruikssituatieVPSLocatie
Algemene privacyHetzner CX11Dichtstbijzijnde regio
Streaming VSVultrVS (NYC, LA)
Streaming VKVultrLonden
Maximale snelheidLokale regioZelfde land

€3,79/maand geeft je een privé-VPN die sneller is dan elke commerciele optie. Geen logs, geen limieten, gewoon je eigen server.

~/wireguard-vps-setup/get-started

Ready to get started?

Get the best VPS hosting deal today. Hostinger offers 4GB RAM VPS starting at just $4.99/mo.

Get Hostinger VPS — $4.99/mo

// up to 75% off + free domain included

// related topics

wireguard vps wireguard installatie vps vpn eigen vpn bouwen wireguard server

// related guides

Andrius Putna

Andrius Putna

I am Andrius Putna. Geek. Since early 2000 in love tinkering with web technologies. Now AI. Bridging business and technology to drive meaningful impact. Combining expertise in customer experience, technology, and business strategy to deliver valuable insights. Father, open-source contributor, investor, 2xIronman, MBA graduate.

// last updated: February 8, 2026. Disclosure: This article may contain affiliate links.