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

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

1 Answer 1

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

 
discard

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.