Step1. Squid3 install.
apt-get install squid3
Step2. Rename the original squid.conf for backup:
mv /etc/squid3/squid.conf /etc/squid3/squid.conf.back
Step3. Create a new custom file squid.conf:
nano /etc/squid3/squid.conf
and paste the following content:
http_port 3128 transparent
acl localhost src 127.0.0.0/8
http_access allow localhost
cache_dir ufs /var/spool/squid3 7000 16 256auth_param basic program /usr/lib/squid3/squid_db_auth –user userproxy –password parolaproxi –plaintext –persist
auth_param basic children 5
auth_param basic realm This is a welcome message that will me displayed to each user.
auth_param basic credentialsttl 1 minute
auth_param basic casesensitive offacl db-auth proxy_auth REQUIRED
http_access allow db-auth
http_access allow localhost
http_access deny all
Step4. We will go now to the MySQL and create the database:
mysql -p
Enter the password to log into mysql server. and then create the squid database:
create database squid;
grant select on squid.* to squid_user@localhost identified by ‘squid_password’;
Create tables in squid database:
use squid;
CREATE TABLE `passwd` (
`user` varchar(32) NOT NULL default ”,
`password` varchar(35) NOT NULL default ”,
`enabled` tinyint(1) NOT NULL default ’1′,
`fullname` varchar(60) default NULL,
`comment` varchar(60) default NULL,
PRIMARY KEY (`user`)
);
Step5. Now create a test user:
insert into passwd values(‘testuser’,'test’,1,’Test User’,'for testing ‘);
Alternatively you can add users with phpMyAdmin.
NOTE: testuser is the username that appears in the login window, test is the password, 1 tell us thet the account is active, full name is Test User and the comment is testing .
Enjoy!

Recent Comments