squid installation problem

General discussion about PLUC and Linux in Pakistan.
Post Reply
venky145
Havaldaar
Posts: 118
Joined: Thu Jan 13, 2005 2:35 pm
Location: qatar
Contact:

squid installation problem

Post by venky145 »

hai all

i got a squid config file. can any 1 tell me how to install the squid transperant proxy. pls give me reply step by step. briefly....


http_port 3128

hierarchy_stoplist cgi-bin ?

acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY

cache_mem 256 MB

cache_dir diskd /var/spool/squid/cache0 4000 16 256
#cache_dir diskd /var/spool/squid/cache1 4000 16 256
#cache_dir diskd /var/spool/squid/cache2 4000 16 256
#cache_dir diskd /var/spool/squid/cache3 4000 16 256

dns_nameservers 216.236.98.2 192.168.1.2

diskd_program /usr/lib/squid/diskd
unlinkd_program /usr/lib/squid/unlinkd

acl all src 0.0.0.0/0.0.0.0
acl vc src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT

http_access allow manager localhost
http_access allow manager vc
http_access allow manager Safe_ports
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access allow vc
http_access deny all

icp_access allow all

httpd_accel_port 80
httpd_accel_host virtual
httpd_accel_with_proxy on
httpd_accel_uses_host_header on

#delay_pools 2
#delay_class 1 3
#delay_parameters 1 -1/-1 -1/-1 4000/4000
#delay_access 2 allow vc
#ie_refresh off
acl t src 0.0.0.0/0.0.0.0
delay_pools 2
delay_class 1 3
delay_parameters 1 -1/-1 -1/-1 4000/4000
delay_access 1 allow t
Qadri-409
Battalion Havaldaar Major
Posts: 286
Joined: Sun May 09, 2004 4:16 pm
Location: Peshawar
Contact:

Re: squid installation problem

Post by Qadri-409 »

venky145 wrote:hai all

i got a squid config file. can any 1 tell me how to install the squid transperant proxy. pls give me reply step by step. briefly....

Dear Venky145 Salams
take latest stable release from http://squid-cache.org
squid-2.5.STABLE9.tar.bz2

and follow the links this topic has been disscuss no of times in the LP ...search before you ask ..coz it saves your time ...you don't have to waite for answers :) luck all the way
http://www.geocities.com/naatsharif/squid.html
http://www.linuxpakistan.net/forum2x/vi ... .php?t=414
http://www.tldp.org/HOWTO/TransparentProxy.html
http://www.faqs.org/docs/Linux-mini/Tra ... Proxy.html

takecare
M Shahzad Qadri
rehanjafry
Cadet
Posts: 8
Joined: Tue Dec 28, 2004 8:17 pm
Location: karachi
Contact:

Post by rehanjafry »

All is fine ... U just need to redirect port 80 traffic to Squid port through IPTABLES .

Here is the command , Type it on Root as superuser



iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 8080 .


This command will redirect ur all http traffic to squid port . This will make ur proxy a Transparent proxy .
Qadri-409
Battalion Havaldaar Major
Posts: 286
Joined: Sun May 09, 2004 4:16 pm
Location: Peshawar
Contact:

Post by Qadri-409 »

rehanjafry wrote:All is fine ... U just need to redirect port 80 traffic to Squid port through IPTABLES .
iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 8080 .
he is using http_port 3128

iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128
M Shahzad Qadri
Post Reply