From: Stephen Clark <sclark46@earthlink.net>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: Changli Gao <xiaosuo@gmail.com>, netfilter-devel@vger.kernel.org
Subject: Re: clone packet with new destination address
Date: Tue, 02 Nov 2010 09:53:57 -0400 [thread overview]
Message-ID: <4CD017F5.90509@earthlink.net> (raw)
In-Reply-To: <alpine.LNX.2.01.1011021445320.7622@obet.zrqbmnf.qr>
On 11/02/2010 09:46 AM, Jan Engelhardt wrote:
> On Tuesday 2010-11-02 14:44, Stephen Clark wrote:
>
>>>
>>>
>>>> Also if I am mistaken and it does hit one of the remaining iptables
>>>> chains how do I tell it is not the original but the cloned packet I
>>>> want to change to the new destination address?
>>>>
>>>>
>>> Good question. Given the possibilities I think an extra route towards
>>> the logging server that specifies a realm value, that is then
>>> matchable in -A OUTPUT -m realm, is in order.
>>>
>>>
>> Hmm...,
>>
>> Sounds like maybe an easier way to do this is to use libipq and the
>> QUEUE target to select the packets of interest - then make a copy
>> of the packet in userspace and use a raw socket to send the copy
>> with the new destination address on its way.
>>
>> Does this sound reasonable?
>>
> The roundtrip over userspace sounds unnecessarily imperformant.
>
>
I would agree but it keeps me from being dependent on a particular
kernel version
and we are only concerned with less than 10 packets per second.
--
"They that give up essential liberty to obtain temporary safety,
deserve neither liberty nor safety." (Ben Franklin)
"The course of history shows that as a government grows, liberty
decreases." (Thomas Jefferson)
next prev parent reply other threads:[~2010-11-02 13:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-22 12:31 clone packet with new destination address Stephen Clark
2010-10-22 13:24 ` Changli Gao
2010-10-22 13:36 ` Changli Gao
2010-10-22 14:16 ` Stephen Clark
2010-11-01 12:46 ` Stephen Clark
2010-11-01 13:09 ` Jan Engelhardt
2010-11-01 14:29 ` Stephen Clark
2010-11-01 15:00 ` Changli Gao
2010-11-01 15:02 ` Changli Gao
2010-11-01 15:16 ` Stephen Clark
2010-11-01 19:37 ` Jan Engelhardt
2010-11-01 19:29 ` Jan Engelhardt
2010-11-02 13:44 ` Stephen Clark
2010-11-02 13:46 ` Jan Engelhardt
2010-11-02 13:53 ` Stephen Clark [this message]
2010-11-02 22:35 ` Changli Gao
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=4CD017F5.90509@earthlink.net \
--to=sclark46@earthlink.net \
--cc=jengelh@medozas.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=xiaosuo@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.