From 9ab54017823b4e4428885d86f4a2c4a6b6b1d72e Mon Sep 17 00:00:00 2001 From: OldTyT Date: Sat, 21 Feb 2026 19:23:33 +0300 Subject: [PATCH] feat: block icmp --- templates/custom.firewall-restore.j2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/templates/custom.firewall-restore.j2 b/templates/custom.firewall-restore.j2 index d086ef2..940b53e 100644 --- a/templates/custom.firewall-restore.j2 +++ b/templates/custom.firewall-restore.j2 @@ -21,6 +21,8 @@ iptables -I enemy_input 4 -m state --state RELATED,ESTABLISHED -j ACCEPT iptables -I enemy_input 5 -p tcp -m set ! --match-set {{ whitelist_ports_tcp }} dst -j DROP iptables -I enemy_input 6 -p udp -m set ! --match-set {{ whitelist_ports_udp }} dst -j DROP +iptables -I enemy_input -p icmp --icmp-type echo-request -j DROP + # IPv6 ip6tables -N f2b-sshd @@ -37,3 +39,5 @@ ip6tables -I enemy_input 3 -m set --match-set {{ whitelist_ip6_name }} src -j AC ip6tables -I enemy_input 4 -m state --state RELATED,ESTABLISHED -j ACCEPT ip6tables -I enemy_input 5 -p tcp -m set ! --match-set {{ whitelist_ports_tcp }} dst -j DROP ip6tables -I enemy_input 6 -p udp -m set ! --match-set {{ whitelist_ports_udp }} dst -j DROP + +ip6tables -I enemy_input -p icmpv6 --icmpv6-type echo-request -j DROP