Saltstack Official FirewallD Formula
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

amazonlinux-2.yaml 3.9KB

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