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: {}
|
input: {}
|
||||||
forward: {}
|
forward: {}
|
||||||
output: {}
|
output: {}
|
||||||
|
nat_prerouting: {}
|
||||||
|
nat_postrouting: {}
|
||||||
chains:
|
chains:
|
||||||
input:
|
input:
|
||||||
allow_ssh: tcp dport ssh
|
allow_ssh: tcp dport ssh
|
||||||
output: {}
|
output: {}
|
||||||
forward: {}
|
forward: {}
|
||||||
|
nat_prerouting: {}
|
||||||
|
nat_postrouting: {}
|
||||||
policies:
|
policies:
|
||||||
input: drop
|
input: drop
|
||||||
output: accept
|
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"
|
include "/etc/nftables.d/*.nft"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue