netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Help: Cycle through iptables rules
@ 2010-05-26  0:31 Felipe W Damasio
  2010-05-26  8:11 ` Eric Dumazet
  0 siblings, 1 reply; 26+ messages in thread
From: Felipe W Damasio @ 2010-05-26  0:31 UTC (permalink / raw)
  To: netfilter-devel

  Hi,

  I'm using squid on an ISP as a webcache.

  We have a very high load cache (6000 users with 300Mbps of web
access), and to solve the squid slowdown, the solution is to use
multiple http_port, using around 48 squid instances to serve the
users.

  It works fine when I put the machine (which is in bridge mode)
between the users and the final router (which does the NAT from
reserved IP addresses to the real IPs). I separated the rules like
this:

iptables -t mangle -A PREROUTING -i eth0 -p tcp -s 192.168.1.0/24
--dport 80  -j TPROXY --tproxy-mark 0x1/0x1 --on-port 3127
iptables -t mangle -A PREROUTING -i eth0 -p tcp -s 192.168.2.0/24
--dport 80  -j TPROXY --tproxy-mark 0x1/0x1 --on-port 3128
...


  Everything works fine when we use this scenario.

  But now it was decided (and I can't reverse the decision) that the
webcache machine was to be located between the final Router and the
internet....in this case, the cache machine is now only seeing a few
IP addresses....so I can't do this "-s <network or ip>" trick.

  So I'd like to know if I can cycle through all these rules based on
the number of connections.

  Something like "Forward the first 100 connections to port 3127, the
next 100 to 3128 ....at the end, forward the next 100 to port 3127
again", and so on.

  Is it possible?

  If it isn't currently, can this functionality be added? How can I help?

  Thanks for your advice.

   Cheers,

Felipe Damasio

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2010-06-01 10:01 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-26  0:31 Help: Cycle through iptables rules Felipe W Damasio
2010-05-26  8:11 ` Eric Dumazet
2010-05-26  9:47   ` Jan Engelhardt
2010-05-26 11:54     ` [PATCH] netfilter: xt_statistic: remove nth_lock spinlock Eric Dumazet
2010-05-26 12:07       ` Changli Gao
2010-05-26 12:29         ` Eric Dumazet
2010-06-01 10:01           ` Patrick McHardy
2010-05-26 12:12     ` Help: Cycle through iptables rules Eric Dumazet
2010-05-26 19:01     ` Felipe W Damasio
2010-05-26 20:18       ` Jan Engelhardt
2010-05-26 20:27         ` Eric Dumazet
2010-05-26 21:49           ` Felipe W Damasio
2010-05-26 22:13             ` Jan Engelhardt
2010-05-26 22:09           ` Jan Engelhardt
2010-05-27  4:03             ` Eric Dumazet
2010-05-27 20:29             ` Felipe W Damasio
2010-05-27 20:40               ` Eric Dumazet
2010-05-27 20:53                 ` Felipe W Damasio
2010-05-27 20:55                   ` Felipe W Damasio
2010-05-27 10:30           ` Maciej Żenczykowski
2010-05-27 10:34             ` Eric Dumazet
2010-05-27 10:35               ` Maciej Żenczykowski
2010-05-27 10:35             ` Maciej Żenczykowski
2010-05-27 10:47               ` Eric Dumazet
2010-05-27 20:35                 ` Felipe W Damasio
2010-05-28  0:10                 ` Changli Gao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).