Configuring Squid Proxy Server with Restricted Access and Setting Up Clients to Use Proxy – Part 5

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Use our Linode referral link if you plan to buy VPS (it starts at only $10/month).
  4. Support us via PayPal donate - Make a Donation
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Gabriel Cánepa

Gabriel Cánepa is a GNU/Linux sysadmin and web developer from Villa Mercedes, San Luis, Argentina. He works for a worldwide leading consumer product company and takes great pleasure in using FOSS tools to increase productivity in all areas of his daily work.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

40 Responses

  1. John says:

    Thanks for this tutorial. I have my squid 3.3.8 installed and running on LinuxMint 17 in a virtualbox. When I issued the command ‘sudo tail -f /var/log/squid3/access.log‘ I see lots of TCP/MISS, even after accessing the same site on different machine.

    What could be the problem. I don’t think squid is caching same the website when accessed on different machine.

    Appreciate your help

  2. kadambari says:

    One of our customer uses our proxy server, PDFs are building correctly on the server side, but they aren’t transferring to our client machines due to what they think is a proxy time out issue.
    Actually, small PDF file using the system, and that transfers to my local machine without issue.
    So the problem is the big PDFs, which are taking about 1hr to create.
    They send a dummy package every 10 minutes to keep the connection, but customer thinks the proxy servers are timing out before then. Does that make sense?
    can you help me know what the “current time” out time is?
    does the below lines decide time out or what decides the time out?
    refresh_pattern ^ftp: 1440 20% 10080
    refresh_pattern ^gopher: 1440 0% 1440
    refresh_pattern . 0 20% 4320

    • Gabriel A. Cánepa says:

      A quick search for squid timeout in Google returned this result: Without knowing much about your actual environment I’m afraid I can’t say for sure whether this will help or not. Keep in mind that the logs are your best friends. Have you found anything in the Squid log that may point you in the right direction?

  3. osm says:

    Hi Mr Gabriel,

    im looking for a proxy solution and finally i found squid web proxy solution , i try to install it on 3 different platforms : Windows server , Ubuntu Server 16.04 and Centos 7 , i do not have success because i try to make it transparent , without configuring client browser ;

    now my question is if i make it non transparent proxy , and i should configure the browsers of my clients one by one , and some day a client learn how to disable this configuration from the browser then he will be able to surf the net without passing through the proxy , i find this stupide solution !

    for me in the beginning i thought that after installing squid on the os ( ubuntu or centos in the middle : net router squidServerLAN) he will not let the user in the lan connect only after configure his browser , else no internet will be established .

    please i need answer.

  4. nadav says:

    Is there any guide about blocking files by their signatures using squid ?
    I want to write my own code to check if a file have the specific signature and block it if necessary and use this code with squid.

  5. Najam says:

    Great work Sir.
    Sir please help me in “How to limit bandwidth of users, clients or lab computers”
    I have more than 2000 lab PCs.
    Types of clients
    Type 1: unlimited access to bandwidth
    Type 2: 1.5 Mbps
    Type 3: 512 Kbps
    I have 4 labs in which i want to implement bandwidth control policy.
    Please guide me

    • @Najam,
      Are different types of clients in separate networks, or how do you distinguish one type from another? In other words, how do you define a client type, and assign it to a specific person, or IP address?

    • Najam says:


      Sir I want that the students of A,B&C block use only 512Kb and the users of
      D&E use 1mbps only and the users of F-Block use unlimited

      • @Najam,
        You should look into the ClientBandwidthLimit and DelayPools features of Squid. They are documented in the Squid wiki. This may require you to compile Squid from source, though.
        If you came to this page while preparing to take the LFCE exam, you can rest assured that you will NOT be asked to perform such task (limiting bandwidth on a per-network basis) during the exam. On the other hand, if you need help to do this for your job or a homework assignment, we at offer support services for a reasonable price. Feel free to contact us for a quote.

        • Najam says:

          Thank you Sir.
          Sir Basically I’m a student and I’m working on my Project I can’t afford your services I shall be thankful to if you help me a little bit more. How this ClientBandwidthLimit works
          Once again Thanks.

          • @Najam,
            Please read the documentation and get back to us after you’ve tried what it says in the links I already shared. The kind of support you need and the time it would take for us to provide it to you is beyond our grasp at this point. Thank you for your understanding.

  6. Rahul Kumbhare says:


    I have configured squid proxy server but there is one problem, when I set proxy setting in google chrome browser then skype application is not working and when I remove the proxy setting it is working. And this issue is not with firefox browser.
    How to resolve this can you please advice ?

    • @Rahul,
      As opposed to Firefox, Google Chrome usually takes its proxy settings from the system settings. By changing the one, you change the other (at least that’s the case in Windows). You will have to separately set the proxy configuration for Skype. (Skype menu –> Options –> Advanced for me, using Skype 4.1 for Linux). See image here:

  7. Ricky says:


    I just took the exam, I had a question about squid using w3m for a user.

    for example, when user1 uses w3m it is automatically passing through squid.

    question is how do I set that up?


    • @Ricky,
      One way you can do that is adding the HTTP_PROXY variable to the user’s .bash_profile file, like so:
      HTTP_PROXY=’http://[IP or hostname]:port’
      export HTTP_PROXY
      Then source .bash_profile:
      . .bash_profile
      Or have the user log out and log back in.

  8. imran says:

    how do we reverse the proxy?

  9. rahul says:

    how to prevent client from changing proxy setting when proxy server IP is assign, from web browser like firefox,chrome.

    • @rahul,
      I believe your question refers to web browser configuration (which is performed on the client) rather than proxy server configuration, which is the topic of this article. You will have better luck if you post your question in a Firefox or Chrome forum.

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

Join Over 300K+ Linux Users
  1. 177,942
  2. 8,310
  3. 37,548

Are you subscribed?