OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • Development and Code Review (Moderator: fabian) »
  • SquidGuard - new plugin
« previous next »
  • Print
Pages: [1]

Author Topic: SquidGuard - new plugin  (Read 9827 times)

juliocbc

  • Sr. Member
  • ****
  • Posts: 336
  • Karma: 12
    • View Profile
    • Cloudfence
SquidGuard - new plugin
« on: September 11, 2020, 02:27:29 am »
SquidGuard based plugin.

Features:
User based rules;
Block websites based on categories;
Custom block pages;
RegEx based rules;
Install and usage:
Logged as root run:
Code: [Select]
#curl https://community.cloudfence.com.br/webfilter/setup.sh -o /tmp/setup.sh ; sh /tmp/setup.sh
Alternative download link:

Code: [Select]
curl https://raw.githubusercontent.com/cloudfence/dev-packages/master/squidGuard-plugin-install.sh -o /tmp/setup.sh ; sh /tmp/setup.sh
After installed, you will need to download a squidGuard compatible blacklist:

Ex.: https://docs.opnsense.org/manual/how-tos/proxywebfilter.html (Step 2 / UT1 category based list)

1-On the WebUI go to: Services: Web Filter: General

2-Set it in the Blacklist Categories URL

3-Click in the Download Button: The download and build database process can take several minutes (depending on the hardware)

4-Enable Web Filter & click Apply

5-Managing rules: https://wiki.cloudfence.com.br/english/managing-rules

TODO
-Port the log viewer to the new OPNsense MVC standard

-Reset blacklist (remove and install it again)

-Multiple blacklists (maybe performance issues with - a lot testing needed!)

-Add groups support in rules; (port from Cloudfence plugin)

-Better frontend integration with Squid native (a.k.a WebProxy)

-Add custom rules to squid (bandwith controls, mime-types based rules, etc)

-Improve Frontend features and capabilities; (with community help!)

-Improve Documentation

-Beautify the code ;-) (I'm not a frontend guy, so please, be kind!)

PR: https://github.com/opnsense/plugins/pull/2026
« Last Edit: September 22, 2020, 02:18:22 pm by juliocbc »
Logged
Cloudfence Open Source Team

Raxid

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
Re: SquidGuard - new plugin
« Reply #1 on: September 29, 2020, 11:25:36 am »
Hi Julio,

As discussed on email please find required logs.
Currently i had squid configured transparent.
I want to use squid Guard with squid to configure policy based rules i.e Block all websites except google.com and facebook and also allow all websites and block specific websites based on IP's.
Logged

juliocbc

  • Sr. Member
  • ****
  • Posts: 336
  • Karma: 12
    • View Profile
    • Cloudfence
Re: SquidGuard - new plugin
« Reply #2 on: September 29, 2020, 02:23:21 pm »
Hi Raxid!

Seems that your blacklist database is not loading. 

Try the following (CLI):

Code: [Select]
configctl webfilter updatewfdb
This will fetch and build the blacklist WebUI. (set it on WebUI).

how to: https://forum.opnsense.org/index.php?topic=19084.0

Logged
Cloudfence Open Source Team

Raxid

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
Re: SquidGuard - new plugin
« Reply #3 on: September 29, 2020, 03:44:59 pm »
Hi Julio,

I had run the command in shell as root but still the error "No blacklist categories database found" not resolved.
Screenshot attached.

Logged

juliocbc

  • Sr. Member
  • ****
  • Posts: 336
  • Karma: 12
    • View Profile
    • Cloudfence
Re: SquidGuard - new plugin
« Reply #4 on: September 29, 2020, 05:10:56 pm »
How is this configured?

2-Set it in the Blacklist Categories URL
Logged
Cloudfence Open Source Team

Raxid

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
Re: SquidGuard - new plugin
« Reply #5 on: September 29, 2020, 07:00:42 pm »
Hi Julio,

Still after setting in the Blacklist Categories URL error still exist ,Further i am using Shallist .
Is this ok with the Blacklist?
Logged

juliocbc

  • Sr. Member
  • ****
  • Posts: 336
  • Karma: 12
    • View Profile
    • Cloudfence
Re: SquidGuard - new plugin
« Reply #6 on: September 29, 2020, 10:15:37 pm »
Please try with this: ftp://ftp.ut-capitole.fr/pub/reseau/cache/squidguard_contrib/blacklists.tar.gz
Logged
Cloudfence Open Source Team

Raxid

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
Re: SquidGuard - new plugin
« Reply #7 on: October 02, 2020, 12:36:44 pm »
Hi,

I had tried the provided blacklist but still the attached error occurs and squid guard not works.
Logged

juliocbc

  • Sr. Member
  • ****
  • Posts: 336
  • Karma: 12
    • View Profile
    • Cloudfence
Re: SquidGuard - new plugin
« Reply #8 on: October 02, 2020, 06:55:07 pm »
Raxid,

If you try to download this link in your desktop, is it working?
Logged
Cloudfence Open Source Team

Raxid

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
Re: SquidGuard - new plugin
« Reply #9 on: October 05, 2020, 10:00:03 am »
Hi Julio,

The link not works even on desktop.
Logged

juliocbc

  • Sr. Member
  • ****
  • Posts: 336
  • Karma: 12
    • View Profile
    • Cloudfence
Re: SquidGuard - new plugin
« Reply #10 on: October 05, 2020, 02:00:32 pm »
Hi Raxid,

Maybe you will need a proxy to bypass some geoip blocks.
Logged
Cloudfence Open Source Team

Raxid

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
Re: SquidGuard - new plugin
« Reply #11 on: October 05, 2020, 06:43:31 pm »
Hi Julio,

Can you please guide me hw to add proxy in Opnsense to bypass geoip blocks?
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • Development and Code Review (Moderator: fabian) »
  • SquidGuard - new plugin
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2