iptables: libxt_string.man add example
PATCH 1/1 iptables: libxt_string.man add example
Show delimeters for hex string pattern.
--- extensions/libxt_string.man | 7 +++++++ 1 file changed, 7 insertions(+)
extensions/libxt_string.man +7 -0
@@ -16,3 +16,10 @@ Matches the given pattern. .TP [\fB!\fP] \fB\-\-hex\-string\fP \fIpattern\fP Matches the given pattern in hex notation. +.TP +Example: +.PP + Log HTTP GET requests for /test: +.PP + iptables \-A INPUT \-p tcp \-\-dport 80 \-m string \-\-algo bm \-\-string 'GET /test' \-j LOG + iptables \-A INPUT \-p tcp \-\-dport 80 \-m string \-\-algo bm \-\-hex\-string '|474554202F74657374|' \-j LOG
Signature · 1 line
1.8.4.rc3
The markup is wrong.
Quoted 27 lines · Laurence J. Lane
Show delimeters for hex string pattern.
Signed-off-by Laurence J. Lane <[email protected]>--- extensions/libxt_string.man | 7 +++++++ 1 file changed, 7 insertions(+)extensions/libxt_string.man +7
-1@@ -16,3 +16,10 @@ Matches the given pattern. .TP [\fB!\fP] \fB\-\-hex\-string\fP \fIpattern\fP Matches the given pattern in hex notation. +.TP +Example: +.PP + Log HTTP GET requests for /test: +.PP + iptables \-A INPUT \-p tcp \-\-dport 80 \-m string \-\-algo bm \-\-string 'GET /test' \-j LOG + iptables \-A INPUT \-p tcp \-\-dport 80 \-m string \-\-algo bm \-\-hex\-string '|474554202F74657374|' \-j LOG --1.8.4.rc3
PATCH v2 1/1 iptables: libxt_string.man add example
Show use of hex pattern delimeters.
--- extensions/libxt_string.man | 6 ++++++ 1 file changed, 6 insertions(+)
extensions/libxt_string.man +6 -0
@@ -16,3 +16,9 @@ Matches the given pattern. .TP [\fB!\fP] \fB\-\-hex\-string\fP \fIpattern\fP Matches the given pattern in hex notation. +.TP +Example: log HTTP GET requests for /test using string and hex string patterns +.IP +iptables \-A INPUT \-p tcp \-\-dport 80 \-m string \-\-algo bm \-\-string 'GET /test' \-j LOG +.IP +iptables \-A INPUT \-p tcp \-\-dport 80 \-m string \-\-algo bm \-\-hex\-string '|474554202F74657374|' \-j LOG
Signature · 1 line
1.8.4.rc3
Florian Westphal
maintainerQuoted 5 lines · Laurence J. Lane
extensions/libxt_string.man +0
-0
extensions/libxt_string.man Matches the given pattern. · line 24
Quoted 9 lines
extensions/libxt_string.man +6
-0@@ -16,3 +16,9 @@ Matches the given pattern. .TP [\fB!\fP] \fB\-\-hex\-string\fP \fIpattern\fP Matches the given pattern in hex notation. +.TP +Example: log HTTP GET requests for /test using string and hex string patterns +.IP +iptables \-A INPUT \-p tcp \-\-dport 80 \-m string \-\-algo bm \-\-string 'GET /test' \-j LOG +.IP +iptables \-A INPUT \-p tcp \-\-dport 80 \-m string \-\-algo bm \-\-hex\-string '|474554202F74657374|' \-j LOG
The second example doesn't make much sense to me, IMHO, since there is no reason to use hex instead of ascii for this.
What about something like
-p udp --dport 53 -m string --algo bm --from 40 --to 57 --hex-string '|03|www|09|netfilter|03|org|00|'
?
PATCH v3 1/1 iptables: libxt_string.man add examples
Add usage examples for string and hex string patterns.
Reference: http://bugs.debian.org/699904
--- extensions/libxt_string.man | 10 ++++++++++ 1 file changed, 10 insertions(+)
extensions/libxt_string.man +10 -0
@@ -16,3 +16,13 @@ Matches the given pattern. .TP [\fB!\fP] \fB\-\-hex\-string\fP \fIpattern\fP Matches the given pattern in hex notation. +.TP +Examples: +.IP +# The string pattern can be used for simple text characaters. +.br +iptables \-A INPUT \-p tcp \-\-dport 80 \-m string \-\-algo bm \-\-string 'GET /index.html' \-j LOG +.IP +# The hex string pattern can be used for non-printable characaters, like |0D 0A| or |0D0A|. +.br +iptables \-p udp \-\-dport 53 \-m string \-\-algo bm \-\-from 40 \-\-to 57 \-\-hex\-string '|03|www|09|netfilter|03|org|00|'
Signature · 1 line
1.8.4.rc3
PATCH v4 1/1 iptables: libxt_string.man add examples
Add usage examples for string and hex string patterns.
Reference: http://bugs.debian.org/699904
--- extensions/libxt_string.man | 10 ++++++++++ 1 file changed, 10 insertions(+)
extensions/libxt_string.man +10 -0
@@ -16,3 +16,13 @@ Matches the given pattern. .TP [\fB!\fP] \fB\-\-hex\-string\fP \fIpattern\fP Matches the given pattern in hex notation. +.TP +Examples: +.IP +# The string pattern can be used for simple text characaters. +.br +iptables \-A INPUT \-p tcp \-\-dport 80 \-m string \-\-algo bm \-\-string 'GET /index.html' \-j LOG +.IP +# The hex string pattern can be used for non-printable characaters, like |0D 0A| or |0D0A|. +.br +iptables \-p udp \-\-dport 53 \-m string \-\-algo bm \-\-from 40 \-\-to 57 \-\-hex\-string '|03|www|09|netfilter|03|org|00|' \-j LOG
Signature · 1 line
1.8.4.rc3
Re: [PATCH v3] iptables: libxt_string.man add examples
In reply to Laurence J. LaneQuoted 4 lines · Laurence J. Lane
Add usage examples for string and hex string patterns.
Reference: http://bugs.debian.org/699904
Signed-off-by Laurence J. Lane <[email protected]>
applied, thanks for updating.