I have a flood on my server. I use iptables, I would like a help for it.
I ACCEPT "Legitimate" IPS range but in this packets, there is some ips who flood.
Next for to filter I want to limit with the hex string, but like I accepted this packet the next rule, it's don't read. How make it? For to accept range ips, drop other, next -limit on this range ips.
// accept range ip and drop other -I INPUT -p udp -s 220.127.116.11/16 --dport 7777 -j ACCEPT -I INPUT -p udp -s 18.104.22.168/16 --dport 7777 -j ACCEPT ... -I INPUT -p udp --dport 7777 -j DROP // now I want to filter this range ips -I INPUT -p udp -m string --hex-string "|XXXXX|" --algo bm --dport 7777-m limit --limit 10/s -j ACCEPT -I INPUT -p udp -m string --hex-string "|XXXXX|" --algo bm --dport 7777-j DROP