Zum Inhalt

OpenWrt - WireGuard VPN

OpenWrt supports WireGuard! So why not use the VPN services on all your devices when you are not at home to use your own adblocker and other services you run on an OpenWrt device and have access to your local network.

All articles of the OpenWrt series

The setup of the WireGuard server is not really difficult and straight forward.

OpenWrt - WireGuard VPN

Software Installation

opkg update

opkg install wireguard-tools luci-proto-wireguard luci-app-wireguard luci-i18n-wireguard-en luci-i18n-wireguard-de

Optional software to create QR codes of the WireGuard peers setting.
Recommended it makes the setup of new peers very easy!

opkg install qrencode

After a successful installation restart network and uhttp

/etc/init.d/network restart
/etc/init.d/uhttpd restart

Create Wireguard Interface

Before you can start to create the WireGuard interface you maybe have to restart your network.

OpenWrt - WireGuard VPN

On CLI you can restart the network with restart command.

/etc/init.d/network restart

Create a new interface named WG0.

OpenWrt - WireGuard VPN

Select protocol WireGuard VPN.

OpenWrt - WireGuard VPN

General Settings

OpenWrt - WireGuard VPN

  • Click Generate new key pair to create new keys for the WireGuard server.
  • Listen Port = 51820
  • IP Addresses = (this shall be an IP address which is totally different to the private IP range 192.168.xxx.xxx to avoid and IP conflicts.)

Advanced Settings

OpenWrt - WireGuard VPN

Firewall Settings

Click in ---custom--- field and enter a name for a new firewall zone.

OpenWrt - WireGuard VPN

Firewall zone wg0 will be created automatically by OpenWrt.

OpenWrt - WireGuard VPN

DHCP Server

OpenWrt - WireGuard VPN


OpenWrt - WireGuard VPN

How to connect WireGuard peers are described in detail in this manual:

WireGuard got installed on the OpenWrt device. Please refer 👉 OpenWrt - Network configuration
to for a detailed description how to set up a firewall.

All articles of the OpenWrt series

Gib mir gerne einen Kaffee ☕ aus ❗️

Wenn dir meine Beiträge gefallen und geholfen haben, dann kannst du mir gerne einen Kaffee ☕️ ausgeben.

Donation via PayPalDonation via LiberaPay

Donation via Bitcoin
Bitcoin Address: bc1qfuz93hw2fhdvfuxf6mlxlk8zdadvnktppkzqzj

  • Official OpenWrt Logo - https://OpenWrt.org/_media/docs/guide-graphic-designer/OpenWrt-logo-usage-guidelines.pdf
  • https://www.wireguard.com/