From: Nikolai Lusan <nikolai@lusan.id.au>
To: Danny <dannydebont@gmail.com>
Cc: netfilter@vger.kernel.org
Subject: Re: Redirect question
Date: Sun, 23 Mar 2014 08:32:58 +1000 [thread overview]
Message-ID: <1395527578.7702.57.camel@localhost> (raw)
In-Reply-To: <20140322133802.GA5012@fever.havannah.local>
[-- Attachment #1: Type: text/plain, Size: 723 bytes --]
On Sat, 2014-03-22 at 15:38 +0200, Danny wrote:
> However, all internal clients can still connect to the internet if I do not tell
> them to go through the proxy.
You need to to a DNAT on the packets before they hit the net.
> How would I go about routing all the local clients to squid's port 3128?
iptables -t NAT - A PREROUTING -p tcp --dport 80 -j DNAT\
--to-destination <squid_IP>:3128
that is the simplest way - you do need to change some of the squid
config though. These days the TPROXY method is preferred though you
should read http://wiki.squid-cache.org/Features/Tproxy4
Also it's worth reading more about DNAT and TPROXY in the man pages.
--
Nikolai Lusan <nikolai@lusan.id.au>
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2014-03-22 22:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-22 13:38 Redirect question Danny
2014-03-22 22:32 ` Nikolai Lusan [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-03-04 22:59 Redirect Question Gary W. Smith
2005-03-04 23:05 ` Gavin Hamill
2003-07-13 21:55 REDIRECT question George Vieira
2003-07-11 11:09 Ruslan Spivak
[not found] <Pine.LNX.4.44.0307021216100.16552-100000@localhost>
2003-07-02 13:13 ` Ruslan Spivak
2003-07-02 10:56 Ruslan Spivak
2003-07-02 11:01 ` Chris Wilson
2003-07-02 11:14 ` Ruslan Spivak
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=1395527578.7702.57.camel@localhost \
--to=nikolai@lusan.id.au \
--cc=dannydebont@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox