Saltstack Official FirewallD Formula
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

pillar.example 3.1KB

před 10 roky
před 10 roky
před 10 roky
před 10 roky
před 10 roky
před 10 roky
před 10 roky
před 10 roky
před 10 roky
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. # FirewallD pillar examples:
  2. firewalld:
  3. enabled: True
  4. ipset:
  5. manage: True
  6. pkg: ipset
  7. # ipset: # Deprecated. Support for this format will be removed in future releases
  8. # ipsetpackag: ipset # Deprecated. Will be removed in future releases
  9. backend:
  10. manage: True
  11. pkg: nftables
  12. # installbackend: True # Deprecated. Will be removed in future releases
  13. # backendpackage: nftables # Deprecated. Will be removed in future releases
  14. default_zone: public
  15. services:
  16. sshcustom:
  17. short: sshcustom
  18. description: SSH on port 3232 and 5252. Secure Shell (SSH) is a protocol for logging into and executing commands on remote machines. It provides secure encrypted communications. If you plan on accessing your machine remotely via SSH over a firewalled interface, enable this option. You need the openssh-server package installed for this option to be useful.
  19. ports:
  20. tcp:
  21. - 3232
  22. - 5252
  23. modules:
  24. - some_module_to_load
  25. destinations:
  26. ipv4:
  27. - 224.0.0.251
  28. - 224.0.0.252
  29. ipv6:
  30. - ff02::fb
  31. - ff02::fc
  32. zabbixcustom:
  33. short: Zabbixcustom
  34. description: "zabbix custom rule"
  35. ports:
  36. tcp:
  37. - "10051"
  38. salt-minion:
  39. short: salt-minion
  40. description: "salt-minion"
  41. ports:
  42. tcp:
  43. - "8000"
  44. ipsets:
  45. fail2ban-ssh:
  46. short: fail2ban-ssh
  47. description: fail2ban-ssh ipset
  48. type: 'hash:ip'
  49. options:
  50. maxelem:
  51. - 65536
  52. timeout:
  53. - 300
  54. hashsize:
  55. - 1024
  56. entries:
  57. - 10.0.0.1
  58. zones:
  59. public:
  60. short: Public
  61. description: "For use in public areas. You do not trust the other computers on networks to not harm your computer. Only selected incoming connections are accepted."
  62. services:
  63. - http
  64. - zabbixcustom
  65. - https
  66. - ssh
  67. - salt-minion
  68. rich_rules:
  69. - family: ipv4
  70. source:
  71. address: 8.8.8.8/24
  72. accept: true
  73. - family: ipv4
  74. ipset:
  75. name: fail2ban-ssh
  76. reject:
  77. type: icmp-port-unreachable
  78. ports:
  79. {% if grains['id'] == 'salt.example.com' %}
  80. - comment: salt-master
  81. port: 4505
  82. protocol: tcp
  83. - comment: salt-python
  84. port: 4506
  85. protocol: tcp
  86. {% endif %}
  87. - comment: zabbix-agent
  88. port: 10050
  89. protocol: tcp
  90. - comment: bacula-client
  91. port: 9102
  92. protocol: tcp
  93. - comment: vsftpd
  94. port: 21
  95. protocol: tcp
  96. direct:
  97. chain:
  98. MYCHAIN:
  99. ipv: ipv4
  100. table: raw
  101. rule:
  102. INTERNETACCESS:
  103. ipv: ipv4
  104. table: filter
  105. chain: FORWARD
  106. priority: "0"
  107. args: "-i iintern -o iextern -s 192.168.1.0/24 -m conntrack --ctstate NEW,RELATED,ESTABLISHED -j ACCEPT"
  108. passthrough:
  109. MYPASSTHROUGH:
  110. ipv: ipv4
  111. args: "-t raw -A MYCHAIN -j DROP"