init.sls 644 B

123456789101112131415161718192021222324252627282930313233
  1. #
  2. # Netfiler stuff
  3. #
  4. /etc/modules-load.d/netfilter:
  5. file.managed:
  6. - source: salt://firewall/modules
  7. iptables-persistent:
  8. pkg.installed
  9. iptables-restore:
  10. cmd.wait:
  11. - name: /sbin/iptables-restore < /etc/iptables/rules.v4
  12. - watch:
  13. - file: /etc/iptables/rules.v4
  14. ip6tables-restore:
  15. cmd.wait:
  16. - name: /sbin/ip6tables-restore < /etc/iptables/rules.v6
  17. - watch:
  18. - file: /etc/iptables/rules.v6
  19. /etc/iptables/rules.v4:
  20. file.managed:
  21. - source: salt://firewall/rules.v4.tmpl
  22. - template: jinja
  23. /etc/iptables/rules.v6:
  24. file.managed:
  25. - source: salt://firewall/rules.v6.tmpl
  26. - template: jinja