From: Aleksandar Milivojevic <amilivojevic@pbl.ca>
To: netfilter@lists.netfilter.org
Subject: Re: Transparent Remote Proxy Server
Date: Fri, 24 Sep 2004 14:01:55 -0500 [thread overview]
Message-ID: <41546F23.2010601@pbl.ca> (raw)
In-Reply-To: <666183F7-0DA7-11D9-99BA-000A95C71776@freezone.co.uk>
ms419@freezone.co.uk wrote:
> I'm setting up a transparent proxy to a remote proxy server & can't
> figure out why it doesn't work.
>
> My gateway is tor; it's running Debian unstable, iptables 1.2.11-2, & a
> custom 2.4.27 kernel. My proxy server is wum; it's also running Debian
> unstable, squid 2.5.6-8, iptables 1.2.11-2, & a custom 2.6.7 kernel.
>
> Physically, tor is connected by each of 3 NICs to an ADSL modem, to wum
> by a crossover cable, & to the rest of the network by a hub.
>
> Logically, tor & wum are in 192.168.103.0/24; tor & the rest of the
> network are in 192.168.179.0/24.
Haven't done something like that myself, but wouldn't it be much simpler
to implement it like this (using filter table for filtering, and nat
table for NATing, as they were intended to be used):
replace:
int_if with tor's internal interface
ext_if with tor's external interface
wum_if with tor's interface to wum
tor_if with wum's interface to tor
On tor:
iptables -t nat -A PREROUTING -i int_if -s 192.168.179.0/24 \
-p tcp --dport 80 -j DNAT --to-destination wum:3128
iptables -t nat -A POSTROUTING -o ext_if -s 192.168.0.0/16 -j MASQUERADE
iptables -A FORWARD -i int_if -o wum_if -s 192.168.179.0/24 -d wum \
-p tcp --dport 3128 -m state --state NEW -j ACCEPT
On wum:
iptables -A INPUT -i tor_if -s 192.168.179.0/24 -d wum \
-p tcp --dport 3128 -m state --state NEW -j ACCEPT
Assuming chains in filter table have default policy set to DROP, and
chains in nat&mangle tables to ACCEPT.
These are just hints, you are advised not to cut&paste them into your
configuration (tm).
--
Aleksandar Milivojevic <amilivojevic@pbl.ca> Pollard Banknote Limited
Systems Administrator 1499 Buffalo Place
Tel: (204) 474-2323 ext 276 Winnipeg, MB R3T 1L7
next prev parent reply other threads:[~2004-09-24 19:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-23 21:27 Transparent Remote Proxy Server ms419
2004-09-24 19:01 ` Aleksandar Milivojevic [this message]
2004-09-27 18:25 ` ms419
2004-09-27 18:27 ` Jason Opperisano
2004-09-27 19:30 ` Aleksandar Milivojevic
2004-09-27 19:37 ` Jason Opperisano
2004-09-28 6:38 ` Arthur Meyer
2004-09-28 13:44 ` Jason Opperisano
2004-10-01 22:53 ` FIXED: " ms419
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=41546F23.2010601@pbl.ca \
--to=amilivojevic@pbl.ca \
--cc=netfilter@lists.netfilter.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.