Squid Installation and basic parameters to get it running

  • Hello everyone, Am new to the forum and also kind of getting started with pfsense. I've had my installation for 1 month now and it is absolutely great!.    Like the topic states am planning on installing squid on my pfsense box and implement internet cache with transparent proxying, but the problem is I don't know what else to do after selecting and installing the appropriate package from the list. Please guide me through this with some step and basic settings .

    Thanks alot

  • (0.  Install Squid package if you haven't already done so.)
    1.  Go to services/proxy server in the GUI
    2.  Make sure LAN is highlighted as interface, tick 'allow users on interface' and tick 'transparent proxy'
    3.  Press save.  Done.

    Optionally you can adjust the size of the cache, add whitelist/blacklist or IPs that are not filtered etc.  Just go to the various tabs within the proxy section of the GUI.  Keep in mind that the auth settings will not work with Squid in transparent mode.  Good luck.

  • Thank you very much mhab12, I have done as instructed. Will keep you posted on how it goes.


  • okay I just viewed the log and there is this entry for squid, what does it mean? will it affect performance?

    squid[336]: Squid Parent: child process 339 exited due to signal 6

  • If you change squid settings in the webgui squid will be terminated and restarted. As long as squid is running you are fine.

  • To verify that its running, aside from what the webGUI says, you can log into the console and see if squid is running in the process list.  Also, you can check the access.log file for activity.  The default location of the squid access.log is in /usr/local/logs IIRC, however, this could have changed.  Judicious use of the find command will help.

  • okay but it occurs to me that the connection is slow with squid on? is this normal for the first few days or is there some bug for everyone else

  • @Adam2:

    okay but it occurs to me that the connection is slow with squid on? is this normal for the first few days or is there some bug for everyone else

    Please search for this issue, it's under active discussion.

  • thanks everyone, I will follow up on the squid slowness issue through this topic


  • hi, all
    i've installed new version of squid.
    and then i customized. to make it proper for my network
    this is my squid.conf

    Do not edit manually!

    http_port transparent
    icp_port 3130

    pid_filename /var/run/squid.pid
    cache_effective_user proxy
    cache_effective_group proxy
    error_directory /usr/local/etc/squid/errors/English
    visible_hostname localhost
    cache_mgr admin@localhost

    access_log /dev/null
    cache_log /var/squid/log/cache.log
    cache_store_log none
    shutdown_lifetime 3 seconds

    Allow local network(s) on interface(s)

    acl localnet src
    uri_whitespace strip

    cache_dir diskd /cache1 12000 16 256
    cache_dir diskd /cache2 12000 16 256
    cache_dir diskd /cache3 12000 16 256
    cache_dir diskd /cache4 12000 16 256
    #cache_dir aufs /var/squid/cache 1000 16 256
    cache_mem 16 MB
    maximum_object_size 32 KB

    No redirector configured

    Setup some default acls

    acl all src
    acl localhost src
    acl safeports port 21 70 80 210 280 443 488 563 591 631 777 901  1025-65535
    acl sslports port 443 563
    acl manager proto cache_object

    after i safe it, and then i run it.and it runs well for a while…
    and the question is
    why every time i reboot my router. the config is back like the default one.
    especialy on the cache_dir section.

    pls some body could give a solution???

  • Everything is regenerated on bootup or guichanges from the config.xml. This is how pfSense works (single configfile for everything: config.xml).

  • So another question along this same line.  I have installed squid and it is running as a process on the box.  But when I put a URL's in the BlackList field it doesn't filter anything.  Is there anything special that needs to be done to make that happen?

  • hi

    i am using squid for quite some times, i used the upstream proxy in the past when i had the option to use it by my isp, but now my isp oblige me to do so, and if i don't my internet will be very slow, so if i use it now squid stops immediately, i tried it with 5 different pfsense boxes, any body aware of this and solved it?

    thanks in advance

Log in to reply