Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Pascal Hambourg <pascal.mail@plouf.fr.eu.org>
To: Tommaso Calosi <tcalosi@gmail.com>
Cc: netfilter@vger.kernel.org
Subject: Re: balance traffic between virtual interfaces on the same network
Date: Tue, 09 Nov 2010 16:41:37 +0100	[thread overview]
Message-ID: <4CD96BB1.8050109@plouf.fr.eu.org> (raw)
In-Reply-To: <AANLkTimy_Um5z=MDeUqVfY5Kea1HpbHPg9ik3CKoE0+Q@mail.gmail.com>

Tommaso Calosi a écrit :
> That's why i wrote "virtual interfaces".

eth0:* are not virtual interfaces, not interfaces at all. They are just
IPv4 aliases. Virtual interfaces are a different thing : they are "real"
interfaces (from the network stack point of view) which are just not
related to real hardware.

> If t's not possibile, then
> it'd have the same effect to masquerade outgoing connection with a nat
> pool made by 192.168.1.10, 192.168.1.20 and 192.168.1.30 but since
> they're originating from the firewall itself, again I don't know how.

You can use SNAT. It does not matter that the traffic originates from
the box. However your addresses are not contiguous and the support for
multiple --to-source options was removed long ago, so you'll have to do
the balance by other means, for example with the statistic match.

Note that it won't balance the source address on a packet basis but on a
connection basis. So if you have one very active connection and one
mostly inactive connection, most of the packets will have the same
source address.

  reply	other threads:[~2010-11-09 15:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-09 13:38 balance traffic between virtual interfaces on the same network Tommaso Calosi
2010-11-09 13:53 ` Jan Engelhardt
2010-11-09 15:00   ` Tommaso Calosi
2010-11-09 15:41     ` Pascal Hambourg [this message]
2010-11-09 16:10       ` Tommaso Calosi

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=4CD96BB1.8050109@plouf.fr.eu.org \
    --to=pascal.mail@plouf.fr.eu.org \
    --cc=netfilter@vger.kernel.org \
    --cc=tcalosi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox