Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

this is:

// accept range ip and drop other
-I INPUT -p udp -s --dport 7777 -j ACCEPT
-I INPUT -p udp -s --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


share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.