Plugin: www/OPNProxy does not block anything

Started by seed, February 28, 2025, 11:10:41 PM

Previous topic - Next topic
February 28, 2025, 11:10:41 PM Last Edit: March 03, 2025, 09:32:39 PM by seed
Hello All,


i configured OPNproxy as described in the docs:
https://docs.opnsense.org/manual/opnproxy.html

And it looks like it does not work. The policy testing looks fine. When i generate some testrule that blocks anything and restart squid i expect everything to work.

curl https://spiegel.de/ -k -U proxyuser:userpassword -x http://proxy.internal.domain.tld:3128 -L --proxy-anyauth
This should not return the webpage. But still it does and the rwquest is logged in the accesslog as usual.
Also running configctl opnproxy sync_users or configctl opnproxy apply_policies does not make a difference.

I also opened this issue.
https://github.com/opnsense/plugins/issues/4565

I checked my config multiple times and hope that i made a mistake. But it looks like due to this issue all of my servers are now allowed to browse the web without any blocking. Using this plugin want to allow only access to certain updateservers. This was working in the past.

Could it be due to a squid version change?
i want all services to run with wirespeed and therefore run this dedicated hardware configuration:

AMD Ryzen 7 9700x
ASUS Pro B650M-CT-CSM
64GB DDR5 ECC (2x KSM56E46BD8KM-32HA)
Intel XL710-BM1
Intel i350-T4
2x SSD with ZFS mirror
PiKVM for remote maintenance

private user, no business use

Also reinstalling the system did not work.
The interesting this is also that the authenticated user is not logged in the accesslog.
i want all services to run with wirespeed and therefore run this dedicated hardware configuration:

AMD Ryzen 7 9700x
ASUS Pro B650M-CT-CSM
64GB DDR5 ECC (2x KSM56E46BD8KM-32HA)
Intel XL710-BM1
Intel i350-T4
2x SSD with ZFS mirror
PiKVM for remote maintenance

private user, no business use

After doing some testing i discovered that blocking HTTP like: "http://opnsense.org" works as expected. But HTTPs does not. For example "https://opnsense.org", which also should be blocked by the "*" rule doesnt work. HTTPs content can be browsed.
i want all services to run with wirespeed and therefore run this dedicated hardware configuration:

AMD Ryzen 7 9700x
ASUS Pro B650M-CT-CSM
64GB DDR5 ECC (2x KSM56E46BD8KM-32HA)
Intel XL710-BM1
Intel i350-T4
2x SSD with ZFS mirror
PiKVM for remote maintenance

private user, no business use

Did you set up a transparent proxy? Did you enable SSL inspection? Are you aware of the constraints SSL inspections brings?
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Hello Patrick,


Im not using a transparent Proxy, i use SSL inspection. My CA is installed on my clients. Squid logs all requests (HTTP/HTTPs).

"Are you aware of the constraints SSL inspections brings?"
Which constraints beside the local CA deployment work?
i want all services to run with wirespeed and therefore run this dedicated hardware configuration:

AMD Ryzen 7 9700x
ASUS Pro B650M-CT-CSM
64GB DDR5 ECC (2x KSM56E46BD8KM-32HA)
Intel XL710-BM1
Intel i350-T4
2x SSD with ZFS mirror
PiKVM for remote maintenance

private user, no business use

The squid proxy config itself works as expected.

But i have problems with the www/OPNproxy plugin.
i want all services to run with wirespeed and therefore run this dedicated hardware configuration:

AMD Ryzen 7 9700x
ASUS Pro B650M-CT-CSM
64GB DDR5 ECC (2x KSM56E46BD8KM-32HA)
Intel XL710-BM1
Intel i350-T4
2x SSD with ZFS mirror
PiKVM for remote maintenance

private user, no business use

March 03, 2025, 09:35:12 PM #6 Last Edit: March 03, 2025, 09:41:55 PM by Patrick M. Hausen
Quote from: seed on March 03, 2025, 09:30:14 PMWhich constraints beside the local CA deployment work?

I meant exactly the local CA deployment. Many people don't quite understand how SSL works and expect filtering by "magic".

Sorry, I have no practical experience with the proxy, just wanted to ask if you checked the obvious things. So with that out of the way someone else will have to take over.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

I hope Ad will take a look at the issue on github.
i want all services to run with wirespeed and therefore run this dedicated hardware configuration:

AMD Ryzen 7 9700x
ASUS Pro B650M-CT-CSM
64GB DDR5 ECC (2x KSM56E46BD8KM-32HA)
Intel XL710-BM1
Intel i350-T4
2x SSD with ZFS mirror
PiKVM for remote maintenance

private user, no business use

March 28, 2025, 09:41:53 PM #8 Last Edit: March 28, 2025, 09:48:27 PM by seed
Is nobody else using access control with https inspection?

I thought I had provided all the information needed to replicate the problem. What can I do to solve the problem?
i want all services to run with wirespeed and therefore run this dedicated hardware configuration:

AMD Ryzen 7 9700x
ASUS Pro B650M-CT-CSM
64GB DDR5 ECC (2x KSM56E46BD8KM-32HA)
Intel XL710-BM1
Intel i350-T4
2x SSD with ZFS mirror
PiKVM for remote maintenance

private user, no business use

I was also failing with the plugin, it only works if you use Authentication in addition. Notwork-only doesnt work ... no idea why

March 28, 2025, 10:57:19 PM #10 Last Edit: March 28, 2025, 11:06:56 PM by seed
Quote from: mimugmail on March 28, 2025, 10:47:55 PMI was also failing with the plugin, it only works if you use Authentication in addition. Notwork-only doesnt work ... no idea why

what do you mean with "Authentication in addition" in my use case all my servers/clients use credentials and authentication is configured in opnsense (local users). Please take a look at the github issue. i included screenshots that show my configuration.

https://github.com/opnsense/plugins/issues/4565


Only HTTP access control works. HTTPs access control does not. Squid does work with https. The CA is installed on the clients. But the user auth is not logged and not send to the access control so the policy doesnt grip.
When using sni-logging https does work also.

IT is NOT a SSL inspection issue itself. Because SSL is processed as usual in squid and also cached. Only the access control part for users and groups does not work in HTTPS.
i want all services to run with wirespeed and therefore run this dedicated hardware configuration:

AMD Ryzen 7 9700x
ASUS Pro B650M-CT-CSM
64GB DDR5 ECC (2x KSM56E46BD8KM-32HA)
Intel XL710-BM1
Intel i350-T4
2x SSD with ZFS mirror
PiKVM for remote maintenance

private user, no business use