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.

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


Go to all articles of this series and the description of the test setup:

Test Setup
Test Setup

OpenWRT – Overview


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

Gib mir gerne einen Kaffee ☕ aus!

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

PayPal Logo


liberapay.com/strobelstefan.org


Kaffee via Bitcoin

bc1qfuz93hw2fhdvfuxf6mlxlk8zdadvnktppkzqzj


Create Wireguard Interface

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

OpenWRT and WireGuard
OpenWRT and WireGuard

On CLI you can restart the network with restart command.

/etc/init.d/network restart

Create a new interface named WG0.

OpenWRT and WireGuard
OpenWRT and WireGuard

Select protocol WireGuard VPN.

OpenWRT and WireGuard
OpenWRT and WireGuard

General Settings

OpenWRT and WireGuard
OpenWRT and WireGuard
  • Click Generate new key pair to create new keys for the WireGuard server.
  • Listen Port = 51820
  • IP Addresses = 10.200.250.1/24 (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 and WireGuard
OpenWRT and WireGuard

Firewall Settings

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

OpenWRT and WireGuard
OpenWRT and WireGuard

Firewall zone wg0 will be created automatically by OpenWRT.

OpenWRT and WireGuard
OpenWRT and WireGuard

DHCP Server

OpenWRT and WireGuard
OpenWRT and WireGuard

Peers

OpenWRT and WireGuard
OpenWRT and WireGuard

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

WireGuard – Peer configuration

WireGuard got installed on the OpenWRT device. Please refer
OpenWRT – Network configuration
to for a detailed description how to setup firewall.


See all articles of this series …

stefanstrobel - Logo

… on strobelstefan.org
Overview of all OpenWRT Articles/

© Logo material is licensed under CC0 Codeberg and the Codeberg Logo are trademarks of Codeberg e.V

… hosted on Codeberg.

https://codeberg.org/strobelstefan.org/openwrt-configuration


Gib mir gerne einen Kaffee ☕ aus!

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

PayPal Logo


liberapay.com/strobelstefan.org


Kaffee via Bitcoin

bc1qfuz93hw2fhdvfuxf6mlxlk8zdadvnktppkzqzj


Source:
– https://openwrt.org/
– https://openwrt.org/_media/docs/guide-graphic-designer/openwrt-logo-usage-guidelines.pdf
– https://www.wireguard.com/

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert