install minimal deb 7
apt-get -y update && apt-get -y upgrade
apt-get -y install nano squid3 apache2-utils
cp /etc/squid3/squid.conf /etc/squid3/squid.conf.bak
nano /etc/squid3/squid.conf
#replace with
http_port 3128
auth_param basic program /usr/lib/squid3/ncsa_auth /etc/squid3/.passwd
auth_param basic children 1
auth_param basic credentialsttl 1 minute
auth_param basic casesensitive off
acl auth proxy_auth REQUIRED
acl localhost src 127.0.0.0/8
http_access allow auth
http_access allow localhost
http_access deny all
cache deny all
forwarded_for delete
request_header_access Via deny all
----
htpasswd -c /etc/squid3/.passwd YOUR_USER_NAME
echo -e "YOUR_USERNAME:`perl -le 'print crypt("YOUR_PASSWORD","salt")'`" > /etc/squid3/.passwd
/etc/init.d/squid3 restart
No comments:
Post a Comment