netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: "Laurence J. Lane" <ljlane@debian.org>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH v2] iptables: libxt_string.man add example
Date: Sat, 24 Aug 2013 12:00:07 +0200	[thread overview]
Message-ID: <20130824100007.GA26291@breakpoint.cc> (raw)
In-Reply-To: <1377291322-17456-1-git-send-email-ljlane@debian.org>

Laurence J. Lane <ljlane@debian.org> wrote:
> diff --git a/extensions/libxt_string.man b/extensions/libxt_string.man
> index b6b271d..ab395b2 100644
> --- a/extensions/libxt_string.man
> +++ b/extensions/libxt_string.man
> @@ -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|'

?

  reply	other threads:[~2013-08-24 10:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-23  6:41 [PATCH] iptables: libxt_string.man add example Laurence J. Lane
2013-08-23 19:38 ` Laurence J. Lane
2013-08-23 20:55   ` [PATCH v2] " Laurence J. Lane
2013-08-24 10:00     ` Florian Westphal [this message]
2013-08-24 21:37       ` [PATCH v3] iptables: libxt_string.man add examples Laurence J. Lane
2013-08-24 21:44         ` [PATCH v4] " Laurence J. Lane
2013-08-24 21:51         ` [PATCH v3] " Florian Westphal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130824100007.GA26291@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=ljlane@debian.org \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).