Netgate SG-1000 microFirewall

Author Topic: Unofficial E2guardian package for pfSense  (Read 27772 times)

0 Members and 1 Guest are viewing this topic.

Offline Stewart

  • Full Member
  • ***
  • Posts: 255
  • Karma: +16/-2
    • View Profile
Re: Unofficial E2guardian package for pfSense
« Reply #30 on: April 05, 2017, 12:08:51 pm »
FYI:

When I go to ACLs -> Antivirus, the lower menu bar disappears. 
When I go to ACLs -> Search Engine, Both menu bars disappear.

It's a missing div on pkg_edit.php I've updated on install script.


EDIT

to apply the fix/update manually, under system_patches package, create a new patch with this info




Code: [Select]
--- pkg_edit.orig.php        2017-04-05 16:25:04.960401000 +0000
+++ pkg_edit.php 2017-04-03 22:56:33.184313000 +0000
@@ -651,6 +651,7 @@
 if ($savehelp) {
        $savebutton->setHelp($savehelp);
 }
+?><div id='mainarea'></div><?
 $form = new Form($savebutton);

 $form->addGlobal(new Form_Input(

folder /usr/local/www/

Applying the patch gives me:

Code: [Select]
/usr/bin/patch --directory=/usr/local/www/ -t -p1 -i /var/patches/58e51d1fade80.patch --check --forward --ignore-whitespace

Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- pkg_edit.orig.php        2017-04-05 16:25:04.960401000 +0000
|+++ pkg_edit.php 2017-04-03 22:56:33.184313000 +0000
--------------------------
Patching file pkg_edit.php using Plan A...
Hunk #1 failed at 651.
1 out of 1 hunks failed while patching pkg_edit.php
done

Offline Stewart

  • Full Member
  • ***
  • Posts: 255
  • Karma: +16/-2
    • View Profile
Re: Unofficial E2guardian package for pfSense
« Reply #31 on: April 05, 2017, 12:12:04 pm »
How do we download the blacklists for them to work?

Select the option Download and update now, save, then back it to never or the update frequency You selected before.

I'll change it to a Download and update button soon to keep it easy to use.

Once it's downloaded and updated, I'll receive an system alert on gui.

Thanks for the feedback

Hmmm.  That's what I did.  I get the alert of "E2guardian - Blacklist update process started" but never one that it completes.  How can I see what's going on?

Offline Stewart

  • Full Member
  • ***
  • Posts: 255
  • Karma: +16/-2
    • View Profile
Re: Unofficial E2guardian package for pfSense
« Reply #32 on: April 05, 2017, 12:21:26 pm »
How do we download the blacklists for them to work?

Select the option Download and update now, save, then back it to never or the update frequency You selected before.

I'll change it to a Download and update button soon to keep it easy to use.

Once it's downloaded and updated, I'll receive an system alert on gui.

Thanks for the feedback

Hmmm.  That's what I did.  I get the alert of "E2guardian - Blacklist update process started" but never one that it completes.  How can I see what's going on?

I just ran the Download and Update Now and shortly thereafter got 2 instances less than a minute apart of "E2guardianBlacklist applied, check site and URL access lists for categories", but it still gives me the same error.  I checked the folder structure and there is no /usr/local/etc/e2guardian/lists/blacklists/adult folder.  Do we need to manually edit the config file to match the directory structure?

EDIT:
The List in Config doesn't match the structure in /usr/local/etc/e2guardian/lists/blacklists/ at all.  Is that normal?

EDIT2:
Or I could just select from the Include box instead, like a normal person...
« Last Edit: April 05, 2017, 12:36:58 pm by Stewart »

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 13398
  • Karma: +589/-7
    • View Profile
Re: Unofficial E2guardian package for pfSense
« Reply #33 on: April 05, 2017, 01:28:20 pm »
Code: [Select]
[quote author=Stewart link=topic=128116.msg708370#msg708370 date=1491412131]
.patch --check --forward --ignore-whitespace

Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- pkg_edit.orig.php        2017-04-05 16:25:04.960401000 +0000
|+++ pkg_edit.php 2017-04-03 22:56:33.184313000 +0000
--------------------------
Patching file pkg_edit.php using Plan A...
Hunk #1 failed at 651.
1 out of 1 hunks failed while patching pkg_edit.php
done
[/quote]

What pfSense version are you using?
I'm on 2.3.3

Offline Cino

  • Hero Member
  • *****
  • Posts: 1516
  • Karma: +61/-2
    • View Profile
Re: Unofficial E2guardian package for pfSense
« Reply #34 on: April 05, 2017, 02:11:10 pm »
Need to figure out an easy/clean way to convert my old Dansguardian config to E2guardian (within the config.xml)

Easy as renaming it on xml(except for some config change from dansguardian to e2guardian) but I can help with a php script if you want.

I ran into some errors over the weekend when I tried it. I need to take another look and try again. I did rename everything from that had danguardian using find/replace. This time, I'll just focus on the ACL, Groups, IPs sections of the XML.

Thank you for the offer, I think Im good for now unless there is a need for it by the community

Offline Stewart

  • Full Member
  • ***
  • Posts: 255
  • Karma: +16/-2
    • View Profile
Re: Unofficial E2guardian package for pfSense
« Reply #35 on: April 05, 2017, 02:39:53 pm »
So, it appears to be working if I set a computer to proxy at port 8080 but not when passed to Squid transparently.  From your previous response I see the IP and port should be defined on the Daemon tab but that appears to already be set properly by default and the config file shows proxyip=127.0.0.1 and proxyport=3128.  On the General tab I've tried several options and combinations for Auth Plugins but it doesn't seem to be filtering through Squid.

Squid is running on port 3128 with all boxes in advanced being empty.  Would it matter that I still have Squidguard installed but disabled?

Offline Stewart

  • Full Member
  • ***
  • Posts: 255
  • Karma: +16/-2
    • View Profile
Re: Unofficial E2guardian package for pfSense
« Reply #36 on: April 05, 2017, 02:40:21 pm »
Code: [Select]
[quote author=Stewart link=topic=128116.msg708370#msg708370 date=1491412131]
.patch --check --forward --ignore-whitespace

Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- pkg_edit.orig.php        2017-04-05 16:25:04.960401000 +0000
|+++ pkg_edit.php 2017-04-03 22:56:33.184313000 +0000
--------------------------
Patching file pkg_edit.php using Plan A...
Hunk #1 failed at 651.
1 out of 1 hunks failed while patching pkg_edit.php
done

What pfSense version are you using?
I'm on 2.3.3
[/quote]

2.3.3-RELEASE-p1 (amd64)
built on Thu Mar 09 07:17:41 CST 2017
FreeBSD 10.3-RELEASE-p17

It doesn't bother me all that much.  I can make the change manually.  It was more for your benefit so that you could get it fixed for future installs.

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 13398
  • Karma: +589/-7
    • View Profile
Re: Unofficial E2guardian package for pfSense
« Reply #37 on: April 05, 2017, 02:45:18 pm »
It doesn't bother me all that much.  I can make the change manually.  It was more for your benefit so that you could get it fixed for future installs.

Sure. I'll test all install process(including blacklist) on a 2.3.3_p1 version too.

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 13398
  • Karma: +589/-7
    • View Profile
Re: Unofficial E2guardian package for pfSense
« Reply #38 on: April 05, 2017, 03:00:50 pm »
Hmmm.  That's what I did.  I get the alert of "E2guardian - Blacklist update process started" but never one that it completes.  How can I see what's going on?

Code: [Select]
/usr/local/www/e2guardian.php fetch_blacklist


This is the script that fetches and apply the blacklist.

Offline Stewart

  • Full Member
  • ***
  • Posts: 255
  • Karma: +16/-2
    • View Profile
Re: Unofficial E2guardian package for pfSense
« Reply #39 on: April 05, 2017, 03:18:24 pm »
Awesome, thanks!  Now that it seems to be working, any advice on getting it to work with Squid transparently?

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 13398
  • Karma: +589/-7
    • View Profile
Re: Unofficial E2guardian package for pfSense
« Reply #40 on: April 05, 2017, 04:45:24 pm »
Awesome, thanks!  Now that it seems to be working, any advice on getting it to work with Squid transparently?

Dansguardian as two work modes.

The sandwich mode, where there is a squid -> e2guardian -> tinyproxy or any other cache

Or the starndard mode where it stays in front of squid or any other cache and try to forward client authentication requests

What mode are you using?

E2guardian transparent mode while in front of squid is setup manually, creating a nat rule pointing to its listening port.

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 13398
  • Karma: +589/-7
    • View Profile
Re: Unofficial E2guardian package for pfSense
« Reply #41 on: April 05, 2017, 05:51:51 pm »
I've moved the download and apply blacklist options from combo values to buttons on xml

« Last Edit: April 05, 2017, 08:16:28 pm by marcelloc »

Offline Cino

  • Hero Member
  • *****
  • Posts: 1516
  • Karma: +61/-2
    • View Profile
Re: Unofficial E2guardian package for pfSense
« Reply #42 on: April 06, 2017, 06:57:22 am »
It might be just my setup but there isn't any defaults for the 4 options under Anti-Virus. The boxes have no text. Also, under Search Engine there are no options only an Add/Save button. Click on Add, no options; only save. I downloaded the latest xml files this morning.

running on
2.3.4-DEVELOPMENT (amd64)
built on Tue Apr 04 16:31:17 CDT 2017
FreeBSD 10.3-RELEASE-p17

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 13398
  • Karma: +589/-7
    • View Profile
Re: Unofficial E2guardian package for pfSense
« Reply #43 on: April 06, 2017, 07:01:45 am »
I'll test it today.

I'm also including the ssl group options introduced on e2guardian since 3.1 version

Offline Stewart

  • Full Member
  • ***
  • Posts: 255
  • Karma: +16/-2
    • View Profile
Re: Unofficial E2guardian package for pfSense
« Reply #44 on: April 06, 2017, 10:22:15 am »
Awesome, thanks!  Now that it seems to be working, any advice on getting it to work with Squid transparently?

Dansguardian as two work modes.

The sandwich mode, where there is a squid -> e2guardian -> tinyproxy or any other cache

Or the starndard mode where it stays in front of squid or any other cache and try to forward client authentication requests

What mode are you using?

E2guardian transparent mode while in front of squid is setup manually, creating a nat rule pointing to its listening port.

It would be transparent.  SquidGuard doesn't need any NAT rules and just integrates with Squid.  Does e2Guardian not behave the same way?  I want it transparent with Squid so do I need a NAT rule that points LAN 80 to LAN 8080 and then e2G will automatically forward to Squid?