File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
docs/examples/networking/nat Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 1- #
2- # Create file to be used when enabling ip forwarding
3- #
1+ #cloud-config
2+
43write_files:
4+ # Create file to be used when enabling ip forwarding
55 - path: /etc/sysctl.d/98-ip-forward.conf
66 content: |
77 net.ipv4.ip_forward = 1
88
9- #
10- # Run firewall commands to enable masquerading and port forwarding
11- # Enable ip forwarding by setting sysctl kernel parameter
12- #
139runcmd:
10+ # Run firewall commands to enable masquerading and port forwarding
11+ # Enable ip forwarding by setting sysctl kernel parameter
1412 - firewall-offline-cmd --direct --add-rule ipv4 nat POSTROUTING 0 -o ens3 -j MASQUERADE
1513 - firewall-offline-cmd --direct --add-rule ipv4 filter FORWARD 0 -i ens3 -j ACCEPT
1614 - /bin/systemctl restart firewalld
You can’t perform that action at this time.
0 commit comments