Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Grant Taylor <gtaylor@riverviewtech.net>
To: Mail List - Netfilter <netfilter@vger.kernel.org>
Subject: Re: question on extern exec prog with iptables.
Date: Sat, 15 Nov 2008 01:04:44 -0600	[thread overview]
Message-ID: <491E748C.10802@riverviewtech.net> (raw)
In-Reply-To: <1226731090.4215.39.camel@lya14-2-82-232-125-204.fbx.proxad.net>

On 11/15/2008 12:38 AM, sebastien wrote:
> The problem is that iptables or ip6tables won't be natively able to 
> send me the original destination client's address and port of 
> server's answer : am I wrong ? iptables and ip6tables will form a new 
> address and port destination and that'all.

Why not?  (See below.)

> If so, I need a way to send the exact port of the original packet to 
> the corrective program : the one which will desserve transparently 
> the client called by ? ... iptables or ip6tables.

I think you will probably be best served by (I believe) the QUEUE target 
that allows IPTables to pass complete packets to user space for processing.

> Does iptables and ip6tables modules can do this ? Call a extern 
> program with the full packet content of the server.

I think if you use the QUEUE target you will be able to pass packets 
(which ever ones you want) to your ""correction program, including all 
source / destination IP and port information.  With this information you 
should be able to process the packets as you see fit and then generate a 
new reply packet.



Grant. . . .

      reply	other threads:[~2008-11-15  7:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-15  6:38 question on extern exec prog with iptables sebastien
2008-11-15  7:04 ` Grant Taylor [this message]

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=491E748C.10802@riverviewtech.net \
    --to=gtaylor@riverviewtech.net \
    --cc=netfilter@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