petroskaridis
4 years ago
1 changed files with 0 additions and 23 deletions
@ -1,23 +0,0 @@ |
|||
sudo apt update |
|||
sudo apt upgrade -y |
|||
#Find worker1 IP |
|||
worker1=$(ifconfig|grep inet|sed -n lp|awk "{print \$2}") |
|||
clear |
|||
sudo iptables -F |
|||
echo "2 sec ICMP packet sniffing" |
|||
sleep 2s |
|||
sudo timeout 2s tcpdump -i eth0 icmp $worker1 |
|||
sleep 2s |
|||
echo "New iptables rules" |
|||
#clean iptables rules from previous script runs |
|||
sudo iptables -X |
|||
sudo iptables -N icmp_flood |
|||
sudo iptables -A INPUT -p icmp -j icmp_flood |
|||
#limit icmp_flood to 1 packets per second |
|||
sudo iptables -A icmp_flood -m limit --limit 1/s --limit-burst 3 -j RETURN |
|||
sudo iptables -A icmp_flood -j DROP |
|||
sleep 2s |
|||
echo "2 sec ICMP packet sniffing after iptables config" |
|||
sleep 2s |
|||
sudo timeout 2s tcpdump -i eth0 icmp $worker1 |
|||
|
Loading…
Reference in new issue