added support for nat

This commit is contained in:
nd 2020-08-02 20:28:53 +02:00
parent 71c3dccba9
commit ce276d5b22
No known key found for this signature in database
GPG key ID: 21B5CD4DEE3670E9
2 changed files with 18 additions and 0 deletions

View file

@ -6,11 +6,15 @@ firewall:
input: {}
forward: {}
output: {}
nat_prerouting: {}
nat_postrouting: {}
chains:
input:
allow_ssh: tcp dport ssh
output: {}
forward: {}
nat_prerouting: {}
nat_postrouting: {}
policies:
input: drop
output: accept

View file

@ -53,4 +53,18 @@ table inet filter {
}
}
table nat {
# NAT
chain prerouting {
type nat hook prerouting priority -100;
{{ nftchain('nat_prerouting') }}
}
chain postrouting {
type nat hook postrouting priority 100;
{{ nftchain('nat_postrouting') }}
}
}
include "/etc/nftables.d/*.nft"