gluster6.j2 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. *filter
  2. :INPUT DROP [0:0]
  3. :FORWARD DROP [0:0]
  4. :OUTPUT DROP [0:0]
  5. # =============
  6. # Gluster
  7. # =============
  8. :gluster_in - [0:0]
  9. # Rate-limits
  10. -A gluster_in -m hashlimit --hashlimit-mode srcip --hashlimit-name gluster --hashlimit-above 1/sec --hashlimit-burst 25 -j DROP
  11. # AWS gluster subnets
  12. -A gluster_in -s 2600:1f14:6b8:9101::/64 -j ACCEPT
  13. -A gluster_in -s 2600:1f14:6b8:9102::/64 -j ACCEPT
  14. # Workstations
  15. -A gluster_in -s 2600:1f14:6b8:9103::/64 -j ACCEPT
  16. # Backend
  17. -A gluster_in -s 2600:1f14:6b8:9107::/64 -j ACCEPT
  18. -A gluster_in -s 2600:1f14:6b8:9108::/64 -j ACCEPT
  19. # Logging
  20. #-A gluster_in -j LOG --log-prefix "gluster_in: "
  21. -A gluster_in -j RETURN
  22. # =============
  23. # INPUT
  24. # =============
  25. # Established connections
  26. -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
  27. # Loopback
  28. -A INPUT -s ::1 -d ::1 -i lo -j ACCEPT
  29. # ICMP
  30. -A INPUT -p icmpv6 -m hashlimit --hashlimit-mode srcip --hashlimit-name icmp --hashlimit-upto 2/s --hashlimit-burst 25 -j ACCEPT
  31. -A INPUT -p icmpv6 -j DROP
  32. # SSH
  33. -A INPUT -p tcp -m tcp --dport 22 -m hashlimit --hashlimit-mode srcip --hashlimit-name ssh --hashlimit-upto 1/s --hashlimit-burst 5 -j ACCEPT
  34. -A INPUT -p tcp -m tcp --dport 22 -j DROP
  35. # Gluster
  36. -A INPUT -p tcp -m multiport --dports 111,24007,49152:49159 -j gluster_in
  37. -A INPUT -p udp -m multiport --dports 111 -j gluster_in
  38. # Logging
  39. #-A INPUT -j LOG --log-prefix "INPUT: "
  40. # =============
  41. # OUTPUT
  42. # =============
  43. # Established connections
  44. -A OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
  45. # Loopback
  46. -A OUTPUT -s ::1 -d ::1 -o lo -j ACCEPT
  47. # Everything else
  48. -A OUTPUT -j ACCEPT
  49. COMMIT