How to install and configure Squid Proxy Server on OpenSUSE leap 42.1
To install and Squid Proxy Server on OpenSUSE leap 42.1
Squid is a caching proxy server that caches frequently visited websites and reduces the Internet bandwidth. It works on almost all operating systems which also includes Windows and is licensed under the GNU GPL. Squid is capable of caching various kinds of Web objects, including those accessed through HTTP and FTP. Another usage of Squid is distributing a single internet connection to multiple users. In this tutorial, you will learn about the method to install and configure Squid Proxy Server.
Installing Squid
You can trigger the installation of Squid in your OpenSUSE machine by running the following command.
linuxhelp1:~ # zypper in squid
Loading repository data...
Warning: Repository ' openSUSE-Leap-42.1-Update' appears to be outdated. Consider using a different mirror or server.
Reading installed packages...
Resolving package dependencies...
The following NEW package is going to be installed:
squid
1 new package to install.
Overall download size: 2.4 MiB. Already cached: 0 B. After the operation
.
.
.
etrieving: squid-3.3.14-12.1.x86_64.rpm ...................[done (319.7 KiB/s)]
Checking for file conflicts: .............................................[done]
(1/1) Installing: squid-3.3.14-12.1 ......................................[done]
linuxhelp1:~ # systemctl start squid
linuxhelp1:~ # systemctl enable squid
The installation is now complete, but you still need to configure it and we are going to see about it in the next step.
To configure squid
In order to configure Squid, you need to open the squid.conf file located in /etc/squid/. After opening it create acl rule inside the configuration. Use the following command for the same purpose.
linuxhelp1:~ # vim /etc/squid/squid.conf
acl test src 192.168.7.216
acl block dstdomain " /etc/squid/block.text"
http_access deny test block
http_access allow test
Before that create “ block.text” file in /etc/squid/ file path
linuxhelp1:~ # vim /etc/squid/block.text
Now restart your squid service.
linuxhelp1:~ # systemctl restart squid
Now switch to your browser and type the domains which are listed.
Those domains are blocked.
You can use this configuration method for the purpose of caching unwanted web content.
Comments ( 0 )
No comments available