Article View: comp.os.linux.security
Article #19Re: Squid&RH 7.0
From: Theng Ung
Date: Mon, 09 Apr 2001 18:08
Date: Mon, 09 Apr 2001 18:08
63 lines
3504 bytes
3504 bytes
Hi, I manage to get it to work now. by using ipchains rules below (modify to suit my LAN) and also reading this site http://rpmfind.net/linux/mdw/HOWTO/mini/TransparentProxy-4.html . Elem103 mention most of it but the site mention something that I don't know before. like 1. squid -z # run first time 2. http_access allow all #in httpd.conf Regarding the ipchains rules belows I simply just run it on top of the rules generated by the firewall (firestarter). Right now anyone can browse from my LAN (192.168.0.0/24)either using the proxy or without the proxy that I set up. I want to restrict everyone in my LAN to user the proxy server (192.168.0.3). Any help is much appreciated. Anway many thanks to Elem103 for his kind contributions. Regads, Theng Elem103 wrote: > " > > 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:
<3AD1F8E7.5A9CF70F@bigpond.net.au>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!newsfeed.wirehub.nl!news.stealth.net!intgwpad.nntp.telstra.net!news-server.bigpond.net.au!not-for-mailReferences:
<9acjfg$80u$1@perki.connect.com.au> <LPky6.7727$mA.2347044@newsrump.sjc.telocity.net> <3ACA8FB2.ADA69A68@mimos.my> <pguy6.1920$MM.85195@ozemail.com.au>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f9b51,601f652b2a7b255f X-Google-Attributes: gidf9b51,public X-Google-Thread: 106e9e,601f652b2a7b255f X-Google-Attributes: gid106e9e,public X-Google-Thread: 102983,601f652b2a7b255f X-Google-Attributes: gid102983,public X-Google-ArrivalTime: 2001-04-09 11:10:03 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!newsfeed.wirehub.nl!news.stealth.net!intgwpad.nntp.telstra.net!news-server.bigpond.net.au!not-for-mail Message-ID: <3AD1F8E7.5A9CF70F@bigpond.net.au> From: Theng Ung <pung1@bigpond.net.au> X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.16-22 i686) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.linux.security,comp.os.linux.setup,aus.computers.linux Subject: Re: Squid&RH 7.0 References: <9acjfg$80u$1@perki.connect.com.au> <LPky6.7727$mA.2347044@newsrump.sjc.telocity.net> <3ACA8FB2.ADA69A68@mimos.my> <pguy6.1920$MM.85195@ozemail.com.au> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 64 Date: Mon, 09 Apr 2001 18:08:21 GMT NNTP-Posting-Host: 203.45.9.191 X-Complaints-To: news@bigpond.net.au X-Trace: news-server.bigpond.net.au 986839701 203.45.9.191 (Tue, 10 Apr 2001 04:08:21 EST) NNTP-Posting-Date: Tue, 10 Apr 2001 04:08:21 EST Organization: BigPond Internet Services (http://www.bigpond.net.au)