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

    Squid/Clamav: Wrong redirect URL

    Scheduled Pinned Locked Moved Cache/Proxy
    7 Posts 5 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.
    • PippinP
      Pippin
      last edited by

      Hello,

      After changing the Domain under System->General setup, the Clamav redirect URL keeps pointing to the old URL giving an empty page instead of the Clamav page.
      When changing the url manually in the address bar it shows the correct page.

      I`ve restarted services/pfSense several times but it does not pickup the changed domain.

      Any solution to this bug?

      I gloomily came to the ironic conclusion that if you take a highly intelligent person and give them the best possible, elite education, then you will most likely wind up with an academic who is completely impervious to reality.
      Halton Arp

      1 Reply Last reply Reply Quote 0
      • PippinP
        Pippin
        last edited by

        Have tried to change

        redirect http://pfSense.localdomain/squid_clwarn.php
        

        manually in squidclamav.conf but it reverts back after restart/boot.

        Then I tried enabling manual config adding it under Antivirus Advanced Options and Load advanced.
        After restart/boot the url is correct (but original content is gone) in squidclamav.conf and after flushing DNS/browsercache, it still not showing the Clamav Virus found page.

        I gloomily came to the ironic conclusion that if you take a highly intelligent person and give them the best possible, elite education, then you will most likely wind up with an academic who is completely impervious to reality.
        Halton Arp

        1 Reply Last reply Reply Quote 0
        • R
          RichardEb
          last edited by

          I have the same problem. Adding the redirect command in the custom config has no effect for me. I started an issue ticket: https://redmine.pfsense.org/issues/6763

          1 Reply Last reply Reply Quote 0
          • D
            doktornotor Banned
            last edited by

            As noted on the ticket you filed:

            • when you install the package, the redirect URL gets set to the pfSense GUI URL: https://github.com/pfsense/FreeBSD-ports/blob/devel/www/pfSense-pkg-squid/files/usr/local/pkg/squid_antivirus.inc#L408 - that's the only sensible default and avoids the previous behaviour where people would be getting error messages and posting over and over again that the package does not work out of the box and asking what they are supposed to do.

            • as long as you leave the redirect URL empty, it stays there as it is pointing to your pfSense's original FQDN, as configured on the package install. The package lacks paranormal skills and has no idea that you have changed your firewall hostname. When you configure the URL in the GUI, it gets set as configured:  https://github.com/pfsense/FreeBSD-ports/blob/devel/www/pfSense-pkg-squid/files/usr/local/pkg/squid_antivirus.inc#L265

            Restarting pfSense will not make Squid gain paranormal skills and as such will not change anything.
            Restarting Squid and related services will not be any better.
            Setting the URL in the GUI sets up the redirect in /usr/local/etc/c-icap/squidclamav.conf as configured in the GUI:  https://github.com/pfsense/FreeBSD-ports/blob/devel/www/pfSense-pkg-squid/files/usr/local/pkg/squid_antivirus.inc#L267

            If you have any inexplicable and non-reproducible issues with this, simply uninstall the package, make sure that /usr/local/etc/c-icap/ is gone, then install Squid again.

            1 Reply Last reply Reply Quote 0
            • R
              RgGolbraich
              last edited by

              I know its an old post but here is my solution to the same problem.

              Solution:
              when I installed pfSense with all packages I use, I gave it a domain name.
              After some while, i changed the domain name to my DC, somehow SquidClamAV keeps the old data so I get pointed to unavailable address.
              To fix this issue I edited 2 files: (Diagnostics - Edit File)
              /usr/local/etc/c-icap/squidclamav.conf
              /usr/local/etc/c-icap/squidclamav.conf.pfsense

              • Why them both? because every time I edited the .conf file my settings get back to what it was. after changing them both pfSense kept the configuration and problem were fixed.
              K 1 Reply Last reply Reply Quote 1
              • D
                doktornotor Banned
                last edited by

                @RgGolbraich:

                Why them both? because every time I edited the .conf file my settings get back to what it was.

                Extremely surprising…  ::)

                1 Reply Last reply Reply Quote 0
                • K
                  kopraasbotha @RgGolbraich
                  last edited by

                  @rggolbraich said in Squid/Clamav: Wrong redirect URL:

                  I know its an old post but here is my solution to the same problem.

                  Solution:
                  when I installed pfSense with all packages I use, I gave it a domain name.
                  After some while, i changed the domain name to my DC, somehow SquidClamAV keeps the old data so I get pointed to unavailable address.
                  To fix this issue I edited 2 files: (Diagnostics - Edit File)
                  /usr/local/etc/c-icap/squidclamav.conf
                  /usr/local/etc/c-icap/squidclamav.conf.pfsense

                  • Why them both? because every time I edited the .conf file my settings get back to what it was. after changing them both pfSense kept the configuration and problem were fixed.

                  Thanks for this. Two years later and still a bug.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.