Iptables man page says:
-----------------------------------------------------------------------------------------------------------
string
This modules matches a given string by using some pattern matching strategy. It requires
a linux kernel >= 2.6.14.
--algo bm|kmp
Select the pattern matching strategy. (bm = Boyer-Moore, kmp = Knuth-Pratt-Morris)
--from offset
Set the offset from which it starts looking for any matching. If not passed,
default is 0.
--to offset
Set the offset from which it starts looking for any matching. If not passed,
default is the packet size.
--string pattern
Matches the given pattern. --hex-string pattern Matches the given pattern in hex
notation.
-----------------------------------------------------------------------------------------------------------
So iptables can inspect the content of the packet!!