From: Kenneth Sande <sandekt@wow-ia.net>
To: netfilter@vger.kernel.org
Subject: Re: Squid Redirection
Date: Tue, 05 Jan 2010 18:24:27 -0500 [thread overview]
Message-ID: <4B43CA2B.40309@wow-ia.net> (raw)
In-Reply-To: <8ec0428d1001051445j60c7a32q25d34e8b0db7560a@mail.gmail.com>
Aaron Clausen wrote:
> On Mon, Jan 4, 2010 at 10:38, Kenneth Sande <sandekt@wow-ia.net> wrote:
>
>> I do it this way for my one internal subnet. There may be more and better
>> options, but this works for me.
>>
>> "iptables -t nat -A PREROUTING -i ${INT_INTERFACE} -s ${INT_NETWORK} -p tcp
>> --dport 80 --sport 1024:65535 -m state --state NEW,ESTABLISHED,RELATED -j
>> REDIRECT --to-port 3128"
>>
>> Squid must also be set up to accept transparent connections.
>>
>
> Thanks. Now for another question. I have about a dozen workstations
> that I want to bypass squid (they are in the same subnet as the
> workstations that I want traffic sent through squid). Reading squid's
> documentation, they recommend that this be done at the client end or
> via iptables. What's the rule to allow these hosts to bypass squid?
>
>
What I do is have a special portion of my subnet set aside for
"unfiltered" access, and I just put an ACCEPT chain in for that portion
before the REDIRECT for the whole subnet.
So it looks similar to this:
"iptables -t nat -A PREROUTING -i ${INT_INTERFACE} -s
${INT_NOSQUID-NETWORK} -p tcp
--dport 80 --sport 1024:65535 -m state --state NEW,ESTABLISHED,RELATED
-j ACCEPT"
"iptables -t nat -A PREROUTING -i ${INT_INTERFACE} -s ${INT_NETWORK} -p tcp
--dport 80 --sport 1024:65535 -m state --state NEW,ESTABLISHED,RELATED -j
REDIRECT --to-port 3128"
In my case the INT-NOSQUID-NETWORK is 192.168.0.32/28, which gives me 16
addresses that can bypass this--which I assign manually.
I believe that you can also set up squid so that it makes these
computers bypass the cache. I think it's the "always_direct [allow|deny]
'acl list'" directive. I haven't played with that too much, and not
entirely sure if that is working right for my WSUS server.
(Sending reply to the list this time)
-Ken Sande/KC8QNI
next prev parent reply other threads:[~2010-01-05 23:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-04 18:31 Squid Redirection Aaron Clausen
2010-01-04 18:38 ` Kenneth Sande
2010-01-05 22:45 ` Aaron Clausen
2010-01-05 23:24 ` Kenneth Sande [this message]
2010-01-06 9:41 ` Mart Frauenlob
2010-01-06 10:12 ` Mart Frauenlob
2010-01-05 9:36 ` Mart Frauenlob
2010-01-05 10:31 ` John Haxby
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=4B43CA2B.40309@wow-ia.net \
--to=sandekt@wow-ia.net \
--cc=netfilter@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 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.