Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Joel Newkirk <netfilter@newkirk.us>
To: Jean-Yves Simon <lethalwp@tiscali.be>
Cc: netfilter@lists.netfilter.org
Subject: Re: load balancing?
Date: 14 Jun 2003 11:36:55 -0400	[thread overview]
Message-ID: <1055605015.1853.37.camel@alpha.newkirk.us> (raw)
In-Reply-To: <1055591653.2543.3.camel@little.lethalwp>

On Sat, 2003-06-14 at 07:54, Jean-Yves Simon wrote:
> Hello,
> 
> I'm curious if load balancing can be done with iptables, like for
> example forwarding incoming web requests to one of the multiple web
> servers behind the firewall.
> 
> Or is a third party software needed?

If all you need is to distribute requests evenly across a range of IPs
you can use the rule:

iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to
10.10.10.1-10.10.10.16

This example would attempt to distribute incoming HTTP requests evenly
across the specified range of 16 IPs.

j




  reply	other threads:[~2003-06-14 15:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-14 11:54 load balancing? Jean-Yves Simon
2003-06-14 15:36 ` Joel Newkirk [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-06-15  1:28 Antonio Paulo Salgado Forster
2003-06-13  4:51 Jean-Yves Simon
2003-06-17 19:00 ` Garcia Ruiz
2003-06-18 13:39 ` Fabrice MARIE

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=1055605015.1853.37.camel@alpha.newkirk.us \
    --to=netfilter@newkirk.us \
    --cc=lethalwp@tiscali.be \
    --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