added support for nat
This commit is contained in:
parent
71c3dccba9
commit
ce276d5b22
2 changed files with 18 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue