🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.linux.security
Article #28

Re: Squid&RH 7.0

#28
From: Elem103
Date: Wed, 04 Apr 2001 00:53
47 lines
3192 bytes
"maher" <maher@mimos.my> wrote in message news:3ACA8FB2.ADA69A68@mimos.my...
> KW wrote:
> >
> > We didn't have to change our firewall rules..   as long as you can get
> > out on the masq you should be ok..   far as setting up squid, you can
> > pretty much install the RPMS and goto the squid.conf file and go through
> > it.  The .conf explains itself pretty well.  If you want to run  it as a
> > transparent proxy... you simply use prerouting to grab all packets on 80
> > and send them to 3128 on squid... ;)
>
> BTW, how do you do that? is it using ipchains to redirect packets from
> 80 to 3128?

Prerouting ... sounds like iptables to me.  Anyway... below is a setup for
ipchains.

eg. you have 2 network card on the computer and you already have packet
forwarding enabled and set up via ipchains.

Internet<---->(203.x.x.x (dynamic))Server With Squid (192.168.1.1)<---->Your
Local LAN (192.168.1.x)

# A few things needed for transparent proxying
ipchains -A input -p tcp -d localhost 80 -j REJECT
ipchains -A input -d 192.168.1.1/32 80 -p tcp -j REJECT
ipchains -A input -d 192.168.1.1/32 80 -p udp -j REJECT

# Redirect things to port 80 to port 3128
ipchains -A input -s 192.168.1.0/24 -d 0.0.0.0/0 80 -p tcp -j REDIRECT 3128
ipchains -A input -s 192.168.1.0/24 -d 0.0.0.0/0 80 -p udp -j REDIRECT 3128

# Optionally, you can also redirect SSL and FTP
ipchains -A input -s 192.168.1.0/24 -d 0.0.0.0/0 443 -p tcp -j REDIRECT 3128
ipchains -A input -s 192.168.1.0/24 -d 0.0.0.0/0 443 -p udp -j REDIRECT 3128
ipchains -A input -s 192.168.1.0/24 -d 0.0.0.0/0 21 -p tcp -j REDIRECT 3128
ipchains -A input -s 192.168.1.0/24 -d 0.0.0.0/0 21 -p udp -j REDIRECT 3128

Your squid needs to be configured as a HTTPD accelerator as well.

httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on

=-
Elem103
Technical Details
Message-ID: <pguy6.1920$MM.85195@ozemail.com.au>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!nntp.cs.ubc.ca!newsfeed.direct.ca!look.ca!sjc1.nntp.concentric.net!newsfeed.concentric.net!newsfeed.ozemail.com.au!ozemail.com.au!not-for-mail
References: <9acjfg$80u$1@perki.connect.com.au> <LPky6.7727$mA.2347044@newsrump.sjc.telocity.net> <3ACA8FB2.ADA69A68@mimos.my>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 102983,601f652b2a7b255f
X-Google-Attributes: gid102983,public
X-Google-Thread: f9b51,601f652b2a7b255f
X-Google-Attributes: gidf9b51,public
X-Google-Thread: 106e9e,601f652b2a7b255f
X-Google-Attributes: gid106e9e,public
X-Google-ArrivalTime: 2001-04-03 17:54:06 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!nntp.cs.ubc.ca!newsfeed.direct.ca!look.ca!sjc1.nntp.concentric.net!newsfeed.concentric.net!newsfeed.ozemail.com.au!ozemail.com.au!not-for-mail
From: "Elem103" <elem103@smokey.aic.net.au>
Newsgroups: comp.os.linux.security,comp.os.linux.setup,aus.computers.linux
References: <9acjfg$80u$1@perki.connect.com.au> <LPky6.7727$mA.2347044@newsrump.sjc.telocity.net> <3ACA8FB2.ADA69A68@mimos.my>
Subject: Re: Squid&RH 7.0
Lines: 49
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Message-ID: <pguy6.1920$MM.85195@ozemail.com.au>
NNTP-Posting-Host: h94.unit21.ozemail.com.au
X-Trace: ozemail.com.au 986345621 203.108.13.94 (Wed, 04 Apr 2001 10:53:41 EST)
NNTP-Posting-Date: Wed, 04 Apr 2001 10:53:41 EST
Organization: OzEmail Ltd, Australia
Distribution: world
Date: Wed, 4 Apr 2001 10:53:40 +1000