3 ms·
If you're on systemd anyway, rather than wg-quick, consider defining your wireguard networks through the more powerful systemd-networkd. It has native support a
by 3np 5y ago
If you're on systemd anyway, rather than wg-quick, consider defining your wireguard networks through the more powerful systemd-networkd. It has native support and you can define routes, policies, and fwmarks etc in the same files rather than mucking around with ip-route and iptables commands.
wg-quick is really that - quickly get a simple tunnel up and running which works fine when you just want to route all IPs in a single subnet or 0.0.0.0/0 and nothing more, but anything more complex (split tunneling for example) and it quickly (!) becomes cumbersome.
Slightly OT but I personally very much prefer systemd-networkd over NetworkManager, which I find unpredictable.
https://elou.world/en/tutorial/wireguard https://elou.world/en/tutorial/wireguard
https://www.man7.org/linux/man-pages/man5/systemd.netdev.5.html#%5BWIREGUARD%5D_SECTION_OPTIONS https://www.man7.org/linux/man-pages/man5/systemd.netdev.5.h...
- 0x38B 5y agoCorrect me if I'm wrong, but controlling WireGuard with systemd-networkd makes it 'always on', which means you can't easily turn it on and off. This was a deal-breaker for me, as I don't need it active all the time.
- genghizkhan 5y ago$ networkctl down wg0 $ networkctl up wg0 I’d you’ve changed the WireGuard config then: $ systemctl reload systemd-networkd