iptables - ufw firewall DROP icmp from ALL to a specific IP address on my server -
my server has apache2 on single interface multiple ips on sub-interfaces. want reject icmp echo request external ips specific ip assigned 1 of sub interfaces allow icmp other ips on same interface:
- eth2 - 10.128.20.252
- eth2:1 - 10.128.20.11
- eth2:2 - 10.128.20.12
- eth2:3 - 10.128.20.13 <-want block icmp ip
- eth2:4 - 10.128.20.14
edit /etc/ufw/before.rules file , change ip suit needs. do:
# ufw reload
put before icmp ok codes section, works
drop icmp specific ip
-a ufw-before-input -p icmp --icmp-type echo-request -d 10.128.20.13 -j reject
Comments
Post a Comment