squid proxy server installation and configuration RHEL7 / Centos7

ARK

My Name is ARK. Expert in grasping any new technology, Interested in Sharing the knowledge. Learn more & Earn More

You may also like...

26 Responses

  1. AKASH says:

    this topic is too good. if you write examples so it will be beneficial for us. thankyou

  2. afif sarker says:

    so usefull

  3. manoj says:

    yes this very much helpfull

  4. Carlitos says:

    I have problems in the configuration file ” /etc/squid/squid.conf ” when the line commented checklist
    ” Acl badsites url_regix ” / etc / squid / badsites ”
    ” Http_access deny badsites ” and create the path and add the addresses , and also add my network , I need help please when I restart the service will not start

  5. Carlitos says:

    /var/log/messages
    Jul 18 21:19:48 defqon squid: Bungled /etc/squid/squid.conf line 27: acl badsite s url_regix “/etc/squid/badsite”
    Jul 18 21:19:48 defqon squid: 2016/07/18 21:19:48| WARNING: (B) ‘192.168.0.0/16’ is a subnetwork of (A) ‘192.168.0.0/24’
    Jul 18 21:19:48 defqon squid: 2016/07/18 21:19:48| WARNING: because of this ‘192 .168.0.0/24’ is ignored to keep splay tree searching predictable
    Jul 18 21:19:48 defqon squid: 2016/07/18 21:19:48| WARNING: You should probably remove ‘192.168.0.0/16’ from the ACL named ‘localnet’
    Jul 18 21:19:48 defqon squid: 2016/07/18 21:19:48| FATAL: Invalid ACL type ‘url_ regix’
    Jul 18 21:19:48 defqon squid: FATAL: Bungled /etc/squid/squid.conf line 27: acl badsites url_regix “/etc/squid/badsite”
    Jul 18 21:19:48 defqon squid: Squid Cache (Version 3.3.8): Terminated abnormally .
    Jul 18 21:19:48 defqon squid: CPU Usage: 0.009 seconds = 0.005 user + 0.003 sys
    Jul 18 21:19:48 defqon squid: Maximum Resident Size: 24848 KB
    Jul 18 21:19:48 defqon squid: Page faults with physical i/o: 0
    Jul 18 21:19:48 defqon systemd: squid.service: control process exited, code=exit ed status=1
    Jul 18 21:19:48 defqon systemd: Failed to start Squid caching proxy.
    Jul 18 21:19:48 defqon systemd: Unit squid.service entered failed state.

    • Log itself is saying remove “”” WARNING: You should probably remove ‘192.168.0.0/16’ from the ACL named ‘localnet’ “””
      please remove that rule from config and try

      • Carlitos says:

        Look this is the new error , I mentioned the lines of the error and start the service
        Jul 19 20:47:00 defqon squid: Bungled /etc/squid/squid.conf line 27: acl badsites url_regix “/etc/squid/badsite”
        Jul 19 20:48:24 defqon squid: Bungled /etc/squid/squid.conf line 40: http_access deny badsites

        By creating a file on the path “/ etc / squid / badsite ” is where the error occurs : /

  6. shashi kant says:

    hi can you please write a brief note on transparent proxy integrated with webmin and squid server

  7. jithin says:

    is there any way i can create new port and block some sites on that port? if possible please tell me how to set only one site for a port(i mean if i created a port for ex:5678 and give access to facebook.com only and deny for all other sites? means he/she only get facebook.com )

    • Yes That is possible, instead of 8080 or 3128 you can set whatever the port number you want. Port number should be Greater than 1000. Than write an rule saying that deny all URL except particular site.

      • jithin says:

        ok thanks also is it possible to create multiple ports? because i need to block sites for specific employee?for example if marketing dept need facebook.com and accounts dept dont eventually i need to create mutilple ports right? so is this possible in squid? please reply….

  8. @jithin, No need of creating multiple ports, we can restrict sites using proxy based on users and IP addresses. Example if finance dept IP series 192.168.2.x then restrict entire IP series by writing rule in proxy, If your marketing dept IP series 192.168.3.x then allow internet to that series. Or else create user authentication based on users we can restrict.

  9. chandu says:

    Nice article, very useful

  10. Suman Sen says:

    Mr. Ravi,
    This is Suman Sen from Bangladesh. The post is very good. But I am facing different problem. Please help me.
    My problem is like
    I have two different network, net1 and net2
    net1 can access facebook and youtube 13:00-14:00 and 15:00-16:00
    net2 can access facebook and youtube 12:00- 13:00 and 15:00-16:00

    what will be the solution, Please help

  11. narsing2010 says:

    two small spelling error in the # vim /etc/squid/squid.conf urlpath_regix & url_regix – > here is a spelling mistake -> write as a urlpath_regex and url_regex

  12. Sharad says:

    Hi Ravi…
    Great tutorial and easy to implement.
    But how can we authenticate users from LDAP using SSL(port 636).
    Is there any plugin or script for that.

  13. rinaz says:

    hi guyz please help me
    how to block access proxy by passing application but i tried with sonicwall nsa it is not success full

Leave a Reply