* iptable - string matching - from to offset values
@ 2009-12-22 7:00 Suganthi K
0 siblings, 0 replies; only message in thread
From: Suganthi K @ 2009-12-22 7:00 UTC (permalink / raw)
To: netfilter
Hi,
I have a packet with the octets 32,33 having the values 0x21 and 0x12
respectively.
I am trying to filter out the packets using iptables rule
"iptables -t raw -A INPUT -m string --algo bm --from 31 --to 32 --hex-string
'|21 12|' -j LOG"
This rule filters the packet and I could find it in the logs.
starting with the first octet of the packet at offset 0, the required
pattern "21 12" appears at offset 32 and 33 of the packet.
rule "iptables -t raw -A INPUT -m string --algo bm --from 32 --to 33
--hex-string '|21 12|' -j LOG" fails to filter the packet.
Please let me know if anybody has faced a similar situation before.
Any help on the --from and --to values for string pattern matching will be
appreciated.
Thanks & Regards,
Suganthi
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-12-22 7:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-22 7:00 iptable - string matching - from to offset values Suganthi K
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).