Squid/Clamav: Wrong redirect URL
-
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?
-
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 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
-
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#L267If 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.
-
-
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.
-
Why them both? because every time I edited the .conf file my settings get back to what it was.
Extremely surprising… ::)
-
@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.