From: Rob Landley <landley@webofficenow.com>
To: David Ford <david@blue-labs.org>, linux-kernel@vger.kernel.org
Subject: Re: RP_FILTER runs too late
Date: Mon, 6 Aug 2001 20:52:34 -0400 [thread overview]
Message-ID: <01080620523409.04153@localhost.localdomain> (raw)
In-Reply-To: <3B6F8E17.9090100@blue-labs.org>
In-Reply-To: <3B6F8E17.9090100@blue-labs.org>
On Tuesday 07 August 2001 02:43, David Ford wrote:
> I finally figured out why my SNAT setup wasn't working. I had 1 in
> eth0/rp_filter and that was silently breaking it.
>
> This discussion follows the scripts located at website
> http://blue-labs.org/ , rc.networking and rc.firewalling. Both are live
> meaning you'll see any changes I make.
>
> Here's the scoop. I run a VPN from here to my colo server...but I don't
> want all my traffic going through the VPN. So I need to finagle a
> method of NAT. Now because the NAT code runs behind the routing code,
> packets are already heading the wrong direction when they get their
> headers changed. Because of that you need to tag them with a mark and
> implement routing rules based on that mark. As an aside note, all that
> could be avoided if SNAT would just be available in PREROUTING.
>
> Ok. Now that packets are flowing through the right interfaces, things
> look good but wait...the reply packets are vanishing without a trace.
>
> The culprit is the rp_filter on eth0. The packet comes in, gets the
> header rewritten then gets chomped by rp_filter. I'm not quite sure why
> because the src is still an external IP and the destination before and
> after is still an internal IP.
>
> Wouldn't the rp_filter be more effective if it came ahead of the nat
> code? As it is now, it's useless on that interface.
>
> David
I just put up some firewall rules as part of the Dynamic Virtual Private
Networking project on sourceforge at http://dvpn.sourceforge.net. It shows
both source and destination nat, port forwarding outside of a box, and a
couple other fun goodies. Not necessarily your kind of VPN, but maybe it'll
help...
I'm not sure what you're trying to do, but I got everything I tried to work...
Rob
next prev parent reply other threads:[~2001-08-07 9:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-07 6:43 RP_FILTER runs too late David Ford
2001-08-07 0:52 ` Rob Landley [this message]
2001-08-07 18:06 ` David Ford
2001-08-07 19:07 ` Dan Hollis
2001-08-09 8:05 ` Rob Landley
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=01080620523409.04153@localhost.localdomain \
--to=landley@webofficenow.com \
--cc=david@blue-labs.org \
--cc=linux-kernel@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