Catch This Blog

Just another Directory Blog

Free Website Hosting

Transparent proxy with squid 2.x

transparent proxy having function to turn (redirect) all request web in port 80 to port that used as web proxy (default port 3128 in squid), use transparent proxy attributed so that unnecessary again done configuration towards browser client. to do the mentioned is wanted addition application likes ipchains or iptables as according to firewalls kind that used in proxy server. if ipchains that used so command to make transparent proxy.

ipchains -a input -p tcp -d any/0 www -j redirect 3128
or can also by order of next.
ipchains -a input -p tcp -d any/0 --dport 80 -j redirect 3128
but if firewalls kind that used iptables so command that given.
iptables -a prerouting -t nat -p tcp --dport 80 -j redirect --to-port 3128
But otherwise want done redirecting so can be used command next
iptables - t nat -a prerouting -i eth0 -s! 192.168.1.10 -p tcp --dport 80 -j dnat --to 192.168.1.10: 3128
From command at assumption kan that is ip address yag used as proxy server 192.168.1.10. firewalls configuration having taken ste to transparent proxy ha next that must be done edit configuration file from squid itself, that is with add trivial lines next.
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on

1 comments:

Anonymous said...

mantap nih blog, makasih banyak gan buat pencerahannya....salam blogger inidonesia

Post a Comment

Nuhade Web Designer & Developers Studio Blog

Blog Archive