Skip to content

Instantly share code, notes, and snippets.

@rena2019
Last active October 1, 2018 20:01
Show Gist options
  • Save rena2019/cdfa22efe21c8bea19784a7eb30b27d3 to your computer and use it in GitHub Desktop.
Save rena2019/cdfa22efe21c8bea19784a7eb30b27d3 to your computer and use it in GitHub Desktop.
#cloud-config
# https://goo.gl/jjsTsj
write_files:
- container: network
path: /var/lib/iptables/rules.sh
permissions: "0755"
owner: root:root
content: |
#iptables -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
#iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
#iptables -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 9000 -j ACCEPT
# the last line of the file needs to be a blank line or a comment
rancher:
network:
interfaces:
eth0:
dhcp: true
post_up:
- bash /var/lib/iptables/rules.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment