Skip to content

Commit f49e6e5

Browse files
jlamillanbriangustafson
authored andcommitted
Issue #320: user_data cloud-init script in docs/examples/networking/nat/ fails to run. (#321)
1 parent c38274c commit f49e6e5

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

docs/examples/networking/nat/user_data.tpl

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1-
#
2-
# Create file to be used when enabling ip forwarding
3-
#
1+
#cloud-config
2+
43
write_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-
#
139
runcmd:
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

0 commit comments

Comments
 (0)