How to provide access for users using Squid Proxy Server in FreeBSD
To provide access for users using Squid Proxy Server in FreeBSD
Squid is an internet content filtering application which supports caching of many different kinds of Web objects, including those accessed through HTTP and FTP. In this tutorial, you' ll learn about the method to provide access for users using Squid.
To know about the installation of Squid, check out the following links.
Squid installation in FreeBSD https://www.linuxhelp.com/how-to-install-squid-proxy-server-on-freebsd/
Squid installation in CentOS https://www.linuxhelp.com/how-to-install-and-configure-squid-part-1
To provide access for users
Before starting the procedure to provide access, check your system for the presence of squid. Use the following command for the same command.
root@linuxhelp1:~ # service squid status
squid is running as pid 1426.
Once you' ve checked, move Squid configuration directory by running the following command.
root@linuxhelp1:~ # cd /usr/local/etc/squid/
root@linuxhelp1:/usr/local/etc/squid # ls -l
total 380
-rw-r--r-- 1 root wheel 692 Jan 12 19:09 cachemgr.conf
-rw-r--r-- 1 root wheel 692 Jan 12 19:09 cachemgr.conf.sample
-rw-r--r-- 1 root wheel 1817 Jan 12 19:09 errorpage.css
-rw-r--r-- 1 root wheel 1817 Jan 12 19:09 errorpage.css.sample
drwxr-xr-x 48 root wheel 4608 Feb 8 17:25 errors
drwxr-xr-x 3 root wheel 512 Feb 8 17:25 icons
-rw-r--r-- 1 root wheel 30844 Jan 12 19:09 mib.txt
-rw-r--r-- 1 root wheel 12077 Jan 12 19:09 mime.conf
-rw-r--r-- 1 root wheel 12077 Jan 12 19:09 mime.conf.sample
-rw-r--r-- 1 root wheel 2460 Feb 10 11:47 squid.conf
-rw-r--r-- 1 root wheel 291312 Jan 12 19:09 squid.conf.documented
-rw-r--r-- 1 root wheel 2315 Jan 12 19:09 squid.conf.sample
Open the squid.conf file to add the client ip and block file path.
root@linuxhelp1:/usr/local/etc/squid # nano squid.conf
#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#
acl test src 192.168.7.216
acl block dstdomain " /root/Desktop/domainblock.txt"
http_access deny test block
http_access allow test
Once it is done, check the squid service status
root@linuxhelp1:/usr/local/etc/squid # service squid status
squid is running as pid 1426.
Now, reload the Squid service by running the following command.
root@linuxhelp1:/usr/local/etc/squid # service squid reload
Performing sanity check on squid configuration.
Configuration for squid passes.
Next configure the proxy settings on your client machine, enter the proxy server ip with port number.
default port number 3128
Once it is done, open the browser and enable use system proxy on your browser proxy setting.
Now check you internet connection,
And now check blocked sites.
To make sure Squid works well, check other domains too.
Comments ( 0 )
No comments available