View Single Post
lugui
Senior Member
Join Date: Feb 2016
Location: GetClientAbsOrigin();
Old 09-19-2018 , 08:42   Re: Help stopping DoS attack Ubuntu 16.04
Reply With Quote #5

sudo iptables -t nat -A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -m connlimit --connlimit-above 15 --connlimit-mask 32 --connlimit-saddr -j DROP
sudo iptables -t nat -A INPUT -p udp -m connlimit --connlimit-above 15 --connlimit-mask 32 --connlimit-saddr -j DROP

Run this. It will drop any IP that makes more than 15 conections (you can lower it if you want)

Last edited by lugui; 09-19-2018 at 08:46.
lugui is offline