add support for ipv6 nat
This commit is contained in:
parent
8a8192749b
commit
063d097404
2 changed files with 19 additions and 1 deletions
|
|
@ -8,6 +8,8 @@ firewall:
|
||||||
output: {}
|
output: {}
|
||||||
nat_prerouting: {}
|
nat_prerouting: {}
|
||||||
nat_postrouting: {}
|
nat_postrouting: {}
|
||||||
|
nat6_prerouting: {}
|
||||||
|
nat6_postrouting: {}
|
||||||
chains:
|
chains:
|
||||||
input:
|
input:
|
||||||
allow_ssh: tcp dport ssh
|
allow_ssh: tcp dport ssh
|
||||||
|
|
@ -15,6 +17,8 @@ firewall:
|
||||||
forward: {}
|
forward: {}
|
||||||
nat_prerouting: {}
|
nat_prerouting: {}
|
||||||
nat_postrouting: {}
|
nat_postrouting: {}
|
||||||
|
nat6_prerouting: {}
|
||||||
|
nat6_postrouting: {}
|
||||||
policies:
|
policies:
|
||||||
input: drop
|
input: drop
|
||||||
output: accept
|
output: accept
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ table inet filter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
table nat {
|
table ip nat {
|
||||||
# NAT
|
# NAT
|
||||||
chain prerouting {
|
chain prerouting {
|
||||||
type nat hook prerouting priority -100;
|
type nat hook prerouting priority -100;
|
||||||
|
|
@ -74,4 +74,18 @@ table nat {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
table ip6 nat {
|
||||||
|
# NAT
|
||||||
|
chain prerouting {
|
||||||
|
type nat hook prerouting priority -100;
|
||||||
|
|
||||||
|
{{ nftchain('nat6_prerouting') }}
|
||||||
|
}
|
||||||
|
chain postrouting {
|
||||||
|
type nat hook postrouting priority 100;
|
||||||
|
|
||||||
|
{{ nftchain('nat6_postrouting') }}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
include "/etc/nftables.d/*.nft"
|
include "/etc/nftables.d/*.nft"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue