Jump to content

Wireguard

From postmarketOS Wiki
Revision as of 23:14, 28 March 2022 by Delta503 (talk | contribs) (Added Wireguard VPN page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Overwiew

Wireguard is modern, low-latnecy VPN, available in upstream Alpine repo. It's easy to self-host, that's why it is popular choice for hackers.

Common Issues

Driver

Your kernel needs to be compiled with its driver. Check it by running below command in terminal

modinfo wireguard

If it prints module details like filename, author, you are good to go. If it prints something like:

modinfo: module '/lib/modules/${uname -r}/wireguard'  not found

You need to open issue or merge request mentioning device maintainer kindly asking for compiling kernel with wireguard driver.

NetworkManger integration

In mobian there is easy way to manage wireguard with automatically filled pre and post hooks.

nmcli connection import type wireguard file /path/to/wg.conf

However, because of (probably) some lack in packaging, pre and post hooks interfaces are not set properly. So you are connected to your rely but DNS doesn't work.

Note Needs debugging

Temporary Solutions

If you really need it, you can do something like copy your wg0.conf file to /etc/wireguard/ chmod and chown it properly then write shell script that asks you if you want to connect or disconnect and then do sudo wg-quick up wg0 or sudo wg-quick down wg0, as unlike NetworkManager, wg sets hooks and interface properly each time.