Monday 18 July 2016

Squid3 configuration in Linux


Step 1:

sudo apt-get update && upgrade

Step 2:

sudo apt-get install squid3

Step 3:

sudo cp “/etc/squid3/squid.conf” “/etc/squid3/squid.conf.original”
(without quotes)

Step 4:

sudo gedit /etc/squid3/squid.conf
(Edit the squid configuration file)

i) acl Connect method Connect (Line no: 919)
acl allow_network src 192.168.1.0/24
acl blocklist url_regex “/etc/squid3/blocklist”


 ii) Implement access list (Line no: 1058)

http_access allow localhost
http_access deny blocklist

http_access allow all (final process deny or allow)



iii) Change the port address (Line no: 1460)

http_port 3128



iv) Change the host name to visible (Line no: 4761)

visible_hostname fireproof


Step 5:

Add a new blocklist file in squid directory

sudo gedit /etc/squid3/blocklist
(To add url content in the blocklist)

Step 6:
Restart the squid server

sudo service squid3 restart

Step 7:
change the browser settings in mozilla or chrome

Add the proxy and port address in browser settings and refresh web page.