Project

General

Profile

Actions

Bug #13412

open

SquidGuard, Rewrite rules, only one sub-rule will work if more than one sub-rule defined

Added by UserPfbUg User about 1 month ago. Updated about 1 month ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
squidguard
Target version:
-
Start date:
08/10/2022
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Affected Version:
2.6.0
Affected Plus Version:
Affected Architecture:

Description

So, SquidGuard - Rewrites
If we create a new rewrite rule, add 1 rewrite condition and save it, Apply, it works fine, we can also check SquidGuard - Log - Filter config, we can see the rewrite rule we have created.

However, if we add more conditions in the same rewrite rule, and if we go to SquidGuard - Log - Filter config and check again, there will always be only 1 condition under the rule which we have defined.

So,

Instead of

rew app_p {
@example1.com@ir
@example2.com@ir
log block.log
}

We only get

rew app_p {
@example2.com@ir
log block.log
}

OR

rew app_p {
@example1.com@ir
log block.log
}

No matter hoe many conditions we add to the rule, there will only be one condition show here, which eventually effects how the condition works, because all other conditions defined in the rule are ignored, only the shown one will work.

Will someone be able to fix this bug?

Actions #1

Updated by UserPfbUg User about 1 month ago

https://forum.netgate.com/topic/174018/squidguard-rewrite-rule-bug

If manually modify the squidguard configuration file to add extra sub-rules, they will work fine.
If manually modify the pfsense configuration file for squidguard, it will not work, pfsense will remove all other lines but only keep one line.
So it seems like pfSense is not saving all sub-rules, despite when you open the Rewrite page, it appears all sub-rules are there, but in the squidguard config file, there is only one line.

Actions #2

Updated by UserPfbUg User about 1 month ago

Here's a workaround for this issue however seems the workaround will not stay after network disconnection etc.or something else.
Probably the workaround we can use though before a fix or patch released.
https://dannyda.com/2022/08/17/how-to-fix-squidguard-on-pfsense-only-the-first-rewrite-rule-work-bug-workaround/

Actions

Also available in: Atom PDF