Giter Club home page Giter Club logo

dshieldpfsense's Issues

Script fails afte upgrade to pfsense-2.5.0

After upgrading to PFSense 2.5.0 I get this error in my system.log after running dshieldpfsense.php

PHP ERROR: Type: 64, File: /root/bin/dshieldpfsense.php, Line: 88, Message: require_once(): Failed opening required 'filter_log.inc' (include_path='.:/etc/inc:/etc/inc/web:/usr/local/www:/usr/local/captiveportal:/usr/local/pkg:/usr/local/www/classes:/usr/local/www/classes/Form:/usr/local/share/pear:/usr/local/share/openssl_x509_crl/')

Please advice how to solve this.

Logging of lines sent doesn't work in pfSense 2.4 and later

dshield.php contains the following code for sending a report in pfSense 2.4 and later :

                //pfsense 2.4
                if(send_smtp_message_24()) {
                log_error(sprintf(gettext("%d lines sent to DShield OK"), $linecnt));
                        print "send $linecnt lines to DShield OK\n";
                }
...
function send_smtp_message_24() {
...
        if (PEAR::isError($mail)) {
                $err_msg = sprintf(gettext(
                    'Could not send the message to %1$s -- Error: %2$s'),
                    $toaddr, $mail->getMessage());
                print $err_msg;
                log_error($err_msg);
                return($err_msg);
        }
    
        return;

That is, on failure send_smtp_message_24() will print and log an error message and return that and the calling code will then print and log a message about the number of lines sent to DShield, which seems like a bug.

One approach is to move the code that logs and prints the number of lines sent inside send_smtp_message_24(), like what's done in send_smtp_message_23(). Alternatively, the check in the calling code should be that send_smtp_message_24 returns a null string.

Script fails on PFsense 2.4.4

I made the following changes required to get the script to run error free:

Replaced "split" with "preg_split" on lines 33 & 34:

$interfaces=preg_split(',',$config['interfaces']);
$authorized_source_ip=preg_split(',',$config['authorized_source_ip']);

However, when the script is run the pfsense System Log reports:

/root/bin/dshield.php: no new lines added to log since last run OK.....

Even though there are new rejected packets in the log. This is preventing email to be sent to dshield or any CC: address.

Additional question, please clarify the purpose of a new dshield.ini item:

#prevent auto ban ...
authorized_source_ip="172.16.0.60,10.0.0.100"

Getting PHP error on pfsense+ 23.01...

I'm getting the following error after running ./dshieldpfsense.php:

PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /root/bin/dshieldpfsense.php:156
Stack trace:
#0 {main}
thrown in /root/bin/dshieldpfsense.php on line 156

Some config settings ignored in dshield.php

Configuration settings such as 'ccaddr' are ignored in dshield.php because the $config array gets overwritten when processing the functions.inc include. One solution is to rename the array in the script (eg, $config -> $dshield_config) for those settings intended to be defined in dshield.ini.

Note, though, that notification settings (eg, $config['notifications']['smtp']['ipaddress']) are defined not in dshield.ini but in /cf/conf/config.xml and thus should not be renamed.

Script fails on PFsense 2.4.3

The files sasl.inc and smtp.inc are not in the 2.4.3 build, so the includes at lines 87 and 88 fail. They were deprecated and have since been removed in the 2.4 trunk. (see https://www.netgate.com/blog/2-4-pre-alpha-snapshots-now-available.html). With these two files commented out, it does appear to allow the script to work however without the smtp submission.

In addition, the isset on lines 75, and 79 do not appear to work (passed the check wether or not they should.)

Running script in 2.4

pfSense 2.4 was released. Unfortunately the script silently stopped working on 2.4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.