Saltstack Official IPTables Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

пре 9 година
пре 9 година
пре 7 година
пре 9 година
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. =====================
  2. iptables salt formula
  3. =====================
  4. Iptables is used to set up, maintain, and inspect the tables of IPv4 packet
  5. filter rules in the Linux kernel. Several different tables may be defined.
  6. Each table contains a number of built-in chains and may also contain
  7. user-defined chains. Each chain is a list of rules which can match a set of
  8. packets. Each rule specifies what to do with a packet that matches. This is
  9. called a `target`, which may be a jump to a user-defined chain in the same
  10. table.
  11. This version of a formula guarantees that manually added rules or rules which
  12. has been added in runtime would be removed.
  13. In order to ensure architecture, proper epoch value should be specified.
  14. Refer to an example.
  15. Sample pillars
  16. ==============
  17. .. code-block:: yaml
  18. parameters:
  19. iptables:
  20. schema:
  21. epoch: 1
  22. service:
  23. v4:
  24. enabled: true
  25. persistent_config: /etc/iptables/rules.v4
  26. modules:
  27. - nf_conntrack_ftp
  28. - nf_conntrack_pptp
  29. v6:
  30. enabled: false
  31. persistent_config: /etc/iptables/rules.v6
  32. modules:
  33. - nf_conntrack_ipv6
  34. defaults:
  35. v4:
  36. metadata_rules: false
  37. policy: ACCEPT
  38. ruleset:
  39. action: ACCEPT
  40. params: ""
  41. rule: ""
  42. v6:
  43. metadata_rules: false
  44. policy: DROP
  45. ruleset:
  46. action: ACCEPT
  47. params: ""
  48. rule: ""
  49. tables:
  50. v4:
  51. filter:
  52. chains:
  53. INPUT:
  54. ruleset:
  55. 5:
  56. action: log_drop
  57. 10:
  58. rule: -s 192.168.0.0/24 -p tcp
  59. log_drop:
  60. policy: DROP
  61. ruleset:
  62. 10:
  63. action: LOG
  64. comment: "Log my packets"
  65. nat:
  66. chains:
  67. OUTPUT: {}
  68. PREROUTING: {}
  69. POSTROUTING:
  70. policy: ACCEPT
  71. ruleset:
  72. 10:
  73. rule: -s 192.168.0.0/24 -p tcp -o lo
  74. action: SNAT
  75. params: --to-source=127.0.0.1
  76. Read more
  77. =========
  78. * http://docs.saltstack.com/en/latest/ref/states/all/salt.states.iptables.html
  79. * https://help.ubuntu.com/community/IptablesHowTo
  80. * http://wiki.centos.org/HowTos/Network/IPTables
  81. Documentation and Bugs
  82. ======================
  83. To learn how to install and update salt-formulas, consult the documentation
  84. available online at:
  85. http://salt-formulas.readthedocs.io/
  86. In the unfortunate event that bugs are discovered, they should be reported to
  87. the appropriate issue tracker. Use Github issue tracker for specific salt
  88. formula:
  89. https://github.com/salt-formulas/salt-formula-iptables/issues
  90. Developers wishing to work on the salt-formulas projects should always base
  91. their work on master branch and submit pull request against specific formula.
  92. https://github.com/salt-formulas/salt-formula-iptables