path: root/extensions
diff options
authorLaurence J. Lane <>2013-08-24 17:37:55 -0400
committerFlorian Westphal <>2013-08-24 23:48:52 +0200
commitf70e1d675ae70f607e28ea07d8e024ccf283374a (patch)
tree3679b405e87a1d4ecfebd446c97b49b0fbad1851 /extensions
parent8fa26de310ce7b12232329222260afaec825c9df (diff)
iptables: add examples
Add usage examples for string and hex string patterns. References: Signed-off-by: Laurence J. Lane <> Signed-off-by: Florian Westphal <>
Diffstat (limited to 'extensions')
1 files changed, 10 insertions, 0 deletions
diff --git a/extensions/ b/extensions/
index b6b271d1..adc9c180 100644
--- a/extensions/
+++ b/extensions/
@@ -16,3 +16,13 @@ Matches the given pattern.
[\fB!\fP] \fB\-\-hex\-string\fP \fIpattern\fP
Matches the given pattern in hex notation.
+# The string pattern can be used for simple text characters.
+iptables \-A INPUT \-p tcp \-\-dport 80 \-m string \-\-algo bm \-\-string 'GET /index.html' \-j LOG
+# The hex string pattern can be used for non-printable characters, like |0D 0A| or |0D0A|.
+iptables \-p udp \-\-dport 53 \-m string \-\-algo bm \-\-from 40 \-\-to 57 \-\-hex\-string '|03|www|09|netfilter|03|org|00|'