LOTS of stuff
This commit is contained in:
18
wireguard.nix
Normal file
18
wireguard.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
# { config, pkgs, lib, ... }:{
|
||||
# networking.firewall.checkReversePath = "loose";
|
||||
# }
|
||||
{ config, pkgs, lib, ... }:{
|
||||
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 16632 -j RETURN
|
||||
ip46tables -t mangle -I nixos-fw-rpfilter -p udp -m udp --dport 16632 -j RETURN
|
||||
'';
|
||||
extraStopCommands = ''
|
||||
ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --sport 16632 -j RETURN || true
|
||||
ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --dport 16632 -j RETURN || true
|
||||
'';
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user