Saltstack Official FirewallD Formula
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

ubuntu-18.yaml 3.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. # yamllint disable rule:indentation rule:line-length
  2. # Ubuntu-18.04
  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. zabbixcustom:
  103. description: zabbix custom rule
  104. ports:
  105. tcp:
  106. - '10051'
  107. short: Zabbixcustom
  108. zones:
  109. public:
  110. description: For use in public areas. You do not trust the other computers
  111. on networks to not harm your computer. Only selected incoming connections
  112. are accepted.
  113. other_services:
  114. - zabbixcustom
  115. ports:
  116. - comment: zabbix-agent
  117. port: 10050
  118. protocol: tcp
  119. - comment: bacula-client
  120. port: 9102
  121. protocol: tcp
  122. - comment: vsftpd
  123. port: 21
  124. protocol: tcp
  125. protocols:
  126. - igmp
  127. rich_rules:
  128. - accept: true
  129. family: ipv4
  130. source:
  131. address: 8.8.8.8/24
  132. - family: ipv4
  133. ipset:
  134. name: fail2ban-ssh
  135. reject:
  136. type: icmp-port-unreachable
  137. - accept:
  138. limit: "3/m"
  139. log:
  140. level: warning
  141. limit: "3/m"
  142. prefix: "http fw limit 3/m"
  143. service: http
  144. services:
  145. - http
  146. - https
  147. - ssh
  148. - salt-minion
  149. short: Public
  150. source_ports:
  151. - comment: something
  152. port: 2222
  153. protocol: tcp
  154. - comment: something_else
  155. port: 4444
  156. protocol: tcp
  157. rich_public:
  158. description: Example
  159. rich_rules:
  160. http-priority:
  161. accept: true
  162. ipsets:
  163. - other-ipset
  164. priority: 15
  165. services:
  166. - http
  167. ssh-csg:
  168. accept: true
  169. ipsets:
  170. - fail2ban-ssh
  171. - other-ipset
  172. services:
  173. - ssh
  174. short: rich_public