Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to block specific UDP packet OUTGOING from my machine using iptables. Packet has a string in "hex in RAW"(?) i want to check packet by it.

Like: If UDP packet hex RAW match "test_text" - block it.

//EDIT: i have something like this

iptables -A OUTPUT -p udp -m multiport --sports 8000 -m string --algo bm --string "test" -j DROP

but it gives error

iptables: No chain/target/match by that name.

share|improve this question
up vote 2 down vote accepted

There is a "string" match netfilter extension, that might or might not be compiled in/available as a module on your system.

Do not forget that such things can inherently have a serious performance impact, especially if more packets than necessary are subjected to that match.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.