From: Patrick McHardy <kaber@trash.net>
To: Per Jessen <per@computer.org>
Cc: netfilter@vger.kernel.org
Subject: Re: basic load distribution using -m statistic --mode nth
Date: Thu, 27 Mar 2008 23:28:05 +0100 [thread overview]
Message-ID: <47EC1F75.4070902@trash.net> (raw)
In-Reply-To: <47EBEE5C.9030503@computer.org>
Per Jessen wrote:
> I'm trying to set up basic load distribution using the following:
>
> iptables -t nat -A OUTPUT -d $addr -p udp --dport 53 -m
> statistic --mode nth --every 2 --packet 0 -j DNAT --to $fe1
> iptables -t nat -A OUTPUT -d $addr -p udp --dport 53 -m
> statistic --mode nth --every 2 --packet 1 -j DNAT --to $fe2
>
> (I know I can achieve pretty much the same using "options rotate"
> in resolv.conf, but humour me).
>
> I'm testing the setup with a simple "dig <host>", and it seems
> to be working, except that I get a hang ("no servers could be
> reached") on every 4th query. It is a consistently reproducable
> behaviour.
>
> I'm using iptables 4.0 and kernel 2.6.24.3. Can anyone spot
> anything I've missed?
DNAT is terminal, so you need:
rule 1: --every 2 --packet 0
rule 2: unconditional
next prev parent reply other threads:[~2008-03-27 22:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-27 18:58 basic load distribution using -m statistic --mode nth Per Jessen
2008-03-27 22:28 ` Patrick McHardy [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-03-28 7:23 Per Jessen
2008-03-28 8:31 ` Per Jessen
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=47EC1F75.4070902@trash.net \
--to=kaber@trash.net \
--cc=netfilter@vger.kernel.org \
--cc=per@computer.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.