Tuesday, May 26, 2009

Squid Transparent configuration

Please follow these steps you will INSHA ALLAH configure the squid with
transparent option.....
You can also you dhcpd server for ip assigning.


vim /etc/sysctl.conf

net.ipv4.ip_forward = 1

save & quit

vim /etc/squid/squid.conf

###......please enable these options......###

http_port 3128 transparent

acl our_networks src 192.168.1.0/24

http_access allow our_networks

cache_mem 16M

access_log /var/log/squid/access.log

cache_log /var/log/squid/cache.log

store_log /var/log/squid/store.log

cache_dir /var/spool/squid 2000 16 256

cache_mgr baber@wbitt.com

visible_hostname squid.linuxlab.int

save and quit

#squid -z

#service squid start

###........then if u want to make it transparent kindly add rule to iptables
firwall........###



#iptables -t nat -A PREROUTING -p tcp -i etho --dport 80 -j REDIRECT --to-port
3128

###......Note: eth0 is connected with your LAN switch......###

Baber Zahoor
RHCE 5.0

2 comments:

  1. This is a wonderful post. Keep it up.

    ReplyDelete
  2. AOA Sir,
    Alhumdulillah i have applied Squid Transparent Configuration in my home network.its working well.Insha-Allah i will also implement it in my Institute.

    ReplyDelete