wireguard: add nft rules for NAT

This commit is contained in:
Arne Zachlod 2025-03-31 12:22:36 +02:00
parent 5f5b243803
commit 01502ac710

View file

@ -0,0 +1,30 @@
#!/usr/sbin/nft -f
flush ruleset
table inet filter {
chain input {
type filter hook input priority filter;
}
chain forward {
type filter hook forward priority filter;
}
chain output {
type filter hook output priority filter;
}
}
# TODO: just add this under the already existing filecontent
add table wireguard-nat
table inet wireguard-nat {
chain prerouting {
type nat hook prerouting priority -100; policy accept;
}
chain postrouting {
type nat hook postrouting priority 100; policy accept;
oifname "ens6" masquerade
}
}