Saltstack Official FirewallD 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.

177 lines
3.9KB

  1. # yamllint disable rule:indentation rule:line-length
  2. # AlmaLinux-8
  3. ---
  4. values:
  5. AllowZoneDrifting: 'no'
  6. AutomaticHelpers: system
  7. FirewallBackend: nftables
  8. FlushAllOnReload: 'yes'
  9. IndividualCalls: 'no'
  10. LogDenied: 'off'
  11. RFC3964_IPv4: 'yes'
  12. arch: amd64
  13. backend:
  14. manage: true
  15. pkg: nftables
  16. config: /etc/firewalld.conf
  17. default_zone: public
  18. direct:
  19. chain:
  20. MYCHAIN:
  21. ipv: ipv4
  22. table: raw
  23. passthrough:
  24. MYPASSTHROUGH:
  25. args: -t raw -A MYCHAIN -j DROP
  26. ipv: ipv4
  27. rule:
  28. INTERNETACCESS:
  29. args: -i iintern -o iextern -s 192.168.1.0/24 -m conntrack --ctstate NEW,RELATED,ESTABLISHED
  30. -j ACCEPT
  31. chain: FORWARD
  32. ipv: ipv4
  33. priority: '0'
  34. table: filter
  35. enabled: true
  36. ipset:
  37. manage: true
  38. pkg: ipset
  39. ipsets:
  40. fail2ban-ssh:
  41. description: fail2ban-ssh ipset
  42. entries:
  43. - 10.0.0.1
  44. options:
  45. hashsize:
  46. - 1024
  47. maxelem:
  48. - 65536
  49. timeout:
  50. - 300
  51. short: fail2ban-ssh
  52. type: hash:ip
  53. fail2ban-ssh-ipv6:
  54. description: fail2ban-ssh-ipv6 ipset
  55. entries:
  56. - 2a01::1
  57. options:
  58. family:
  59. - inet6
  60. hashsize:
  61. - 1024
  62. maxelem:
  63. - 65536
  64. timeout:
  65. - 300
  66. short: fail2ban-ssh-ipv6
  67. type: hash:ip
  68. package: firewalld
  69. service: firewalld
  70. services:
  71. salt-minion:
  72. description: salt-minion
  73. ports:
  74. tcp:
  75. - '8000'
  76. short: salt-minion
  77. sshcustom:
  78. description: SSH on port 3232 and 5252. Secure Shell (SSH) is a protocol for
  79. logging into and executing commands on remote machines. It provides secure
  80. encrypted communications. If you plan on accessing your machine remotely
  81. via SSH over a firewalled interface, enable this option. You need the openssh-server
  82. package installed for this option to be useful.
  83. destinations:
  84. ipv4:
  85. - 224.0.0.251
  86. - 224.0.0.252
  87. ipv6:
  88. - ff02::fb
  89. - ff02::fc
  90. modules:
  91. - some_module_to_load
  92. ports:
  93. tcp:
  94. - 3232
  95. - 5252
  96. protocols:
  97. - igmp
  98. short: sshcustom
  99. source_ports:
  100. tcp:
  101. - 21
  102. includes:
  103. - dhcp
  104. zabbixcustom:
  105. description: zabbix custom rule
  106. ports:
  107. tcp:
  108. - '10051'
  109. short: Zabbixcustom
  110. zones:
  111. public:
  112. description: For use in public areas. You do not trust the other computers
  113. on networks to not harm your computer. Only selected incoming connections
  114. are accepted.
  115. other_services:
  116. - zabbixcustom
  117. ports:
  118. - comment: zabbix-agent
  119. port: 10050
  120. protocol: tcp
  121. - comment: bacula-client
  122. port: 9102
  123. protocol: tcp
  124. - comment: vsftpd
  125. port: 21
  126. protocol: tcp
  127. protocols:
  128. - igmp
  129. rich_rules:
  130. - accept: true
  131. family: ipv4
  132. source:
  133. address: 8.8.8.8/24
  134. - family: ipv4
  135. ipset:
  136. name: fail2ban-ssh
  137. reject:
  138. type: icmp-port-unreachable
  139. - accept:
  140. limit: "3/m"
  141. log:
  142. level: warning
  143. limit: "3/m"
  144. prefix: "http fw limit 3/m"
  145. service: http
  146. services:
  147. - http
  148. - https
  149. - ssh
  150. - salt-minion
  151. short: Public
  152. source_ports:
  153. - comment: something
  154. port: 2222
  155. protocol: tcp
  156. - comment: something_else
  157. port: 4444
  158. protocol: tcp
  159. rich_public:
  160. description: Example
  161. rich_rules:
  162. http-priority:
  163. accept: true
  164. ipsets:
  165. - other-ipset
  166. priority: 15
  167. services:
  168. - http
  169. ssh-csg:
  170. accept: true
  171. ipsets:
  172. - fail2ban-ssh
  173. - other-ipset
  174. services:
  175. - ssh
  176. short: rich_public