{"id":1714,"date":"2020-06-16T16:11:06","date_gmt":"2020-06-16T13:11:06","guid":{"rendered":"https:\/\/www.virtono.com\/community\/?p=1714"},"modified":"2020-06-16T16:11:11","modified_gmt":"2020-06-16T13:11:11","slug":"install-and-configure-proxy-server-on-centos-7-8-server-squid-proxy","status":"publish","type":"post","link":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/install-and-configure-proxy-server-on-centos-7-8-server-squid-proxy\/","title":{"rendered":"Install and configure Proxy Server on Centos 7\/8 Server: Squid Proxy"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">If you would like to read what are proxy servers and how they can benefit you, please refer: <a rel=\"noreferrer noopener\" href=\"https:\/\/www.virtono.com\/community\/?p=1708\" target=\"_blank\">Click<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you would like to buy a VPS to make your own Proxy Server along with this tutorial check out: <a rel=\"noreferrer noopener\" href=\"https:\/\/www.virtono.com\/\" target=\"_blank\">Click<\/a><\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_73 counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/install-and-configure-proxy-server-on-centos-7-8-server-squid-proxy\/#Squid_Proxy\" title=\"Squid Proxy\">Squid Proxy<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/install-and-configure-proxy-server-on-centos-7-8-server-squid-proxy\/#Install_Proxy_Server_Squid_Proxy\" title=\"Install Proxy Server: Squid Proxy\">Install Proxy Server: Squid Proxy<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/install-and-configure-proxy-server-on-centos-7-8-server-squid-proxy\/#Step_1_Update_the_server\" title=\"Step 1:&nbsp;Update the server\">Step 1:&nbsp;Update the server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/install-and-configure-proxy-server-on-centos-7-8-server-squid-proxy\/#Step_2_Install_squid\" title=\"Step 2:&nbsp;Install squid\">Step 2:&nbsp;Install squid<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/install-and-configure-proxy-server-on-centos-7-8-server-squid-proxy\/#Step_3_Start_and_enable_squid_server\" title=\"Step 3:&nbsp;Start and enable squid server.\">Step 3:&nbsp;Start and enable squid server.<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/install-and-configure-proxy-server-on-centos-7-8-server-squid-proxy\/#Step_4_Check_the_status_of_squid_server\" title=\"Step 4:&nbsp;Check the status of squid server.\">Step 4:&nbsp;Check the status of squid server.<\/a><\/li><\/ul><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/install-and-configure-proxy-server-on-centos-7-8-server-squid-proxy\/#Configure_Proxy_Server_Squid_Proxy\" title=\"Configure Proxy Server: Squid Proxy\">Configure Proxy Server: Squid Proxy<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/install-and-configure-proxy-server-on-centos-7-8-server-squid-proxy\/#Configure_your_Network_To_Route_through_your_Proxy_to_the_access_Internet\" title=\"Configure your Network To Route through your Proxy to the access Internet\">Configure your Network To Route through your Proxy to the access Internet<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/install-and-configure-proxy-server-on-centos-7-8-server-squid-proxy\/#Test_proxy_Server_Connectivity\" title=\"Test proxy Server Connectivity\">Test proxy Server Connectivity<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/install-and-configure-proxy-server-on-centos-7-8-server-squid-proxy\/#Configure_Proxy_Authentication\" title=\"Configure Proxy Authentication\">Configure Proxy Authentication<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/install-and-configure-proxy-server-on-centos-7-8-server-squid-proxy\/#Blocking_Websites\" title=\"Blocking Websites\">Blocking Websites<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/install-and-configure-proxy-server-on-centos-7-8-server-squid-proxy\/#Uninstall_Squid_Proxy_Server\" title=\"Uninstall Squid Proxy Server\">Uninstall Squid Proxy Server<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Squid_Proxy\"><\/span>Squid Proxy<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Little introduction about the proxy of the article:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u201cSquid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-requested web pages. Squid has extensive access controls and makes a great server accelerator. It runs on most available operating systems, including Windows, and is licensed under the GNU GPL.\u201d<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">[<a href=\"http:\/\/www.squid-cache.org\/\" target=\"_blank\" rel=\"noopener\">http:\/\/www.squid-cache.org\/<\/a>]<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It is very mature, quick, and flexible. That is why it is one of the most widespread web proxies. It is predominantly used in large environments, such as universities and large corporates.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But it could be just as useful for small businesses and even to an individual user.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Install_Proxy_Server_Squid_Proxy\"><\/span>Install Proxy Server: Squid Proxy<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_1_Update_the_server\"><\/span>Step 1:&nbsp;Update the server<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<pre class=\"wp-block-verse\"><code>yum -y update<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_2_Install_squid\"><\/span><strong>Step 2:<\/strong>&nbsp;Install squid<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<pre class=\"wp-block-verse\"><code>yum -y install squid<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_3_Start_and_enable_squid_server\"><\/span><strong>Step 3:<\/strong>&nbsp;Start and enable squid server.<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>systemctl start squid\nsystemctl enable squid<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_4_Check_the_status_of_squid_server\"><\/span><strong>Step 4:<\/strong>&nbsp;Check the status of squid server.<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<pre class=\"wp-block-verse\"><code>systemctl status squid<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Configure_Proxy_Server_Squid_Proxy\"><\/span>Configure Proxy Server: Squid Proxy<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The configurations for your Squid server are stored in the <code>\/etc\/squid\/squid.conf<\/code> file<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Configure_your_Network_To_Route_through_your_Proxy_to_the_access_Internet\"><\/span>Configure your Network To Route through your Proxy to the access Internet<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You have to add the IP or the IP ranges which will be making contact with your Proxy Server and then the Proxy server will act as a gateway for only those IP(s)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You have to add the IP or the IP ranges which will be making contact with your Proxy Server and then the Proxy server will act as a gateway for only those IP(s)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can add a source IP range with an ACL using the following format.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>acl localnet src &lt;IP&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Edit the configuration file <code>\/etc\/squid\/squid.conf. Add the source IP(s) as shown below.<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"665\" height=\"160\" data-attachment-id=\"1715\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/install-and-configure-proxy-server-on-centos-7-8-server-squid-proxy\/attachment\/1-33\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/1.png?fit=665%2C160&amp;ssl=1\" data-orig-size=\"665,160\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/1.png?fit=665%2C160&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/1.png?resize=665%2C160&#038;ssl=1\" alt=\"\" class=\"wp-image-1715\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/1.png?w=665&amp;ssl=1 665w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/1.png?resize=300%2C72&amp;ssl=1 300w\" sizes=\"auto, (max-width: 665px) 100vw, 665px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Restart the proxy server after making the ACL changes.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>systemctl restart squid<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Test_proxy_Server_Connectivity\"><\/span>Test proxy Server Connectivity<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Test if the proxy server is working using a simple curl request. Use the following curl format. By default, squid proxy runs on 3128 port.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>curl -x http:\/\/&lt;squid-proxy-server-IP&gt;:3128&nbsp; -L <a href=\"http:\/\/google.com\" target=\"_blank\" rel=\"noopener\">http:\/\/virtono.com<\/a><\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"656\" height=\"205\" data-attachment-id=\"1716\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/install-and-configure-proxy-server-on-centos-7-8-server-squid-proxy\/attachment\/2-31\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/2.png?fit=656%2C205&amp;ssl=1\" data-orig-size=\"656,205\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"2\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/2.png?fit=656%2C205&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/2.png?resize=656%2C205&#038;ssl=1\" alt=\"\" class=\"wp-image-1716\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/2.png?w=656&amp;ssl=1 656w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/2.png?resize=300%2C94&amp;ssl=1 300w\" sizes=\"auto, (max-width: 656px) 100vw, 656px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Configure_Proxy_Authentication\"><\/span>Configure Proxy Authentication<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">As an addon to ACL, you should also add a basic authentication to your proxy server for extra security. The steps to do this are as follows:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 1:<\/strong>&nbsp;On your Squid server install httpd-tools<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>yum -y install httpd-tools<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 2:<\/strong>&nbsp;Create an empty passwd&nbsp;file<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>touch \/etc\/squid\/passwd <\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 3 : Change the owner of the file<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>chown squid \/etc\/squid\/passwd<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 3:<\/strong>&nbsp;Add squid&nbsp;to the password file using htpasswd utility.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You will be asked for a password, use a strong one, and don\u2019t forget to store it. This username and password will be used for all connections through this proxy.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>htpasswd \/etc\/squid\/passwd squid<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"465\" height=\"88\" data-attachment-id=\"1717\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/install-and-configure-proxy-server-on-centos-7-8-server-squid-proxy\/attachment\/3-28\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/3.png?fit=465%2C88&amp;ssl=1\" data-orig-size=\"465,88\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"3\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/3.png?fit=465%2C88&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/3.png?resize=465%2C88&#038;ssl=1\" alt=\"\" class=\"wp-image-1717\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/3.png?w=465&amp;ssl=1 465w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/3.png?resize=300%2C57&amp;ssl=1 300w\" sizes=\"auto, (max-width: 465px) 100vw, 465px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 4:<\/strong>&nbsp;Open squid config file.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>vi \/etc\/squid\/squid.conf<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Add the following to the config file and save it.<br><\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>auth_param basic program \/usr\/lib64\/squid\/basic_ncsa_auth \/etc\/squid\/passwd<\/p><p>auth_param basic children 5<\/p><p>auth_param basic credentialsttl 2 hours<\/p><p>auth_param basic utf8 on<\/p><p>auth_param basic realm Please enter your credentials for the Proxy Server!<\/p><p>auth_param basic casesensitive on<\/p><p>acl auth_access proxy_auth REQUIRED<\/p><p>http_access allow auth_access<\/p><\/blockquote>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"642\" height=\"239\" data-attachment-id=\"1719\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/install-and-configure-proxy-server-on-centos-7-8-server-squid-proxy\/attachment\/4-26\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/4.png?fit=642%2C239&amp;ssl=1\" data-orig-size=\"642,239\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"4\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/4.png?fit=642%2C239&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/4.png?resize=642%2C239&#038;ssl=1\" alt=\"\" class=\"wp-image-1719\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/4.png?w=642&amp;ssl=1 642w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/4.png?resize=300%2C112&amp;ssl=1 300w\" sizes=\"auto, (max-width: 642px) 100vw, 642px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 5:<\/strong>&nbsp;Now, restart squid server for the configuration changes to take place.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo systemctl restart squid<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 6:<\/strong>&nbsp;Now if you test the proxy connection using curl, you will get the \u201cauthentication required message\u201d as shown below.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"255\" data-attachment-id=\"1720\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/install-and-configure-proxy-server-on-centos-7-8-server-squid-proxy\/attachment\/5-17\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/5.png?fit=765%2C260&amp;ssl=1\" data-orig-size=\"765,260\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"5\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/5.png?fit=750%2C255&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/5.png?resize=750%2C255&#038;ssl=1\" alt=\"\" class=\"wp-image-1720\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/5.png?w=765&amp;ssl=1 765w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/5.png?resize=300%2C102&amp;ssl=1 300w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now, test the connectivity with proxy user and password we configured in step 3. An example syntax is shown below.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">curl -x http:\/\/35.196.101.43:3128&nbsp; --proxy-user squid:thisIsPassword&nbsp; -I <a href=\"http:\/\/google.com\" target=\"_blank\" rel=\"noreferrer noopener\">http:\/\/virtono.com<\/a><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"183\" data-attachment-id=\"1722\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/install-and-configure-proxy-server-on-centos-7-8-server-squid-proxy\/attachment\/6-17\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/6.png?fit=851%2C208&amp;ssl=1\" data-orig-size=\"851,208\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"6\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/6.png?fit=750%2C183&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/6.png?resize=750%2C183&#038;ssl=1\" alt=\"\" class=\"wp-image-1722\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/6.png?w=851&amp;ssl=1 851w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/6.png?resize=300%2C73&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/6.png?resize=768%2C188&amp;ssl=1 768w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">With username and password, your proxy request should go through.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Blocking_Websites\"><\/span>Blocking Websites<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Another great use of the proxy server is restricting the website access. Follow the steps below for creating a block list.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 1<\/strong>: Open a blocked list file.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>vi \/etc\/squid\/blocked_sites<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Add the websites to be blocked in the file. For example,<\/p>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<div class=\"wp-block-group alignfull\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>facebook.com <br>instagram.com<\/p><\/blockquote>\n<\/div><\/div>\n<\/div><\/div>\n<\/div><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 2<\/strong>: Open the squid config file.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>vi \/etc\/squid\/squid.conf<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Add the following to the ACL list.<\/p>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<pre class=\"wp-block-preformatted\"><code>acl blocked_sites dstdomain \"\/etc\/squid\/blocked_sites\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><code>http_access deny blocked_sites<\/code><\/p>\n<\/div><\/div>\n<\/div><\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"501\" height=\"66\" data-attachment-id=\"1723\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/install-and-configure-proxy-server-on-centos-7-8-server-squid-proxy\/attachment\/7-1\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/7-1.png?fit=501%2C66&amp;ssl=1\" data-orig-size=\"501,66\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"7-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/7-1.png?fit=501%2C66&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/7-1.png?resize=501%2C66&#038;ssl=1\" alt=\"\" class=\"wp-image-1723\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/7-1.png?w=501&amp;ssl=1 501w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/7-1.png?resize=300%2C40&amp;ssl=1 300w\" sizes=\"auto, (max-width: 501px) 100vw, 501px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 3:<\/strong> Restart the squid server.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>systemctl restart squid<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now if you try to access the blocked site through the proxy, you will get a forbidden message.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Uninstall_Squid_Proxy_Server\"><\/span>Uninstall Squid Proxy Server<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In case if you would want to remove squid from your server just use the yum remove command as below.<\/p>\n\n\n\n<pre class=\"wp-block-verse\"><code>yum remove squid<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1364\" height=\"571\" data-attachment-id=\"1726\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/install-and-configure-proxy-server-on-centos-7-8-server-squid-proxy\/attachment\/8-13\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/8.png?fit=1364%2C571&amp;ssl=1\" data-orig-size=\"1364,571\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"8\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/8.png?fit=750%2C314&amp;ssl=1\" src=\"https:\/\/i2.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/8.png?fit=750%2C314&amp;ssl=1\" alt=\"\" class=\"wp-image-1726\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/8.png?w=1364&amp;ssl=1 1364w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/8.png?resize=300%2C126&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/8.png?resize=1024%2C429&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/8.png?resize=768%2C322&amp;ssl=1 768w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You will be prompted once to ask for confirmation.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you would like to read what are proxy servers and how they can benefit you, please refer: Click If you would like to buy a VPS to make your own Proxy Server along with this tutorial check out: Click Squid Proxy Little introduction about the proxy of the article:<\/p>\n","protected":false},"author":4,"featured_media":1743,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[3],"tags":[67,66,63,61,65,64,68],"class_list":["post-1714","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorial-how-to","tag-install-squid","tag-proxy-centos","tag-proxy-server","tag-squid","tag-squid-centos","tag-squid-proxy","tag-uninstall-squid"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/remote-denial-of-service-vulnerability-patched-in-squid-proxy-cache-server-523492-2.png?fit=1600%2C1200&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7ISfL-rE","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":3247,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/install-and-configure-proxy-server-on-ubuntu-using-squid-proxy\/","url_meta":{"origin":1714,"position":0},"title":"Install and Configure Proxy Server on Ubuntu Using Squid Proxy","author":"George B.","date":"April 15, 2023","format":false,"excerpt":"In this tutorial, we will walk you through the process of installing and configuring a proxy server on Ubuntu using Squid Proxy. Are you looking for a way to improve your internet speed and security? Installing a proxy server on your Ubuntu machine using Squid Proxy can help you achieve\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Install-and-Configure-Proxy-Server-on-Ubuntu-Using-Squid-Proxy.png?fit=600%2C330&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Install-and-Configure-Proxy-Server-on-Ubuntu-Using-Squid-Proxy.png?fit=600%2C330&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Install-and-Configure-Proxy-Server-on-Ubuntu-Using-Squid-Proxy.png?fit=600%2C330&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":1708,"url":"https:\/\/www.virtono.com\/community\/knowledgebase\/the-proxy-server-what-why-and-how\/","url_meta":{"origin":1714,"position":1},"title":"The Proxy Server, What, Why and How","author":"Shreyash Sharma","date":"June 16, 2020","format":false,"excerpt":"In the current world where billion-dollar enterprises are doing their best to figure out everything about you. Talking about a simple proxy server that you can easily configure and keep them guessing seems justified. If you just want to jump to configuring a proxy server here is the How. Think\u2026","rel":"","context":"In &quot;Knowledgebase&quot;","block_context":{"text":"Knowledgebase","link":"https:\/\/www.virtono.com\/community\/category\/knowledgebase\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/proxy-4620557_640.jpg?fit=640%2C472&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/proxy-4620557_640.jpg?fit=640%2C472&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/06\/proxy-4620557_640.jpg?fit=640%2C472&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":1311,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/varnish-web-accelerator\/","url_meta":{"origin":1714,"position":2},"title":"Varnish Web accelerator","author":"Shreyash Sharma","date":"January 12, 2018","format":false,"excerpt":"Varnish\u00a0is a web accelerator (reverse proxy), which provides relief for the actual web server (the backend).\u00a0It has been designed from the ground up just for this use, unlike traditional proxies (eg Squid). The project website can be found here:\u00a0http:\/\/www.varnish-cache.org installation Varnish is part of Debian (Wheezy: Version 3.0.2) and Ubuntu\u2026","rel":"","context":"In &quot;Knowledgebase&quot;","block_context":{"text":"Knowledgebase","link":"https:\/\/www.virtono.com\/community\/category\/knowledgebase\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2018\/01\/varnishcache_rgb-gimp2-alpha.png?fit=1200%2C297&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2018\/01\/varnishcache_rgb-gimp2-alpha.png?fit=1200%2C297&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2018\/01\/varnishcache_rgb-gimp2-alpha.png?fit=1200%2C297&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2018\/01\/varnishcache_rgb-gimp2-alpha.png?fit=1200%2C297&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2018\/01\/varnishcache_rgb-gimp2-alpha.png?fit=1200%2C297&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":2922,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-nginx-on-ubuntu-20-04\/","url_meta":{"origin":1714,"position":3},"title":"How To Install Nginx on Ubuntu 20.04","author":"George B.","date":"July 29, 2022","format":false,"excerpt":"What is Nginx? Nginx, abbreviated NGI\u0418X, is a web server that also functions as a reverse proxy, load balancer, mail proxy, and HTTP cache. Igor Sysoev created the software, which was made public in 2004. Nginx is free and open-source software distributed under the terms of the 2-clause BSD license.\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2022\/07\/Nginx-Logo.jpeg?fit=1200%2C578&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2022\/07\/Nginx-Logo.jpeg?fit=1200%2C578&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2022\/07\/Nginx-Logo.jpeg?fit=1200%2C578&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2022\/07\/Nginx-Logo.jpeg?fit=1200%2C578&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2022\/07\/Nginx-Logo.jpeg?fit=1200%2C578&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3300,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/install-varnish-cache-for-apache-on-centos\/","url_meta":{"origin":1714,"position":4},"title":"Install Varnish Cache for Apache on CentOS","author":"George B.","date":"April 23, 2023","format":false,"excerpt":"Varnish Cache is a popular caching solution that can be used to speed up the delivery of content on your web server. It works by caching frequently accessed content in memory so that subsequent requests can be served from the cache instead of being processed by the web server. In\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Install-Varnish-Cache-for-Apache-on-CentOS.png?fit=600%2C330&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Install-Varnish-Cache-for-Apache-on-CentOS.png?fit=600%2C330&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Install-Varnish-Cache-for-Apache-on-CentOS.png?fit=600%2C330&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":1296,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/arm-apache-for-denial-of-service-attacks\/","url_meta":{"origin":1714,"position":5},"title":"Arm Apache for denial-of-service attacks","author":"Daniel Draga","date":"January 7, 2018","format":false,"excerpt":"A little thought experiment: You want to write a web server, so program a socket-based server.\u00a0When a browser connects to it and requests a file, it delivers it, the client terminates the connection, and everyone is satisfied.\u00a0But then suddenly there is a bug report from someone whose web server is\u2026","rel":"","context":"In &quot;Knowledgebase&quot;","block_context":{"text":"Knowledgebase","link":"https:\/\/www.virtono.com\/community\/category\/knowledgebase\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2018\/01\/ddos-attack-ex-100695385-large.jpg?fit=699%2C474&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2018\/01\/ddos-attack-ex-100695385-large.jpg?fit=699%2C474&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2018\/01\/ddos-attack-ex-100695385-large.jpg?fit=699%2C474&ssl=1&resize=525%2C300 1.5x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/1714","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/comments?post=1714"}],"version-history":[{"count":18,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/1714\/revisions"}],"predecessor-version":[{"id":2848,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/1714\/revisions\/2848"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/media\/1743"}],"wp:attachment":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/media?parent=1714"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/categories?post=1714"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/tags?post=1714"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}