netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe W Damasio <felipewd@gmail.com>
To: netfilter-devel@vger.kernel.org
Subject: ebtables extension 'http'
Date: Mon, 25 Jan 2010 11:46:52 -0200	[thread overview]
Message-ID: <8a87046f1001250546w1dec4136nc509510e8ac15eb8@mail.gmail.com> (raw)

  Hi,

  I'm using squid to cache all the content from certain domains, such
as amazon.com, googlevideo.com, etc.

  But when using:

ebtables -t broute -A BROUTING -p ipv4 --ip-proto tcp --ip-dport 80
-j redirect --redirect-target DROP

  All the http traffic is routed...and my squid doesn't handle it
well, since the ISP in question has a 600Mbps with about 10-12,000
users.

  So I thought I could develop something like this:

ebtables -t broute -A BROUTING -p ipv4 --ip-proto tcp --ip-dport 80
--http-domain '.*googlevideo.com.*' -j redirect --redirect-target DROP

  And match the regexp --http-domain with the http header on (each)
packet the match "--ip-dport 80".

  This way all the non-cacheable traffic doesn't get routed, it's
forwarded along all other traffic, and only the desirable packets are
routed to iptables and then squid.

  What do you guys think? Could this be done?

  Any thoughts would be appreciated.

  Cheers,

Felipe Damasio

             reply	other threads:[~2010-01-25 13:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-25 13:46 Felipe W Damasio [this message]
2010-01-25 13:54 ` ebtables extension 'http' Jan Engelhardt
2010-01-25 14:32   ` Felipe W Damasio
2010-01-25 16:35     ` Jan Engelhardt
2010-01-25 16:50       ` Patrick McHardy
2010-01-25 16:55         ` Jan Engelhardt
2010-01-25 16:57           ` Patrick McHardy
2010-01-25 17:45           ` Felipe W Damasio
2010-01-25 19:02             ` Pascal Hambourg
2010-01-26  6:29               ` Changli Gao

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=8a87046f1001250546w1dec4136nc509510e8ac15eb8@mail.gmail.com \
    --to=felipewd@gmail.com \
    --cc=netfilter-devel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).