*filter :INPUT DROP [0:0] :FORWARD DROP [0:0] :OUTPUT DROP [0:0] # ============= # Gluster # ============= :gluster_in - [0:0] # Rate-limits -A gluster_in -m hashlimit --hashlimit-mode srcip --hashlimit-name gluster --hashlimit-above 1/sec --hashlimit-burst 25 -j DROP # AWS gluster subnets -A gluster_in -s 172.16.1.0/26 -j ACCEPT -A gluster_in -s 172.16.1.64/26 -j ACCEPT # Workstations -A gluster_in -s 172.16.2.0/26 -j ACCEPT # Backend -A gluster_in -s 172.16.4.0/26 -j ACCEPT -A gluster_in -s 172.16.4.64/26 -j ACCEPT # Logging #-A gluster_in -j LOG --log-prefix "gluster_in: " -A gluster_in -j RETURN # ============= # INPUT # ============= # Established connections -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT # Loopback -A INPUT -s 127.0.0.0/8 -d 127.0.0.0/8 -i lo -j ACCEPT # ICMP -A INPUT -p icmp -m hashlimit --hashlimit-name icmp --hashlimit-mode srcip --hashlimit-upto 2/s --hashlimit-burst 25 -j ACCEPT -A INPUT -p icmp -j DROP # SSH -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 -A INPUT -p tcp -m tcp --dport 22 -j DROP # Gluster -A INPUT -p tcp -m multiport --dports 111,24007,49152:49159 -j gluster_in -A INPUT -p udp -m multiport --dports 111 -j gluster_in # Logging #-A INPUT -j LOG --log-prefix "INPUT: " # ============= # OUTPUT # ============= # Established connections -A OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT # Loopback -A OUTPUT -s 127.0.0.0/8 -d 127.0.0.0/8 -o lo -j ACCEPT # Everything else -A OUTPUT -j ACCEPT COMMIT