How to Transparent Proxy With Squid

Partition Table Information
Filesystem Size Used Avail Use% Mounted on
/dev/hda2 12G 663M 12G 6% /
tmpfs 1005M 0 1005M 0% /dev/shm
/dev/hda1 102M 36M 66M 36% /boot
/dev/hda7 3.2G 33M 3.2G 1% /home
/dev/hda6 5.0G 131M 4.9G 3% /tmp
/dev/hda3 16G 363M 15G 3% /var
/dev/hdb1 38G 17G 21G 45% /var/cache/squid

Package for Installation: squid-2.5.STABLE9-4.2
Checking for Installation: rpm –qa grep squid
Installing Squid through yast2:
yast2->Install and Remove S/W->Ctrl+S->search for squid->then install

Configuration File: /etc/squid/squid.conf

http_port 8080
cache_dir ufs /var/cache/squid 38000 16 256
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log

http_access allow all

httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on

Traffic Redirection Rule (iptables rule for transparent proxy):
iptables –A PREROUTING –i eth0 –p tcp –m tcp –dport 80 –j REDIRECT –to-port 8080

Note: Save the rule in a file by using the following command, because when the system reboots it flushes all iptables rules

iptables-save > redirect

Now restore the iptables rules by specifying the following command in the /etc/init.d/boot.local file:

Iptables-restore <>

Forex Trading