Add nftables config to home-gw ignition
All checks were successful
ShellCheck / shellcheck (push) Successful in 36s
All checks were successful
ShellCheck / shellcheck (push) Successful in 36s
This commit is contained in:
parent
94562bac53
commit
ee71250f17
1 changed files with 20 additions and 0 deletions
|
@ -7,6 +7,26 @@ storage:
|
|||
inline: |
|
||||
net.ipv4.ip_forward = 1
|
||||
net.ipv6.conf.all.forwarding = 1
|
||||
- path: /etc/sysconfig/nftables.conf
|
||||
overwrite: true
|
||||
contents:
|
||||
inline: |
|
||||
flush ruleset
|
||||
table inet nat {
|
||||
chain prerouting {
|
||||
type nat hook prerouting priority 0
|
||||
tcp dport 80 dnat ip to 10.0.0.2
|
||||
tcp dport 80 dnat ip6 to [fd00::2]
|
||||
tcp dport 443 dnat ip to 10.0.0.2
|
||||
tcp dport 443 dnat ip6 to [fd00::2]
|
||||
tcp dport 18089 dnat ip to 10.0.0.2
|
||||
tcp dport 18089 dnat ip6 to [fd00::2]
|
||||
}
|
||||
chain postrouting {
|
||||
type nat hook postrouting priority 0
|
||||
oifname gateway masquerade
|
||||
}
|
||||
}
|
||||
passwd:
|
||||
users:
|
||||
- name: root
|
||||
|
|
Loading…
Add table
Reference in a new issue