Create nftables configuration for gateway
Added nftables configuration for input and forward chains along with NAT postrouting.
This commit is contained in:
1 parent
68ba1656ea
commit
202a829101
1 file changed
+22
@@ -0,0 +1,22 @@
|
||||
#!/usr/sbin/nft -f
|
||||
flush ruleset
|
||||
table inet filter {
|
||||
chain input {
|
||||
type filter hook input priority 0; policy drop;
|
||||
ct state established,related accept
|
||||
iif lo accept
|
||||
iifname "br-lan" accept
|
||||
icmp type echo-request accept
|
||||
}
|
||||
chain forward {
|
||||
type filter hook forward priority 0; policy drop;
|
||||
ct state established,related accept
|
||||
iifname "br-lan" oifname "wan" accept
|
||||
}
|
||||
}
|
||||
table ip nat {
|
||||
chain postrouting {
|
||||
type nat hook postrouting priority 100;
|
||||
oifname "wan" masquerade
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user