From: Menno Smits <menno@netboxblue.com>
To: Netfilter Development Mailinglist <netfilter-devel@lists.netfilter.org>
Subject: "Late REDIRECT"
Date: Mon, 13 Mar 2006 19:06:29 +1000 [thread overview]
Message-ID: <44153615.50408@netboxblue.com> (raw)
Hi,
Just wanted to ask for your opinions on an idea. Please let me know if
you think this is too difficult or crazy.
We use currently use the REDIRECT target in nat PREROUTING to send
specific traffic to proxies running on our gateway (http, pop3, dns and
smtp).
This works ok but we have the following problems:
1) nat PREROUTING happens before filter FORWARD. If we want to apply
consistent filter rules to outbound traffic regardless of whether it
goes via a transparent proxy or directly out then we can't because the
transproxied traffic never goes thru filter FORWARD. Currently we use a
horrible system of marks set in mangle PREROUTING to work around this.
We reject packets in FORWARD or skip the REDIRECTs in nat based on the
marks set. This is ugly and hard to debug (esp because we also use marks
for traffic shaping).
2) Return traffic from the transparent proxy REDIRECTs has the source IP
and source port of the transparent proxy listener, not the true remote
site and port. This means that when we do accounting for return traffic
(using ULOG in mangle POSTROUTING) the remote host and port are incorrect.
A possible solution to the above problems is to allow REDIRECTs to occur
in nat POSTROUTING (a "late redirect" for want of a better term). That
way all outbound traffic can pass through filter FORWARD before being
REDIRECTed. The reply NAT for the late REDIRECT would work in a similar
way, being performed before filter FORWARD so that the true source IP
and port is seen there.
Is something like this feasible? How difficult would it be implement? Am
I barking up the wrong tree?
Regards,
Menno
Scanned by the NetBox from NetBox Blue
(http://netboxblue.com/)
next reply other threads:[~2006-03-13 9:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-13 9:06 Menno Smits [this message]
2006-03-13 11:01 ` "Late REDIRECT" Pablo Neira Ayuso
2006-03-14 2:50 ` Menno Smits
2006-03-16 9:14 ` mud dog
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=44153615.50408@netboxblue.com \
--to=menno@netboxblue.com \
--cc=netfilter-devel@lists.netfilter.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 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.