linux - iptable rule to drop packet with a specific substring in payload -
I am trying to write rules to leave any packet, even if it is outgoing, incoming or forwarded, Which is a specific TCP or sub string in udp payload, how do I do it?
You will need a kernel compiled with Netfilter "String Match Support" enabled.
Then you can
iptables -A INPUT -m string - ALBA bm - string "test" - J drop IPTable - A output - M string - LLM BM - String "Test" - J Drop IPTable - A forward-M string - LLM BM - String "Test" - J Drop Check the result
Iptables -l
Comments
Post a Comment