Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    How to completely remove squid and squidguard (need help)?

    Scheduled Pinned Locked Moved Cache/Proxy
    3 Posts 1 Posters 9.6k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      auto2015
      last edited by

      Hello.
      Due to the unstable work of squid and squidGuard, I tried to remove the packages to install them again with the default settings.
      However, after removing and reinstalling packages (I install squid only) my settings are preserved.
      Does anyone know how to completely remove squid and squidGuard (with settings)?

      I tried the following:
      remove squid:

      >>> Removing pfSense-pkg-squid... 
      Checking integrity... done (0 conflicting)
      Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):
      
      Installed packages to be REMOVED:
      	pfSense-pkg-squid-0.4.21
      [1/1] Deinstalling pfSense-pkg-squid-0.4.21...
      Removing squid components...
      Menu items... done.
      Services... done.
      Loading package instructions...
      [1/1] Deleting files for pfSense-pkg-squid-0.4.21: .......... done
      Removing squid components...
      Configuration... done.
      >>> Removing stale packages... done.
      Success
      

      Find files and folders:

      
      find / -name "*squid*" -print
      /usr/local/www/lightsquid
      /usr/local/etc/rc.d/squidGuard_logrotate
      /usr/local/etc/c-icap/squidclamav.conf
      /usr/local/etc/c-icap/squidclamav.conf.default
      /usr/local/etc/c-icap/squidclamav.conf.pfsense
      /usr/local/etc/squid
      /usr/local/etc/squid/squid.conf
      /usr/local/etc/squid/squidGuard.conf
      /usr/local/etc/lightsquid
      /usr/local/etc/lightsquid/lightsquid.cfg
      /usr/local/etc/squidGuard
      /usr/local/etc/squidGuard/squidguard_conf.xml
      /usr/local/etc/squidGuard/squidGuard.conf
      /usr/local/etc/squidGuard/squidGuard_blk_rebuild.conf
      /usr/local/etc/squidGuard/squidGuard__usrdbrebuild.conf
      /var/etc/squid.passwd
      /var/run/squid
      /var/run/squid/squid.pid
      /var/mail/squid
      /var/log/lighttpd_lightsquid.log
      /var/log/squidGuard
      /var/log/squidGuard/squidGuard.log
      /var/db/squidGuard
      /var/cache/pkg/pfSense-pkg-squid-0.4.21-996c91c504.txz
      /var/cache/pkg/lightsquid-1.8_4.txz
      /var/cache/pkg/pfSense-pkg-squid-0.4.21.txz
      /var/cache/pkg/pfSense-pkg-Lightsquid-3.0.4-da1b3fadf1.txz
      /var/cache/pkg/lightsquid-1.8_4-151c23ed6c.txz
      /var/cache/pkg/squid-3.5.19-c54441e91f.txz
      /var/cache/pkg/squid_radius_auth-1.10-a798c28d5a.txz
      /var/cache/pkg/squid_radius_auth-1.10.txz
      /var/cache/pkg/squid-3.5.19.txz
      /var/cache/pkg/squidclamav-6.14-6efff6b198.txz
      /var/cache/pkg/squidclamav-6.14.txz
      /var/cache/pkg/pfSense-pkg-Lightsquid-3.0.4.txz
      /var/cache/pkg/pfSense-pkg-squidGuard-1.14_3-680b79765b.txz
      /var/cache/pkg/squidGuard-1.4_15-df79070661.txz
      /var/cache/pkg/pfSense-pkg-squidGuard-1.14_3.txz
      /var/cache/pkg/squidGuard-1.4_15.txz
      /var/squid
      /cf/conf/pkg_log_pfSense-pkg-squid.txt
      /cf/conf/pkg_log_pfSense-pkg-Lightsquid.txt
      /cf/conf/pkg_log_pfSense-pkg-squidGuard.txt
      
      

      remove some files and folders:

      
      rm -rf /usr/local/www/lightsquid
      rm -rf /usr/local/etc/c-icap/squidclamav.conf
      rm -rf /usr/local/etc/c-icap/squidclamav.conf.default
      rm -rf /usr/local/etc/c-icap/squidclamav.conf.pfsense
      rm -rf /usr/local/etc/squid
      rm -rf /usr/local/etc/lightsquid
      rm -rf /usr/local/etc/squidGuard
      rm -rf /var/db/squidGuard
      rm -rf /var/squid
      
      

      Find all files and folders again:

      
      /usr/local/etc/rc.d/squidGuard_logrotate
      /var/etc/squid.passwd
      /var/run/squid
      /var/run/squid/squid.pid
      /var/mail/squid
      /var/log/lighttpd_lightsquid.log
      /var/log/squidGuard
      /var/log/squidGuard/squidGuard.log
      /var/cache/pkg/pfSense-pkg-squid-0.4.21-996c91c504.txz
      /var/cache/pkg/lightsquid-1.8_4.txz
      /var/cache/pkg/pfSense-pkg-squid-0.4.21.txz
      /var/cache/pkg/pfSense-pkg-Lightsquid-3.0.4-da1b3fadf1.txz
      /var/cache/pkg/lightsquid-1.8_4-151c23ed6c.txz
      /var/cache/pkg/squid-3.5.19-c54441e91f.txz
      /var/cache/pkg/squid_radius_auth-1.10-a798c28d5a.txz
      /var/cache/pkg/squid_radius_auth-1.10.txz
      /var/cache/pkg/squid-3.5.19.txz
      /var/cache/pkg/squidclamav-6.14-6efff6b198.txz
      /var/cache/pkg/squidclamav-6.14.txz
      /var/cache/pkg/pfSense-pkg-Lightsquid-3.0.4.txz
      /var/cache/pkg/pfSense-pkg-squidGuard-1.14_3-680b79765b.txz
      /var/cache/pkg/squidGuard-1.4_15-df79070661.txz
      /var/cache/pkg/pfSense-pkg-squidGuard-1.14_3.txz
      /var/cache/pkg/squidGuard-1.4_15.txz
      /cf/conf/pkg_log_pfSense-pkg-squid.txt
      /cf/conf/pkg_log_pfSense-pkg-Lightsquid.txt
      /cf/conf/pkg_log_pfSense-pkg-squidGuard.txt
      
      

      install squid:

      
      >>> Installing pfSense-pkg-squid... 
      Updating pfSense-core repository catalogue...
      pfSense-core repository is up-to-date.
      Updating pfSense repository catalogue...
      pfSense repository is up-to-date.
      All repositories are up-to-date.
      Checking integrity... done (0 conflicting)
      The following 15 package(s) will be affected (of 0 checked):
      
      New packages to be INSTALLED:
      	pfSense-pkg-squid: 0.4.21 [pfSense]
      	squid_radius_auth: 1.10 [pfSense]
      	squid: 3.5.19 [pfSense]
      	krb5: 1.14.1 [pfSense]
      	pkgconf: 0.9.12_1 [pfSense]
      	cyrus-sasl: 2.1.26_12 [pfSense]
      	squidclamav: 6.14 [pfSense]
      	c-icap: 0.4.2,2 [pfSense]
      	c-icap-modules: 0.4.2_1 [pfSense]
      	clamav: 0.99.1 [pfSense]
      	unzoo: 4.4_2 [pfSense]
      	arc: 5.21p [pfSense]
      	lha: 1.14i_6 [pfSense]
      	arj: 3.10.22_4 [pfSense]
      	json-c: 0.12_2 [pfSense]
      
      The process will require 27 MiB more space.
      [1/15] Installing pkgconf-0.9.12_1...
      [1/15] Extracting pkgconf-0.9.12_1: ....... done
      [2/15] Installing unzoo-4.4_2...
      [2/15] Extracting unzoo-4.4_2: .. done
      [3/15] Installing arc-5.21p...
      [3/15] Extracting arc-5.21p: ...... done
      [4/15] Installing lha-1.14i_6...
      [4/15] Extracting lha-1.14i_6: .. done
      [5/15] Installing arj-3.10.22_4...
      [5/15] Extracting arj-3.10.22_4: .......... done
      [6/15] Installing json-c-0.12_2...
      [6/15] Extracting json-c-0.12_2: .......... done
      [7/15] Installing krb5-1.14.1...
      [7/15] Extracting krb5-1.14.1: .......... done
      [8/15] Installing cyrus-sasl-2.1.26_12...
      *** Updated user `cyrus'.
      [8/15] Extracting cyrus-sasl-2.1.26_12: .......... done
      [9/15] Installing c-icap-0.4.2,2...
      ===> Creating users and/or groups.
      Using existing group 'c_icap'.
      Using existing user 'c_icap'.
      [9/15] Extracting c-icap-0.4.2,2: .......... done
      [10/15] Installing clamav-0.99.1...
      ===> Creating users and/or groups.
      Using existing group 'clamav'.
      Using existing group 'mail'.
      Using existing user 'clamav'.
      [10/15] Extracting clamav-0.99.1: .......... done
      [11/15] Installing squid_radius_auth-1.10...
      [11/15] Extracting squid_radius_auth-1.10: .... done
      [12/15] Installing squid-3.5.19...
      ===> Creating users and/or groups.
      Using existing group 'squid'.
      Using existing user 'squid'.
      ===> Pre-installation configuration for squid-3.5.19
      [12/15] Extracting squid-3.5.19: .......... done
      [13/15] Installing squidclamav-6.14...
      [13/15] Extracting squidclamav-6.14: .......... done
      [14/15] Installing c-icap-modules-0.4.2_1...
      [14/15] Extracting c-icap-modules-0.4.2_1: .......... done
      [15/15] Installing pfSense-pkg-squid-0.4.21...
      [15/15] Extracting pfSense-pkg-squid-0.4.21: .......... done
      Saving updated package information...
      done.
      Loading package configuration... done.
      Configuring package components...
      Loading package instructions...
      Custom commands...
      Executing custom_php_install_command()...done.
      Executing custom_php_resync_config_command()...done.
      Menu items... done.
      Services... done.
      Writing configuration... done.
      Message from cyrus-sasl-2.1.26_12:
      You can use sasldb2 for authentication, to add users use:
      
      	saslpasswd2 -c username
      
      If you want to enable SMTP AUTH with the system Sendmail, read
      Sendmail.README
      
      NOTE: This port has been compiled with a default pwcheck_method of
            auxprop.  If you want to authenticate your user by /etc/passwd,
            PAM or LDAP, install ports/security/cyrus-sasl2-saslauthd and
            set sasl_pwcheck_method to saslauthd after installing the
            Cyrus-IMAPd 2.X port.  You should also check the
            /usr/local/lib/sasl2/*.conf files for the correct
            pwcheck_method.
            If you want to use GSSAPI mechanism, install
            ports/security/cyrus-sasl2-gssapi.
            If you want to use SRP mechanism, install
            ports/security/cyrus-sasl2-srp.
            If you want to use LDAP auxprop plugin, install
            ports/security/cyrus-sasl2-ldapdb.
      Message from squid-3.5.19:
      o You can find the configuration files for this package in the
             directory /usr/local/etc/squid.
      
           o The default cache directory is /var/squid/cache/.
             The default log directory is /var/log/squid/.
      
             Note:
             You must initialize new cache directories before you can start
             squid.  Do this by running "squid -z" as 'root' or 'squid'.
             If your cache directories are already initialized (e.g. after an
             upgrade of squid) you do not need to initialize them again.
      
           o When using DiskD storage scheme remember to read documentation:
               http://wiki.squid-cache.org/Features/DiskDaemon
             and alter your kern.ipc defaults in /boot/loader.conf. DiskD will not
             work reliably without this. Last recomendations were:
      
               kern.ipc.msgmnb=8192
               kern.ipc.msgssz=64
               kern.ipc.msgtql=2048
      
           o The default configuration will deny everyone but the local host and
             local networks as defined in RFC 1918 for IPv4 and RFCs 4193 and
             4291 for IPv6 access to the proxy service.  Edit the "http_access
             allow/deny" directives in /usr/local/etc/squid/squid.conf
             to suit your needs.
      
           o If AUTH_SQL option is set, please, don't forget to install one of
             following perl modules depending on database you like:
               databases/p5-DBD-mysql
               databases/p5-DBD-Pg
               databases/p5-DBD-SQLite
      
           To enable Squid, set squid_enable=yes in either
           /etc/rc.conf, /etc/rc.conf.local or /etc/rc.conf.d/squid
           Please see /usr/local/etc/rc.d/squid for further details.
      
           Note:
           If you just updated your Squid installation from an earlier version,
           make sure to check your Squid configuration against the 3.4 default
           configuration file /usr/local/etc/squid/squid.conf.sample.
      
           /usr/local/etc/squid/squid.conf.documented is a fully annotated
           configuration file you can consult for further reference.
      
           Additionally, you should check your configuration by calling
           'squid -f /path/to/squid.conf -k parse' before starting Squid.
      Message from pfSense-pkg-squid-0.4.21:
      Please visit Services - Squid Proxy Server menu to configure the package and enable the proxy.
      >>> Cleaning up cache... done.
      Success
      
      

      but my settings is still here…

      Will be appreciated for any help.
      My pfSense version:2.3.1-RELEASE-p1 (amd64) built on Wed May 25 14:53:06 CDT 2016 FreeBSD 10.3-RELEASE-p3

      1 Reply Last reply Reply Quote 0
      • A
        auto2015
        last edited by

        I found squid configuration in the section <installedpackages></installedpackages>of the pfsense configuration file:

        
         <installedpackages><package><name>OpenVPN Client Export Utility</name>
        			<internal_name>openvpn-client-export</internal_name>
        
        			<version>1.3.8</version>
        			<configurationfile>openvpn-client-export.xml</configurationfile></package> 
        		 <tab><name>Client Export</name>
        			<tabgroup>OpenVPN</tabgroup>
        			<url>/vpn_openvpn_export.php</url></tab> 
        		 <tab><name>Shared Key Export</name>
        			<tabgroup>OpenVPN</tabgroup>
        			<url>/vpn_openvpn_export_shared.php</url></tab> 
        		 <squidcache>!!!skipped!!!</squidcache> 
        		 <squidremote><squidauth>!!!skipped!!!</squidauth> 
        		 <squid>!!!skipped!!!</squid> 
        		 <squidtraffic>!!!skipped!!!</squidtraffic> 
        		 <lightsquid>!!!skipped!!!</lightsquid> 
        		 <squidguarddefault>!!!skipped!!!</squidguarddefault> 
        		 <squidguardrewrite><squidnac>!!!skipped!!!</squidnac> 
        		 <squidguardgeneral>!!!skipped!!!</squidguardgeneral> 
        		 <squidguarddest>!!!skipped!!!</squidguarddest> 
        		 <squidguardacl>!!!skipped!!!</squidguardacl> 
        		 <squidantivirus>!!!skipped!!!</squidantivirus> 
        
        <menu>
        		 <service>If I remove all about squid from configuration file and restore pfSense through Backup/restore would pfSense work? Does anyone correct this file manually?</service></menu></squidguardrewrite></squidremote></installedpackages> 
        
        1 Reply Last reply Reply Quote 0
        • A
          auto2015
          last edited by

          Solved for me:
          I am not sure exactly how, but finally I got the squid with default config.
          Several times in different sequence I made as follows:

          • remove all about squid from <installedpackages></installedpackages>section of configuration file and restore pfSense configuration from modified configuration file
          • install squid with or without squidguard
          • uninstall (check/uncheck checkbox "Keep Settings/Data") squid and squidguard
          • enable and disable squid and squidguard
          • reboot pfSense
          • manually remove files squid from filesystem (including *.txz files)
          • (not sure) restore configuration from unmodified pfSense configuration file (with squid settings in <installedpackages></installedpackages>section)
          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.