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

Unofficial E2guardian package for pfSense

Cache/Proxy
70
1.2k
1.4m
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.
  • K
    kenpachizaraki @pfsensation
    last edited by Oct 8, 2018, 5:37 AM

    @pfsensation using vlan on the LAN side.
    hhmmm maybe that's the issue...e2g does not support multi-wan - multi ISP setup.

    P 1 Reply Last reply Oct 8, 2018, 5:53 AM Reply Quote 0
    • P
      pfsensation @kenpachizaraki
      last edited by Oct 8, 2018, 5:53 AM

      @kenpachizaraki said in Unofficial E2guardian package for pfSense:

      @pfsensation using vlan on the LAN side.
      hhmmm maybe that's the issue...e2g does not support multi-wan - multi ISP setup.

      Ahhh that makes sense, your previous message wasn't too clear. If you're using E2 Guardian, and have transparent mode enabled it'll try to route the traffic through it. If you then have other rules outside E2 Guardian they maybe clashing with each other and hence why you're seeing traffic on both WAN lines.

      K 1 Reply Last reply Oct 8, 2018, 6:47 AM Reply Quote 0
      • K
        kenpachizaraki @pfsensation
        last edited by Oct 8, 2018, 6:47 AM

        @pfsensation ill try to setup vlan with no rules in it and ill check the usage on both ISP.

        P 1 Reply Last reply Oct 8, 2018, 6:56 AM Reply Quote 0
        • P
          pfsensation @kenpachizaraki
          last edited by Oct 8, 2018, 6:56 AM

          @kenpachizaraki said in Unofficial E2guardian package for pfSense:

          @pfsensation ill try to setup vlan with no rules in it and ill check the usage on both ISP.

          That'll probably eliminate the issues with activity seen on the second WAN link but the issues persists. E2guardian doesn't support multi WAN yet.

          K 1 Reply Last reply Oct 8, 2018, 7:21 AM Reply Quote 0
          • K
            kenpachizaraki @pfsensation
            last edited by Oct 8, 2018, 7:21 AM

            @pfsensation bumper!!! hope e2g will support multi-wan setup soon.
            it's norm nowadays that company have multiple wan

            1 Reply Last reply Reply Quote 0
            • A
              asterix @pfsensation
              last edited by Oct 9, 2018, 3:39 PM

              @pfsensation said in Unofficial E2guardian package for pfSense:

              @asterix said in Unofficial E2guardian package for pfSense:

              @pfsensation said in Unofficial E2guardian package for pfSense:

              @kenpachizaraki said in Unofficial E2guardian package for pfSense:

              @pfsensation said in Unofficial E2guardian package for pfSense:

              @marcelloc I had a look, it looks like e2guardian isn't defined in /etc/inc/service-utils.inc. I attempted to manually define it but wasn't too sure of the parameters. Can you shed some light? ✋

              @pfsensation is this resolve already? I will be deploying e2g tomorrow i dont want to have issue on pfsense crashing

              On your production system, don't upgrade to 2.4.4 yet. I still haven't been able to resolve that log rotation issue. For me it just crashes E2 Guardian once a day and it restarts itself. Barely even notice it but nevertheless its still an issue.

              Going to have to wait for @marcelloc to have a look at this. I tried some fixes but my knowledge of the inner workings of pfsense packages isn't great.

              It’s frustrating now. I tried a clean install but still have the issue with log rotation crash. No internet till I do a full reboot. Any response from @marcelloc ?

              For me sure E2 Guardian crashes for a second, but it's never so bad that my entire Internet dies until I reboot. Must be something config related, my block page is hosted separately on another nginx instance using the WPAD package. Maybe that's it?

              I've already let Marcello know about the issue, and I'm sure he knows as well from his own systems. For the time being, I am log rotating using Cron, yeah it's a bit of a pain. But at the end of the day, we have to realise that all the people who contribute to E2 Guardian, including myself do it in our spare time. Sometimes life gets in the way, sometimes work gets in the way. But things will be back to normal again, we just need to be patient.

              EDIT: Here's the simple command I'm using to literally wipe the access.log roughly every 8 hours (obviously scale this to meet your needs):
              echo -n "" > /var/log/e2guardian/access.log

              My issue is that e2 crashes and recovers during the log rotation but for some reason blocks all internet till I reboot it. The log rotation has been sketchy and I can't pin point the exact time. Sometimes e2 crashes in the middle of the day and my family is without internet till the time I come back home and reboot the VM instance.

              P 1 Reply Last reply Oct 9, 2018, 3:50 PM Reply Quote 0
              • P
                pfsensation @asterix
                last edited by Oct 9, 2018, 3:50 PM

                @asterix said in Unofficial E2guardian package for pfSense:

                @pfsensation said in Unofficial E2guardian package for pfSense:

                @asterix said in Unofficial E2guardian package for pfSense:

                @pfsensation said in Unofficial E2guardian package for pfSense:

                @kenpachizaraki said in Unofficial E2guardian package for pfSense:

                @pfsensation said in Unofficial E2guardian package for pfSense:

                @marcelloc I had a look, it looks like e2guardian isn't defined in /etc/inc/service-utils.inc. I attempted to manually define it but wasn't too sure of the parameters. Can you shed some light? ✋

                @pfsensation is this resolve already? I will be deploying e2g tomorrow i dont want to have issue on pfsense crashing

                On your production system, don't upgrade to 2.4.4 yet. I still haven't been able to resolve that log rotation issue. For me it just crashes E2 Guardian once a day and it restarts itself. Barely even notice it but nevertheless its still an issue.

                Going to have to wait for @marcelloc to have a look at this. I tried some fixes but my knowledge of the inner workings of pfsense packages isn't great.

                It’s frustrating now. I tried a clean install but still have the issue with log rotation crash. No internet till I do a full reboot. Any response from @marcelloc ?

                For me sure E2 Guardian crashes for a second, but it's never so bad that my entire Internet dies until I reboot. Must be something config related, my block page is hosted separately on another nginx instance using the WPAD package. Maybe that's it?

                I've already let Marcello know about the issue, and I'm sure he knows as well from his own systems. For the time being, I am log rotating using Cron, yeah it's a bit of a pain. But at the end of the day, we have to realise that all the people who contribute to E2 Guardian, including myself do it in our spare time. Sometimes life gets in the way, sometimes work gets in the way. But things will be back to normal again, we just need to be patient.

                EDIT: Here's the simple command I'm using to literally wipe the access.log roughly every 8 hours (obviously scale this to meet your needs):
                echo -n "" > /var/log/e2guardian/access.log

                My issue is that e2 crashes and recovers during the log rotation but for some reason blocks all internet till I reboot it. The log rotation has been sketchy and I can't pin point the exact time. Sometimes e2 crashes in the middle of the day and my family is without internet till the time I come back home and reboot the VM instance.

                Your machine is definitely failing more miserably. Have you checked to make are that you don't have other packages using the port 80/443? Such as pfblocker and the Web interface? A while back on very first versions of E2 Guardian on pfSense I used to get entire system crashes. After I sorted the things above, it's been stable as a rock.

                A 1 Reply Last reply Oct 11, 2018, 1:59 PM Reply Quote 0
                • A
                  asterix @pfsensation
                  last edited by Oct 11, 2018, 1:59 PM

                  @pfsensation I turned off logging completely and checked under Cron jobs and the log rotation script was removed onces I disabled logging. So far so good. 2 days with no issues.

                  Speaking for logging, is there a way to show the logs in graphs.. like which ip/subnet made what requests which were denied .. especially the denied ones.

                  1 Reply Last reply Reply Quote 0
                  • M
                    mococanet
                    last edited by Oct 15, 2018, 11:32 AM

                    hey guys, i'm using pfsense 2.4.4 + e2guardian-v5 but every day at midnight a crash system is reported:

                    PHP ERROR: Type: 1, File: /etc/inc/service-utils.inc, Line: 668, Message: Uncaught ArgumentCountError: Too few arguments to function service_control_stop(), 1 passed in /usr/local/www/e2guardian_logrotate.php on line 42 and exactly 2 expected in /etc/inc/service-utils.inc:668
                    Stack trace:
                    #0 /usr/local/www/e2guardian_logrotate.php(42): service_control_stop('e2guardian')
                    #1 {main}

                    I've seen some people with the same problems, has anyone managed to solve it?
                    thank you

                    P 1 Reply Last reply Oct 15, 2018, 12:10 PM Reply Quote 0
                    • P
                      pfsensation @mococanet
                      last edited by Oct 15, 2018, 12:10 PM

                      @mococanet said in Unofficial E2guardian package for pfSense:

                      hey guys, i'm using pfsense 2.4.4 + e2guardian-v5 but every day at midnight a crash system is reported:

                      PHP ERROR: Type: 1, File: /etc/inc/service-utils.inc, Line: 668, Message: Uncaught ArgumentCountError: Too few arguments to function service_control_stop(), 1 passed in /usr/local/www/e2guardian_logrotate.php on line 42 and exactly 2 expected in /etc/inc/service-utils.inc:668
                      Stack trace:
                      #0 /usr/local/www/e2guardian_logrotate.php(42): service_control_stop('e2guardian')
                      #1 {main}

                      I've seen some people with the same problems, has anyone managed to solve it?
                      thank you

                      For the time being, just turn off log rotation under reporting. The script has issues on 2.4.4.

                      1 Reply Last reply Reply Quote 0
                      • M
                        mococanet
                        last edited by Oct 15, 2018, 12:12 PM

                        @pfsensation said in Unofficial E2guardian package for pfSense:

                        For the time being, just turn off log rotation under reporting. The script has issues on 2.4.4.

                        thank you @pfsensation i'll do that. cheers!

                        1 Reply Last reply Reply Quote 0
                        • U
                          ucribrahim
                          last edited by ucribrahim Nov 1, 2018, 5:17 PM Oct 28, 2018, 7:28 PM

                          Hi,

                          As you might know, e2guardian "Log Rotation" feature doesn't work and it makes service crash if this feature enabled. I just wrote a shell script to solve this problem for now.

                          This shell script backup the e2guardian "access.log" file with tar command and then clean up inside of the file. Log rotation simply doing kind of this thing. Until the "log rotation" feature gets fixed, this option can be used.

                          Instructions

                          1. step : Disable "Log Rotation" feature under "Report and Log" menu and then Save it.

                          2. step : SSH to your pfsense and then go to /root directory and create necessary file. Also give executable permission.

                          Commands:

                          cd /root/
                          touch logrotate.sh
                          chmod u+x logrotate.sh
                          

                          3. step : Edit the file and copy/paste the code. Do not forget to Save and exit.

                          #!/bin/sh
                          
                          # Get current date.
                          date=$(date "+%Y%m%d-%H:%M")
                          
                          # Where are the log files in? (directory)
                          directory="/var/log/e2guardian"
                          
                          # Log files name 
                          file1name="access.log"
                          
                          # The directory where the log files (tar.gz) are going to be keep in.
                          backup_directory="/var/log/e2guardian/backups"
                          
                          # If backup directory doesn't exists, then create. If already created then go on.
                          
                          if [ ! -d $backup_directory ]; then
                                  mkdir $backup_directory
                                  echo "----------------------------------------------"
                                  echo "$backup_directory has been created!"
                                  echo "----------------------------------------------"
                          fi
                          
                          # Log rotate process(1).
                          
                          cd $directory
                          PWD=$(pwd)
                          
                          if [ $PWD/ = $directory/ ]; then
                                  [ ! -f $file1name ] && { echo "Opps! The file $file1name could not found! Check $directory directory!"; exit 1; }
                                  tar cvfz ${backup_directory}/${file1name}.${date}.tar.gz $file1name 2> /tmp/error.log
                                  if [ $? -ne 0 ]
                                  then
                                  echo "An error occurred while making a backup, see /tmp/error.log file."
                                  exit 3
                                  fi
                                  cat /dev/null > $file1name
                                  echo "$file1name has been cleaned! Date: $date. You can find backed up files in $backup_directory"
                                  rm /tmp/error.log
                          fi
                          
                          exit 0
                          
                          

                          4. step : Try to run the shell script and see the result. If you get error, let me know.

                          sh /root/logrotate.sh
                          
                          Output:
                          ----------------------------------------------
                          /var/log/e2guardian/backups has been created!
                          ----------------------------------------------
                          access.log has been cleaned! Date: 20181028-22:20. You can find backed up files in /var/log/e2guardian/backups
                          

                          Add Crontab

                          You also need to write crontab on pfsense to make this script works end of the day everyday. Or you can configure the date and time as you wish.

                          Install "cron" package first.

                          Example crontab.

                          Minute: 30
                          Hour: 23
                          Day of the Month : *
                          Month of the Year : *
                          Day of the Week : *
                          User : root
                          Command : sh /root/logrotate.sh

                          Do not forget to restart cron service.

                          service cron onerestart
                          

                          That's all for now.)
                          My github account: https://github.com/lifeoverlinux

                          ” Online pfSense Firewall & Router Eğitimi | www.udemy.com/pfsense-training “

                          1 Reply Last reply Reply Quote 1
                          • P
                            pfsensation
                            last edited by Nov 2, 2018, 6:34 AM

                            New update for E2 Guardian is pushed out to repo:

                            • Binaries updated to latest
                            • Log rotation error fix
                            • I also pushed out some fixes for Neterror (missing files)

                            ** You may need to manually download the black list through the blacklist tab after updating if you get a dir error.

                            R 1 Reply Last reply Nov 5, 2018, 2:24 AM Reply Quote 1
                            • R
                              ravegen @pfsensation
                              last edited by ravegen Nov 5, 2018, 2:35 AM Nov 5, 2018, 2:24 AM

                              @pfsensation

                              after updating the e2guardian package, I am having issues on the system logs that says on the screenshot.

                              I am using Content Scanner clamdscan. I have already up to date freshclam. But if my clamdscan content scanner is selected, e2guardian wont start but if not selected, e2guardian starts.

                              How do you solve that error ?

                              login-to-view

                              P 1 Reply Last reply Nov 5, 2018, 5:33 AM Reply Quote 0
                              • Sei PineS
                                Sei Pine
                                last edited by Nov 5, 2018, 3:03 AM

                                Hello, i followed the instructions on the first post on how to make e2guardian pop out on system > packages but it seems it doesn't work. am i doing something wrong ?

                                i also did try patching System > Patches provided by the thread owner, still no e2guardian on packages.

                                P 1 Reply Last reply Nov 5, 2018, 5:34 AM Reply Quote 0
                                • P
                                  pfsensation @ravegen
                                  last edited by Nov 5, 2018, 5:33 AM

                                  @ravegen said in Unofficial E2guardian package for pfSense:

                                  @pfsensation

                                  after updating the e2guardian package, I am having issues on the system logs that says on the screenshot.

                                  I am using Content Scanner clamdscan. I have already up to date freshclam. But if my clamdscan content scanner is selected, e2guardian wont start but if not selected, e2guardian starts.

                                  How do you solve that error ?

                                  login-to-view

                                  The AV isn't something I have tested or used yet as I find Clam's signatures not very good. Did you attempt a reinstall? According to the errors there are some configs missing.

                                  R 1 Reply Last reply Nov 6, 2018, 1:08 AM Reply Quote 0
                                  • P
                                    pfsensation @Sei Pine
                                    last edited by Nov 5, 2018, 5:34 AM

                                    @sei-pine said in Unofficial E2guardian package for pfSense:

                                    Hello, i followed the instructions on the first post on how to make e2guardian pop out on system > packages but it seems it doesn't work. am i doing something wrong ?

                                    i also did try patching System > Patches provided by the thread owner, still no e2guardian on packages.

                                    You've most likely not applied the patch correctly. From 2.4.4 pfSense by default hides any packages that aren't official.

                                    Sei PineS 1 Reply Last reply Nov 5, 2018, 6:05 AM Reply Quote 0
                                    • Sei PineS
                                      Sei Pine @pfsensation
                                      last edited by Nov 5, 2018, 6:05 AM

                                      @pfsensation i did applied the patch provided on github. can you pls help me on how to patch it correctly ?

                                      U 1 Reply Last reply Nov 5, 2018, 8:34 AM Reply Quote 0
                                      • U
                                        ucribrahim @Sei Pine
                                        last edited by ucribrahim Nov 5, 2018, 8:35 AM Nov 5, 2018, 8:34 AM

                                        @sei-pine Well, let me help you. @pfsensation helped me how to do that, when I was trying to do this patch thing. Now I help you then you'll help someone else.)

                                        1. Install "patch" package from package manager.
                                        2. System > Patches > click "Add New Patch" button.
                                          Description: e2guardian patch
                                          URL/Commit ID: Leave empty
                                          Patch Contents: Copy/Paste all codes from here
                                          Path Strip Count: 1
                                          Base Directory: /
                                          Ignore Whitespace: Clicked
                                          Auto Apply: Clicked
                                        3. Save and then click "Apply" button.

                                        That's all for now. Now go to shell and add repo of e2guardian by following command.

                                        fetch -q -o /usr/local/etc/pkg/repos/Unofficial.conf https://raw.githubusercontent.com/marcelloc/Unofficial-pfSense-packages/master/Unofficial.24.conf
                                        

                                        Go to Package Manager and try to search e2guardian. If you don't see any package reboot system.

                                        It's working!

                                        ” Online pfSense Firewall & Router Eğitimi | www.udemy.com/pfsense-training “

                                        Sei PineS 1 Reply Last reply Nov 5, 2018, 8:41 AM Reply Quote 0
                                        • Sei PineS
                                          Sei Pine @ucribrahim
                                          last edited by Sei Pine Nov 5, 2018, 8:45 AM Nov 5, 2018, 8:41 AM

                                          @ucribrahim hello! thanks for the reply, but the patch just doesn't work on me. i manually applied the given patch code ($repo_param = "";) in pkg-util.inc on line 388, saved then e2guardian popped out on System > Packages.

                                          login-to-view

                                          gonna try it out on my test lab when i got time, thanks again.

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