Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    E2guardian package for pfsense - $??

    Scheduled Pinned Locked Moved Bounties
    218 Posts 44 Posters 137.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mwebb
      last edited by

      I discovered that e2guardian can be automatically started by adding 2 more steps to the manual install procedure ( http://knes1.github.io/blog/2015/2015-07-18-manually-installing-e2guardian-to-pfsense.html ).

      1. Rename /usr/local/etc/rc.d/e2guardian to e2guardian.sh
      2. Change the following text from NO to YES inside the file ": ${e2guardian_enable:=YES}"

      Now the service can also be started and stopped from the services display.

      For Step 8 of the manual install procedure, I suggest running the ssh commands as a bash shell script, but first bash must be installed:

      pkg install bash
      cp /usr/local/bin/bash /bin/

      make sure that you are in the following directory
      cd /root/pfsense-packages-be599ee41b2567459b1eaf55fff4ecb2ad3fa4ff/config/e2guardian/

      Create new file myscript.sh (I use winscp from Windows) with #!/bin/bash at the beginning and copy and paste all the commands from Step 8, save it, make it executable and execute it
      chmod +x myscript.sh
      bash myscript.sh

      For Step 9 there is a typo (purely cosmetic) for the menu xml. Change the 2 places of E2guradian to E2Guardian in the following lines for the menu to display correctly.

      <menu>
      <name>E2guradian</name>
      <tooltiptext>E2guradian</tooltiptext>
      Services
      <configfile>e2guardian.xml</configfile>
      </menu>

      1 Reply Last reply Reply Quote 0
      • J
        jetberrocal
        last edited by

        This thread from e2guardian forum shows hot to activate SSL support for FREEBSD using the ports.

        The same procedure can be used to turn other options that are turn off in the current package.

        What I am missing is how to get the e2guardian to be package with the SSL support or other turned on option to be able to install it in pfsense.

        1 Reply Last reply Reply Quote 0
        • J
          jetberrocal
          last edited by

          In the following thread you can find how to compile and package the e2guardian software for pfsense with the last FreeBSD ports version.

          You can activate MITM SSL support and other options.

          https://forum.pfsense.org/index.php?topic=115276.msg658813#msg658813

          Some e2guardian configurations have to be made directly on conf files.  This present a problem.

          Every time you make configuration changes through the GUI and save, the custom/manual settings are removed.

          I guess will need to modify some of the scripts in order to keep the manual settings.  This will present a challenge.

          1 Reply Last reply Reply Quote 0
          • J
            jetberrocal
            last edited by

            Maybe someone can modify the GUI scripts to include a custom text box field in the Groups section and the General section.

            Such that in the custom box anyone could add the settings not implemented in the GUI.

            For example the "nocheckcertsitelist" setting is not available for the Groups configuration.

            I guess for the e2guardian version the GUI was intended did not had that setting available at the moment of programming it.

            With the custom boxes the GUI can be extended to new versions by appending the box's text to the GUI generated configurations.

            1 Reply Last reply Reply Quote 0
            • J
              jetberrocal
              last edited by

              @marcelloc:

              I've started fixing packages to 2.3. If postfix gets merged and works fine, e2guardian(on current port version) is on the list.

              Marcelloc.  I have not seen you comment in this thread since December/2015.

              Could you evaluate making the changes I am suggesting?

              https://forum.pfsense.org/index.php?topic=87526.msg661002#msg661002

              1 Reply Last reply Reply Quote 0
              • M
                Mobile_Bob
                last edited by

                I see that postfix was denied… My guess is he is out...  I HOPE not, but...  Someone else may have to take over the package.  I'm a little disappointed since many people including myself donated money toward this package.  I could understand if e2guardian was also denied, but as far as I know it's still just incomplete.

                It's also possible that PFSense would deny this package as well.  It's not as cumbersome as postfix is, but I don't know what direction they are moving since previously the postfix package was approved...  :'(

                1 Reply Last reply Reply Quote 0
                • P
                  pfsensation
                  last edited by

                  This really would've been a big step forward for PfSense firewall, as web filtering goes. The standard SquidGuard is a nightmare. Really would've loved that HTTPS scanning :(

                  1 Reply Last reply Reply Quote 0
                  • A
                    aGeekhere
                    last edited by

                    for now just force google and bing into safe search

                    Never Fear, A Geek is Here!

                    1 Reply Last reply Reply Quote 0
                    • J
                      jetberrocal
                      last edited by

                      Here is some summary to install the current e2guardian in psense:

                      1. Create a virtual machine with FreeBSD 10.3 or the same version of your pfsense's FreeBSD.
                      Make sure it has Internet access and connectivity to your pfsense machine

                      2. Fetch e2guardian from FreeBSD ports

                      pkg add http://pkg.freebsd.org/freebsd:10:x86:64/latest/All/e2guardian-3.4.0.3.txz

                      Fetching e2guardian-3.4.0.3.txz

                      3. Please have a look at https://www.freshports.org/www/e2guardian/ - by default SSL=off: by default- you need to switch it on.

                      portsnap fetch extract update && cd /usr/ports/www/e2guardian

                      make config

                      At this stage you need to check SSL to build e2g with SSL support or check other build options you need.

                      make install clean

                      4. Create package for personal use.

                      make package

                      But it says to run "portlint -CN" and that gives an error.
                      That portlint is only relevant if your developing a package yourself.
                      In this case your compiling an existing package and probably safe to ignore the portlint 'error' about to much files and cleanup to be done..

                      5. Copy the created package to your pfsense machine. 
                      If your FreeBSD virtual machine does not have a web server then use ftp or scp to transfer the file
                      If your FreeBSD virtual machine has a web server that can serve the package you can repeat step #2 using the corresponding path.

                      6. Install package
                      If you copied the package using the web server method the package is already installed.
                      If you copied the package by other means then install package
                      #pkg add pkgcopiedpath

                      There is a procedure to install a GUI for e2guardian but I do not recommend it because it was made for a really older version of e2g.

                      There is another problem that has to be addressed.  The mitm error page is made for apache as main web server.
                      pfsense uses gnix as main web server, so you have to configure e2g to use another web server or find a way to use gnix.
                      I use other web server so I can not help you with the gnix option.

                      It wont be easy to use the gnix.  I think you will have to change the pfsense https web site to use other ssl port
                      as e2g will need the default ssl port to serve the error page.  Before there where vhosts package available but now you have to do it withou the vhosts package.

                      1 Reply Last reply Reply Quote 0
                      • marcellocM
                        marcelloc
                        last edited by

                        Take a look on this thread for 2.3.x install instructions

                        https://forum.pfsense.org/index.php?topic=128116.0

                        Treinamentos de Elite: http://sys-squad.com

                        Help a community developer! ;D

                        1 Reply Last reply Reply Quote 0
                        • J
                          jetberrocal
                          last edited by

                          I looked into the script and see that it will install e2guardian from freebsd ports as is, with defaults.

                          If anyone wants to use mitm with e2g the defaults wont work.

                          I do not know if pfsense will let you run "make config" and then "make install" to activate the ssl support option.

                          I think it wont because "make" requires to have compilation packages in the system.

                          1 Reply Last reply Reply Quote 0
                          • marcellocM
                            marcelloc
                            last edited by

                            @jetberrocal:

                            I looked into the script and see that it will install e2guardian from freebsd ports as is, with defaults.

                            If anyone wants to use mitm with e2g the defaults wont work.

                            I do not know if pfsense will let you run "make config" and then "make install" to activate the ssl support option.

                            I think it wont because "make" requires to have compilation packages in the system.

                            If it's compiling fine on freebsd, I'll do soon a ssl compile to update the GUI to accept it and also test the upcoming v4

                            Treinamentos de Elite: http://sys-squad.com

                            Help a community developer! ;D

                            1 Reply Last reply Reply Quote 0
                            • J
                              jetberrocal
                              last edited by

                              In freebsd I run "make config" and then "make install" to activate the ssl support option.  It worked successfully.

                              1 Reply Last reply Reply Quote 0
                              • marcellocM
                                marcelloc
                                last edited by

                                @jetberrocal:

                                In freebsd I run "make config" and then "make install" to activate the ssl support option.  It worked successfully.

                                I've just create a 3.5.1 pkg on freebsd and installed on pfSense

                                
                                e2guardian 3.5.1
                                
                                Built with:  '--localstatedir=/var' '--with-logdir=/var/log' '--with-piddir=/var/run' '--enable-fancydm' '--disable-clamd' '--disable-commandline' '--disable-dnsauth' '--disable-email' '--disable-icap' '--disable-kavd' '--enable-ntlm' '--enable-trickledm' '--with-filedescriptors=4096' '--prefix=/usr/local' '--mandir=/usr/local/man' '--infodir=/usr/local/info/' '--build=amd64-portbld-freebsd10.2' 'build_alias=amd64-portbld-freebsd10.2' 'CXX=c++' 'CXXFLAGS=-O2 -pipe -I/usr/local/include -D__SSLMITM -D__SSLCERT -DLIBICONV_PLUG -fstack-protector -fno-strict-aliasing  -DLIBICONV_PLUG' 'LDFLAGS= -lssl -lcrypto -fstack-protector' 'LIBS=' 'CPPFLAGS=-I/usr/local/include -DLIBICONV_PLUG' 'CC=cc' 'CFLAGS=-O2 -pipe  -I/usr/local/include -D__SSLMITM -D__SSLCERT -DLIBICONV_PLUG -fstack-protector -fno-strict-aliasing' 'CPP=cpp' 'PKG_CONFIG=pkgconf'
                                
                                

                                and v4 beta too…

                                I'll see what will need to change on config files...

                                Treinamentos de Elite: http://sys-squad.com

                                Help a community developer! ;D

                                1 Reply Last reply Reply Quote 0
                                • J
                                  jetberrocal
                                  last edited by

                                  Thank you marcelloc.  I think that most of the guys waiting for e2g are expecting it with ssl support.

                                  When do you expect for the package to be accepted in the freebsd ports?

                                  1 Reply Last reply Reply Quote 0
                                  • marcellocM
                                    marcelloc
                                    last edited by

                                    @jetberrocal:

                                    Thank you marcelloc.  I think that most of the guys waiting for e2g are expecting it with ssl support.

                                    When do you expect for the package to be accepted in the freebsd ports?

                                    I did a first lookup on confi file changes. It will need some work to include all new features. But I could get ssl support working.  ;D
                                    I'll update the install process soon

                                    On the todo list I'll include on help tab a way to see what package gui you are using and if there is an update.

                                    If anybody wants to help the migration process, just look the TODO texts on e2gardian.conf.template and e2guardianfx.conf.template files on mu github repo.

                                    Treinamentos de Elite: http://sys-squad.com

                                    Help a community developer! ;D

                                    1 Reply Last reply Reply Quote 0
                                    • marcellocM
                                      marcelloc
                                      last edited by

                                      Package install now includes 3.5.1 version with ssl support.

                                      Treinamentos de Elite: http://sys-squad.com

                                      Help a community developer! ;D

                                      1 Reply Last reply Reply Quote 0
                                      • J
                                        jetberrocal
                                        last edited by

                                        @marcelloc:

                                        @jetberrocal:

                                        In freebsd I run "make config" and then "make install" to activate the ssl support option.  It worked successfully.

                                        I've just create a 3.5.1 pkg on freebsd and installed on pfSense

                                        
                                        e2guardian 3.5.1
                                        
                                        Built with:  '--localstatedir=/var' '--with-logdir=/var/log' '--with-piddir=/var/run' '--enable-fancydm' '--disable-clamd' '--disable-commandline' '--disable-dnsauth' '--disable-email' '--disable-icap' '--disable-kavd' '--enable-ntlm' '--enable-trickledm' '--with-filedescriptors=4096' '--prefix=/usr/local' '--mandir=/usr/local/man' '--infodir=/usr/local/info/' '--build=amd64-portbld-freebsd10.2' 'build_alias=amd64-portbld-freebsd10.2' 'CXX=c++' 'CXXFLAGS=-O2 -pipe -I/usr/local/include -D__SSLMITM -D__SSLCERT -DLIBICONV_PLUG -fstack-protector -fno-strict-aliasing  -DLIBICONV_PLUG' 'LDFLAGS= -lssl -lcrypto -fstack-protector' 'LIBS=' 'CPPFLAGS=-I/usr/local/include -DLIBICONV_PLUG' 'CC=cc' 'CFLAGS=-O2 -pipe  -I/usr/local/include -D__SSLMITM -D__SSLCERT -DLIBICONV_PLUG -fstack-protector -fno-strict-aliasing' 'CPP=cpp' 'PKG_CONFIG=pkgconf'
                                        
                                        

                                        and v4 beta too…

                                        I'll see what will need to change on config files...

                                        Marcelloc.

                                        Just received noticed there is a critical error with Google Chrome that was fixed on e2g 4.1

                                        Please provide some partial package using this version as soon as posible, as previous versions are unusable due to the Chrome error. 
                                        It says to be backward compatible.

                                        1 Reply Last reply Reply Quote 0
                                        • marcellocM
                                          marcelloc
                                          last edited by

                                          It's already updated. Just rerun the installation script.

                                          https://github.com/marcelloc/Unofficial-pfSense-packages/commit/36678fe4cb3868065f5f84d90796c76fe515045c

                                          Treinamentos de Elite: http://sys-squad.com

                                          Help a community developer! ;D

                                          1 Reply Last reply Reply Quote 0
                                          • J
                                            jetberrocal
                                            last edited by

                                            @marcelloc:

                                            It's already updated. Just rerun the installation script.

                                            https://github.com/marcelloc/Unofficial-pfSense-packages/commit/36678fe4cb3868065f5f84d90796c76fe515045c

                                            Thank you for your excellent work.

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.