Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Pascal Hambourg <pascal.mail@plouf.fr.eu.org>
To: netfilter <netfilter@lists.netfilter.org>
Subject: Re: FORWARD packet problem
Date: Thu, 20 Jul 2006 17:46:38 +0200	[thread overview]
Message-ID: <44BFA55E.504@plouf.fr.eu.org> (raw)
In-Reply-To: <44BF8A13.2010205@darkstar.nom.za>

Paulo Andre a écrit :
>>
>>> I have a multiple isp fw
>>> eth0 = int
>>> eth1 = default isp
>>> eth2 = sec isp
>>>
>>> when I try and make a connection to and internal server via the eth2 
>>> , the packet appears on the PREROUTING table, and then not on FORWARD 
>>> , anyone have any ideas?

[disable rp_filter on the interface]

> Thanks Pascal, that fixed it.

Be aware that now eth2 is not protected against IP spoofing by the input 
routing any more. So you must use iptables rules to drop incoming 
packets with an "impossible" IP source address on this interface, i.e. 
an address belonging to another interface (lo, eth0, eth1) subnet.

> Would I have to use CONNMARK and MARK to get connections leaving the 
> correct interface?

I'm not sure I understand your question correctly. Do you mean routing 
reply packets belonging to connections coming from the secondary ISP 
back through the same interface ?

If so, you have to use CONNMARK+MARK+advanced routing only when there is 
no other way to identify packets which must be sent via the non-default 
interface. If they have distinctive characteristics other than the 
source or destination IP addresses (for example the source or 
destination port), you don't need CONNMARK and can use only 
MARK+advanced routing. If they have distinctive source IP addresses, you 
can use only advanced routing. And of course, if they have distinctive 
destination IP addresses, you only need standard routing.

But routing the packets through the correct interface won't allow you to 
re-enable rp_filter, at least when MARK is in use, because the rp_filter 
validation does not take iptables rules into account. I'm not sure about 
using only advanced routing though (does rp_filter validation use the 
packet destination address ?).


      reply	other threads:[~2006-07-20 15:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-19 15:12 FORWARD packet problem Paulo Andre
2006-07-19 17:19 ` Jorge Davila
2006-07-19 19:09 ` Pascal Hambourg
2006-07-20 13:50   ` Paulo Andre
2006-07-20 15:46     ` Pascal Hambourg [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=44BFA55E.504@plouf.fr.eu.org \
    --to=pascal.mail@plouf.fr.eu.org \
    --cc=netfilter@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox