I've created the rule below to protect against abuse on outbound traffic. But I wonder if this rule will not break the cpanel in any way?
This rule limits the outbound connection to ports 80 and 443.
I appreciate if anyone knows if there is a better way to protect outbound traffic, or if I should add more ports!
Code:
/sbin/iptables -N OUT_DOS_ATTACK
/sbin/iptables -A OUTPUT -p tcp -m multiport --dport 80,443 --syn -m connlimit --connlimit-above 50 -j OUT_DOS_ATTACK
/sbin/iptables -A OUT_DOS_ATTACK -j LOG --log-prefix "OUT_DOS_ATTACK: " --log-level 6
/sbin/iptables -A OUT_DOS_ATTACK -j DROP
I appreciate if anyone knows if there is a better way to protect outbound traffic, or if I should add more ports!