config upload
This commit is contained in:
34
server/nftables.conf
Normal file
34
server/nftables.conf
Normal file
@@ -0,0 +1,34 @@
|
||||
#!/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;
|
||||
}
|
||||
}
|
||||
|
||||
table ip filter {
|
||||
chain forward {
|
||||
type filter hook forward priority 0; policy drop;
|
||||
|
||||
# Allow existing connections
|
||||
iifname "ens4" oifname "ens5" ct state { established, related } accept
|
||||
|
||||
# Allow new outgoing traffic
|
||||
iifname "ens5" oifname "ens4" accept
|
||||
}
|
||||
}
|
||||
|
||||
table ip nat {
|
||||
chain postrouting {
|
||||
type nat hook postrouting priority 100;
|
||||
oifname "ens4" masquerade
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user