berikut ini saya akan berbagi bagaimana cara install squid untuk Transparent Anonymous Private Proxy pada server atau VPS anda
untuk anda ketahui, Squid adalah sebuah service yang digunakan sebagai proxy server dan web cache. Squid memiliki banyak jenis kegunaaan, mulai dari mempercepat server web dengan melakukan caching permintaan yang berulang-ulang, caching DNS, caching situs web dan lain-lain. untuk itu kami membuat tutorial Cara Install Squid untuk Transparent Anonymous Private Proxy ini, langkah-langkahnya adalah sebagai berikut:
- Step #1: Install squid dan apache utility
apt-get install squid -y apt-get install apache2-utils
default lokasi ncsa_auth biasanya adalah /usr/lib/squid/ncsa_auth
dpkg -L squid | grep ncsa_auth
mv /etc/squid/squid.conf /etc/squid/squid.conf.old
vi /etc/squid/squid.conf
# add auth_params auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd auth_param basic children 2 auth_param basic realm My Proxy Server auth_param basic credentialsttl 24 hours auth_param basic casesensitive off # add acl rules acl users proxy_auth REQUIRED # http access rules http_access deny !users http_access allow users
# deny cache hierarchy_stoplist cgi-bin ? acl QUERY urlpath_regex cgi-bin \? \.css no_cache deny QUERY acl NOT_TO_CACHE dstdomain "/etc/squid/list/not-to-cache.conf" no_cache deny NOT_TO_CACHE
acl ip1 myip XXX.XXX.XXX.XXX tcp_outgoing_address XXX.XXX.XXX.XXX ip1 acl ip2 myip XXX.XXX.XXX.YYY tcp_outgoing_address XXX.XXX.XXX.YYY ip2 acl ip3 myip XXX.XXX.XXX.ZZZ tcp_outgoing_address XXX.XXX.XXX.ZZZ ip3
# ANONYMOUS PROXY forwarded_for off header_access Allow allow all header_access Authorization allow all header_access WWW-Authenticate allow all header_access Proxy-Authorization allow all header_access Proxy-Authenticate allow all header_access Cache-Control allow all header_access Content-Encoding allow all header_access Content-Length allow all header_access Content-Type allow all header_access Date allow all header_access Expires allow all header_access Host allow all header_access If-Modified-Since allow all header_access Last-Modified allow all header_access Location allow all header_access Pragma allow all header_access Accept allow all header_access Accept-Charset allow all header_access Accept-Encoding allow all header_access Accept-Language allow all header_access Content-Language allow all header_access Mime-Version allow all header_access Retry-After allow all header_access Title allow all header_access Connection allow all header_access Proxy-Connection allow all header_access User-Agent allow all header_access Cookie allow all header_access All deny all
touch /etc/squid/passwd chown root.squid /etc/squid/passwd chmod 640 /etc/squid/passwd
# htpasswd -c /etc/squid/passwd your_user
chkconfig --level 2345 squid on /etc/init.d/squid restart
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING -p TCP --dport 80 -j REDIRECT --to-port 3128
netstat -pln | grep squid
outputnya
tcp 0 0 0.0.0.0:3128 0.0.0.0:* LISTEN 2594/(squid)
Tutorial diatas tested dan running pada Debian 6 32bit, selamat mencoba artikel Cara Install Squid untuk Transparent Anonymous Private Proxy dari GemarOprek 🙂