feat(heimdall+desktop): setup wireguard tunnel.
This commit is contained in:
parent
be539374c0
commit
5fa7edbc18
10 changed files with 63 additions and 13 deletions
|
@ -8,19 +8,10 @@
|
|||
};
|
||||
|
||||
config = lib.mkIf config.crony.wireguard.enable {
|
||||
# Allow for wireguard traffic
|
||||
networking.firewall = {
|
||||
# if packets are still dropped, they will show up in dmesg
|
||||
logReversePathDrops = true;
|
||||
# wireguard trips rpfilter up
|
||||
extraCommands = ''
|
||||
ip46tables -t mangle -I nixos-fw-rpfilter -p udp -m udp --sport 51820 -j RETURN
|
||||
ip46tables -t mangle -I nixos-fw-rpfilter -p udp -m udp --dport 51820 -j RETURN
|
||||
'';
|
||||
extraStopCommands = ''
|
||||
ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --sport 51820 -j RETURN || true
|
||||
ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --dport 51820 -j RETURN || true
|
||||
'';
|
||||
# Setup wireguard
|
||||
networking.wg-quick.interfaces.wg0 = {
|
||||
autostart = false;
|
||||
configFile = "${config.age.secrets.wg-desktop.path}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue