{"id":1420,"date":"2020-11-10T17:32:30","date_gmt":"2020-11-10T17:32:30","guid":{"rendered":"https:\/\/linuxways.net\/?p=1420"},"modified":"2020-11-19T09:46:48","modified_gmt":"2020-11-19T09:46:48","slug":"how-to-configure-squid-proxy-server-on-ubuntu-20-04-lts","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/ubuntu\/how-to-configure-squid-proxy-server-on-ubuntu-20-04-lts\/","title":{"rendered":"How to configure Squid Proxy Server on Ubuntu 20.04 LTS"},"content":{"rendered":"<p>In our previous post <a href=\"https:\/\/linuxways.net\/de\/ubuntu\/how-to-install-the-latest-squid-proxy-server-on-linux\/\">How to Install Squid Proxy Server on Linux<\/a>, we have provided you with the basic introduction of the Squid server and its installation in the Linux system. In this post, we will follow up to configure the Squid proxy server. We will cover the following topics:<\/p>\n<ol>\n<li>Configuring Squid to listen on a different port<\/li>\n<li>Configuring hostname for the Squid proxy server<\/li>\n<li>Setting Squid cache memory size<\/li>\n<li>Specifying DNS name-servers to use<\/li>\n<li>Denying access to certain websites in Squid proxy server<\/li>\n<li>Configuring Squid Proxy client authentication<\/li>\n<li>Configuring clients to connect through Squid proxy server<\/li>\n<\/ol>\n<p><strong>Note:<\/strong> The commands and procedures discussed in this article have been tested on <strong>Ubuntu 20.04 LTS<\/strong> <strong>(Focal Fossa).<\/strong> The same commands and procedures are also valid for Debian distribution.<\/p>\n<h2>Prerequisites<\/h2>\n<ul>\n<li>Machine with Ubuntu or Debian installed<\/li>\n<li>Sudo user<\/li>\n<\/ul>\n<h2>Configuration of Squid Proxy Server on Linux<\/h2>\n<p>Squid proxy server configuration file is located at <strong>\/etc\/squid\/squid.conf<\/strong>.list. This file contains directives through which the Squid proxy server is configured.<\/p>\n<h3>Configuring Squid to listen on a different port<\/h3>\n<p>By default, the Squid proxy server listens on port 3128 for the traffic coming from client machines. However, you can configure it to listen on some different port other than the default port using <strong>http_port<\/strong> directive.<\/p>\n<p>Edit the squid configuration using the below command:<\/p>\n<pre>$ sudo nano \/etc\/squid\/squid.conf<\/pre>\n<p>Now find the below entry in the configuration file.<\/p>\n<p><strong>Note:<\/strong> You can use <strong>Ctrl+W<\/strong> to search for any line. Press Ctrl+W, type keywords, and hit Enter.<\/p>\n<pre>http_port 3128<\/pre>\n<p>Now replace <strong>3128<\/strong> with the port number you want the Squid proxy server to listen to, let\u2019s say <strong>3155<\/strong>:<\/p>\n<pre>http_port 3155<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1421\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-229.png\" alt=\"Configure squid proxy server\" width=\"809\" height=\"334\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-229.png 809w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-229-300x124.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-229-768x317.png 768w\" sizes=\"auto, (max-width: 809px) 100vw, 809px\" \/><\/p>\n<p>Now, restart the squid proxy server service for the changes to take effect:<\/p>\n<pre>$ sudo service squid restart<\/pre>\n<h3>Configuring hostname for the Squid proxy server<\/h3>\n<p>You can configure the hostname for the Squid proxy server if it can\u2019t determine the hostname of the machine on its own. To configure the hostname, you can use the <strong>visible_hostname<\/strong> directive. This name is used by Squid in error messages, internal URLs, FTP directory listings, etc.<\/p>\n<p>Edit the squid configuration using the below command:<\/p>\n<pre>$ sudo nano \/etc\/squid\/squid.conf<\/pre>\n<p>Now add the following entry in the configuration file replacing <strong>&lt;host_name&gt;<\/strong> with any name you want to set as a hostname for the Squid proxy server. It is not necessary to use the actual hostname of your system.<\/p>\n<pre>visible_hostname &lt;host_name&gt;<\/pre>\n<p>For instance, to set \u201c<strong>linuxways<\/strong>&#8221; as the hostname of the Squid proxy server, the entry would be:<\/p>\n<pre>visible_hostname linuxways <br \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1422\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-230.png\" alt=\"Configure squid proxy server\" width=\"783\" height=\"364\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-230.png 783w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-230-300x139.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-230-768x357.png 768w\" sizes=\"auto, (max-width: 783px) 100vw, 783px\" \/><\/pre>\n<p>Once you are done with the configurations, save and exit the configuration file.<\/p>\n<p>Now, restart the Squid proxy service for the configuration changes to take effect.<\/p>\n<pre>$ sudo service squid restart<\/pre>\n<p>In case the Squid client receive any error page, he will see the hostname listed at the bottom of the webpage.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1423\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-231.png\" alt=\"Configure squid proxy server\" width=\"886\" height=\"496\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-231.png 886w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-231-300x168.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-231-768x430.png 768w\" sizes=\"auto, (max-width: 886px) 100vw, 886px\" \/><\/p>\n<h3>Setting Squid cache memory size<\/h3>\n<p>Squid caches the frequently visited content in memory. The default size of Squid cache memory is 256 MB. To change the size of the Squid cache memory, <strong>cache_mem<\/strong> directive is used.<\/p>\n<p>Edit the configuration file using the below command:<\/p>\n<pre>$ sudo nano \/etc\/squid\/squid.conf<\/pre>\n<p>Then search for the following entry in the configuration file and replace 256 by the amount to set for the cache memory size.<\/p>\n<pre>cache_mem 256 MB<\/pre>\n<p>For instance, to set the cache size to 512 MB, the entry would be changed to:<\/p>\n<pre>cache_mem 512 MB<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"806\" height=\"362\" class=\"wp-image-1424\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-232.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-232.png 806w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-232-300x135.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-232-768x345.png 768w\" sizes=\"auto, (max-width: 806px) 100vw, 806px\" \/><\/p>\n<p>Once you are done with the configurations, save and exit the configuration file.<\/p>\n<p>Now, restart the squid service to apply the changes:<\/p>\n<pre>$ sudo service squid restart<\/pre>\n<h3>Specifying DNS name-servers to use<\/h3>\n<p>By default, Squid uses <strong>\/etc\/resolv.conf<\/strong> to resolve domain names. If you want the Squid to use a different name server, you can do so using the <strong>dns_nameservers<\/strong> directive. Edit the squid configuration using the below command:<\/p>\n<pre>$ sudo nano \/etc\/squid\/squid.conf<\/pre>\n<p>Now add the below entry in the configuration file replacing:<\/p>\n<pre>dns_nameservers &lt;IP address of DNS server&gt;<\/pre>\n<p>For instance, to set<strong> 8.8.4.4 <\/strong>as name servers, the entry would be:<\/p>\n<pre>dns_nameservers 8.8.8.8 8.8.4.4<\/pre>\n<h3><img loading=\"lazy\" decoding=\"async\" width=\"792\" height=\"329\" class=\"wp-image-1425\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-233.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-233.png 792w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-233-300x125.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-233-768x319.png 768w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><\/h3>\n<p>Once you are done with the configurations, save and exit the file.<\/p>\n<p>Now, restart the squid service to apply the changes:<\/p>\n<pre>$ sudo service squid restart<\/pre>\n<h3>Controlling access to the proxy server<\/h3>\n<h1>How Squid ACL works<\/h1>\n<p>For access control, ACLs are used in combination with access control directive. ACL alone is of no use, they only help to identify user requests based on various rules. In order to allow or deny access, they are combined with the <strong>http_access<\/strong> directive.<\/p>\n<p>To define ACL, the syntax is:<\/p>\n<pre>acl NAME TYPE value<\/pre>\n<p><strong>Example: <\/strong>Allow LAN traffic through Squid proxy server<\/p>\n<p>To match traffic coming from LAN <strong>192.168.5.0\/24<\/strong>, we will need to create an ACL rule in the Squid configuration file:<\/p>\n<pre>acl myacl src 192.168.5.0\/24<\/pre>\n<p>Once the ACL is defined, you can use the <strong>http_access<\/strong> directive to allow\/deny access. Here is the syntax for the <strong>http_access<\/strong> directive:<\/p>\n<pre>http_access allow|deny NAME<\/pre>\n<p>Where NAME identifies the traffic which you want to allow\/deny access.<\/p>\n<p>To allow the traffic identified in the ACL, you will need to add the following <strong>http_access<\/strong> directive in the Squid configuration file:<\/p>\n<pre>http_access allow myacl<\/pre>\n<h3>Configuring proxy Sources to Access the internet<\/h3>\n<p>First, we will configure the sources which we want to allow access to the internet through the proxy server. For instance, you might want to allow access to the proxy server only from the internal network.<\/p>\n<p>1. To configure the allowed sources, edit the squid configuration file:<\/p>\n<pre>$ sudo nano \/etc\/squid\/squid.conf<\/pre>\n<p>2. Now, search for the entry <strong>acl localnet src<\/strong>.<\/p>\n<p><strong>Note:<\/strong> To search for an entry in the Nano editor, Press <strong>Ctrl+w<\/strong>, and type the expression you want to search. In the case of the above example, press <strong>Ctr+w<\/strong> and type <strong>acl localnet src<\/strong> as shown in the following screenshot.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"544\" height=\"223\" class=\"wp-image-1426\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-234.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-234.png 544w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-234-300x123.png 300w\" sizes=\"auto, (max-width: 544px) 100vw, 544px\" \/><\/p>\n<p>3. Here, you will see the number of entries for different IP address ranges. Here, add an entry for your network as follows:<\/p>\n<pre>acl localnet src subnet_ID\/subnet_mask<\/pre>\n<p>For instance, your local network runs on the <strong>192.168.72.0\/24<\/strong> subnet. In this case, the entry would be:<\/p>\n<pre>acl localnet src 192.168.72.0\/255.255.255.0<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"897\" height=\"272\" class=\"wp-image-1427\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-235.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-235.png 897w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-235-300x91.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-235-768x233.png 768w\" sizes=\"auto, (max-width: 897px) 100vw, 897px\" \/><\/p>\n<p>4. Now using the <strong>http_access<\/strong> directive, allow the sources identified by the acl named <strong>localnet<\/strong> defined above. The http_access directive is already defined in the configured, you only need to find and uncomment it.<\/p>\n<p>Search for the entry <strong>#http_access allow localnet<\/strong> and then uncomment it by removing the <strong>#<\/strong> character.<\/p>\n<pre>http_access allow localnet<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"783\" height=\"337\" class=\"wp-image-1428\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-236.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-236.png 783w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-236-300x129.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-236-768x331.png 768w\" sizes=\"auto, (max-width: 783px) 100vw, 783px\" \/><\/p>\n<p>Now save and exit the squid configuration file.<\/p>\n<p>3. Now, restart the squid service using the below command:<\/p>\n<pre>$ sudo service squid restart<\/pre>\n<h2>Denying access to certain websites in Squid proxy server<\/h2>\n<p>To deny access to some websites in the Squid proxy server, create a file and list all the websites that you want to deny access to.<\/p>\n<pre>$ sudo nano \/etc\/squid\/deniedsites.acl<\/pre>\n<p>Now list the sites you want to deny access to and then save and exit the file.<\/p>\n<p>\u2026<\/p>\n<p>.msn.com<\/p>\n<p>.yahoo.com<\/p>\n<p>.bbc.com<\/p>\n<p>&#8230;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"634\" height=\"225\" class=\"wp-image-1429\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-237.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-237.png 634w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-237-300x106.png 300w\" sizes=\"auto, (max-width: 634px) 100vw, 634px\" \/><\/p>\n<p>Then edit the squid configuration file using the below command:<\/p>\n<pre>$ sudo nano \/etc\/squid\/squid.conf<\/pre>\n<p>Now create an ACL rule for the denied websites and mention the file containing the list of denied websites.<\/p>\n<pre>acl denied_sites dstdomain \u201c\/etc\/squid\/deniedsites.acl\u201d<\/pre>\n<p>The ACL rule <strong>denied_sites<\/strong> will match all requests destined for the websites listed in the \u201c<strong>\/etc\/squid\/deniedsites.acl<\/strong>\u201d file.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"885\" height=\"344\" class=\"wp-image-1430\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-238.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-238.png 885w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-238-300x117.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-238-768x299.png 768w\" sizes=\"auto, (max-width: 885px) 100vw, 885px\" \/><\/p>\n<p>Now you will need to add the <strong>http_access<\/strong> directive to deny the websites identified by the above ACL rule named <strong>denied_sites<\/strong>. Add the below line in the Squid configuration file:<\/p>\n<pre>http_access deny denied_sites<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"661\" height=\"338\" class=\"wp-image-1431\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-239.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-239.png 661w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-239-300x153.png 300w\" sizes=\"auto, (max-width: 661px) 100vw, 661px\" \/><\/p>\n<p>Once you are done with the configurations, save and exit the file.<\/p>\n<p>Now, restart the squid service using the below command:<\/p>\n<pre>$ sudo service squid restart<\/pre>\n<h3>Configuring Squid Proxy client Authentication<\/h3>\n<p>With the Squid proxy server, we can add basic user-based authentication for some security. To do so, we will use the <strong>htpasswd<\/strong> program that comes with the Apache HTTP server. Then we will create a file that will contain usernames and passwords for authentication.<\/p>\n<p>1. First, we will have to install Apache2-utils. Use the following command to do so:<\/p>\n<pre>$ apt install -y apache2-utils<\/pre>\n<p>2. Now create passwd file in \/<strong>etc\/squid<\/strong> directory to store passwords:<\/p>\n<pre>$ touch \/etc\/squid\/passwd<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"586\" height=\"62\" class=\"wp-image-1432\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-240.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-240.png 586w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-240-300x32.png 300w\" sizes=\"auto, (max-width: 586px) 100vw, 586px\" \/><\/p>\n<p>3. Use the below command to set the ownership to user \u201cproxy\u201d:<\/p>\n<pre>$ chown proxy: \/etc\/squid\/passwd<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"615\" height=\"64\" class=\"wp-image-1433\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-241.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-241.png 615w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-241-300x31.png 300w\" sizes=\"auto, (max-width: 615px) 100vw, 615px\" \/><\/p>\n<p>4. Now add a user in the <strong>\/etc\/squid\/passwd<\/strong> file:<\/p>\n<pre>htpasswd \/etc\/squid\/passwd tin<\/pre>\n<p>Type a password and then confirm by re-entering it. Now the user and its encrypted password will be saved to the <strong>\/etc\/squid\/passwd<\/strong> file.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"616\" height=\"111\" class=\"wp-image-1434\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-242.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-242.png 616w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-242-300x54.png 300w\" sizes=\"auto, (max-width: 616px) 100vw, 616px\" \/><\/p>\n<p>5. Edit the <strong>\/etc\/squid\/squid.conf<\/strong> file using the below command:<\/p>\n<pre>$ sudo nano <strong>\/etc\/squid\/squid.conf<\/strong><\/pre>\n<p><strong>Now add below lines in the file:<\/strong><\/p>\n<pre>auth_param basic program \/usr\/lib64\/squid\/basic_ncsa_auth \/etc\/squid\/passwdauth_param basic children 5<br \/><br \/>auth_param basic realm Squid Basic Authentication<br \/><br \/>auth_param basic credentialsttl 2 hours<br \/><br \/>acl auth_users proxy_auth REQUIRED<br \/><br \/>http_access allow auth_users<br \/><br \/>Once you are done with the configurations, save and exit the configuration file.<\/pre>\n<h2><img loading=\"lazy\" decoding=\"async\" width=\"876\" height=\"501\" class=\"wp-image-1435\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-243.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-243.png 876w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-243-300x172.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-243-768x439.png 768w\" sizes=\"auto, (max-width: 876px) 100vw, 876px\" \/><\/h2>\n<h2>Configuring clients to connect through Squid proxy server<\/h2>\n<p>In this section, we will configure clients to connect through the Squid proxy server.<\/p>\n<p>1. Open a web browser in your system. Here we will use the<strong> Firefox<\/strong> browser.<\/p>\n<p>2. Go to upper right corner of your browser and click three horizontal bar icon. Then click <strong>Options<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1187\" height=\"700\" class=\"wp-image-1436\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-244.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-244.png 1187w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-244-300x177.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-244-1024x604.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-244-768x453.png 768w\" sizes=\"auto, (max-width: 1187px) 100vw, 1187px\" \/><\/p>\n<p>3. Then in the search bar, type <em>network<\/em>. When the search result appears, click <strong>Settings<\/strong> as can be seen in the below screenshot.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1059\" height=\"419\" class=\"wp-image-1437\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-245.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-245.png 1059w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-245-300x119.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-245-1024x405.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-245-768x304.png 768w\" sizes=\"auto, (max-width: 1059px) 100vw, 1059px\" \/><\/p>\n<p>4. Select the <strong>Manual proxy configuration<\/strong> option button. Then type the IP address of the Squid proxy server in the <strong>HTTP Proxy<\/strong> field and port number in the <strong>Port<\/strong> field. Also, check the <strong>Also use this proxy for FTP and HTTPS<\/strong> checkbox. Then click <strong>OK<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1438\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-246.png\" alt=\"Configure Squid Proxy Server\" width=\"977\" height=\"691\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-246.png 977w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-246-300x212.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-246-768x543.png 768w\" sizes=\"auto, (max-width: 977px) 100vw, 977px\" \/><\/p>\n<p>Now in order to check if the Squid server is working, try accessing any website in your browser. You will see an authentication dialog. Enter the squid username and password that you have created before and click <strong>OK<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1439\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-247.png\" alt=\"Configure Squid Proxy Server\" width=\"1064\" height=\"541\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-247.png 1064w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-247-300x153.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-247-1024x521.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-247-768x390.png 768w\" sizes=\"auto, (max-width: 1064px) 100vw, 1064px\" \/><\/p>\n<p>Now you should be able to access the requested website.<\/p>\n<p>Now try accessing another website that you have blocked using the access list. The browser will show the following page saying &#8216;The proxy server is refusing connections\u201d.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1440\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-248.png\" alt=\"Configure Squid Proxy Server\" width=\"987\" height=\"491\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-248.png 987w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-248-300x149.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/11\/word-image-248-768x382.png 768w\" sizes=\"auto, (max-width: 987px) 100vw, 987px\" \/><\/p>\n<p>That is all there is to it! In this article, you have learned how to configure Squid proxy server on a Linux system. We have just discussed the basic configurations. There is a lot more you can do with Squid proxy server. Visit <a href=\"http:\/\/www.squid-cache.org\/Doc\/\">official documentation<\/a> for more information.<\/p>\n\n\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>In our previous post How to Install Squid Proxy Server on Linux, we have provided you with the basic introduction of the Squid server and its installation in&hellip;<\/p>","protected":false},"author":4,"featured_media":1441,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[68],"class_list":["post-1420","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ubuntu","tag-squid-proxy-server"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/1420","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=1420"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/1420\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/1441"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=1420"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=1420"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=1420"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}