From e0c80e78f616b11c327188e8908731d85eb199fe Mon Sep 17 00:00:00 2001
From: bmeeks8
Date: Sun, 19 Jan 2014 23:05:35 -0500
Subject: Declare $config as global to fix problems on pkg install.
---
config/snort/snort_check_for_rule_updates.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config/snort/snort_check_for_rule_updates.php b/config/snort/snort_check_for_rule_updates.php
index 807b7844..0306c90d 100755
--- a/config/snort/snort_check_for_rule_updates.php
+++ b/config/snort/snort_check_for_rule_updates.php
@@ -34,7 +34,7 @@ require_once("functions.inc");
require_once("service-utils.inc");
require_once "/usr/local/pkg/snort/snort.inc";
-global $g, $pkg_interface, $snort_gui_include, $rebuild_rules;
+global $g, $config, $pkg_interface, $snort_gui_include, $rebuild_rules;
if (!defined("VRT_DNLD_URL"))
define("VRT_DNLD_URL", "https://www.snort.org/reg-rules/");
--
cgit v1.2.3
From 19016394152847b136ca0a1c02f498fa04ddba51 Mon Sep 17 00:00:00 2001
From: bmeeks8
Date: Sun, 19 Jan 2014 23:06:54 -0500
Subject: Tidy up syntax to match other include file calls.
---
config/snort/snort_post_install.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config/snort/snort_post_install.php b/config/snort/snort_post_install.php
index 003628be..bfb7bb9c 100644
--- a/config/snort/snort_post_install.php
+++ b/config/snort/snort_post_install.php
@@ -1409,7 +1409,7 @@ if ($config['installedpackages']['snortglobal']['forcekeepsettings'] == 'on') {
update_output_window(gettext("Please wait... downloading and updating configured rule types..."));
if ($pkg_interface <> "console")
$snort_gui_include = true;
- include "/usr/local/pkg/snort/snort_check_for_rule_updates.php";
+ include("/usr/local/pkg/snort/snort_check_for_rule_updates.php");
update_status(gettext("Generating snort.conf configuration file from saved settings..."));
$rebuild_rules = true;
--
cgit v1.2.3
From 9a33bc918c1078402479101249b770ebc7e64d6b Mon Sep 17 00:00:00 2001
From: Stephane Lapie
Date: Mon, 20 Jan 2014 16:03:33 +0900
Subject: Separate CAs for client certs and server cert chain
- Modified the VirtualHost screen to make more clear the difference between "server certificate chain" and "client certification authority"
- Modified configuration generation accordingly with proper options (SSLCertificateChainFile for server cert chain, SSLCACertificateFile for client certificates) according to Apache documentation
---
config/apache_mod_security-dev/apache_mod_security.inc | 9 +++++++--
config/apache_mod_security-dev/apache_virtualhost.xml | 14 ++++++++++++--
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/config/apache_mod_security-dev/apache_mod_security.inc b/config/apache_mod_security-dev/apache_mod_security.inc
index 31be95cf..2728e2e9 100644
--- a/config/apache_mod_security-dev/apache_mod_security.inc
+++ b/config/apache_mod_security-dev/apache_mod_security.inc
@@ -569,9 +569,14 @@ EOF;
$vh_config.= " SSLCertificateKeyFile ". APACHEDIR . "/etc/apache22/{$virtualhost["ssl_cert"]}.key\n";
}
}
- $svr_ca =lookup_ca($virtualhost["reverse_int_ca"]);
+ $svr_ca =lookup_ca($virtualhost["ssl_cert_chain"]);
if ($svr_ca != false) {
- file_put_contents(APACHEDIR . "/etc/apache22/{$virtualhost["reverse_int_ca"]}.crt",apache_textarea_decode($svr_ca['crt']),LOCK_EX);
+ file_put_contents(APACHEDIR . "/etc/apache22/{$virtualhost["ssl_cert_chain"]}.crt",apache_textarea_decode($svr_ca['crt']),LOCK_EX);
+ $vh_config.= " SSLCertificateChainFile ". APACHEDIR . "/etc/apache22/{$virtualhost["ssl_cert_chain"]}.crt\n";
+ }
+ $cli_ca =lookup_ca($virtualhost["reverse_int_ca"]);
+ if ($cli_ca != false) {
+ file_put_contents(APACHEDIR . "/etc/apache22/{$virtualhost["reverse_int_ca"]}.crt",apache_textarea_decode($cli_ca['crt']),LOCK_EX);
$vh_config.= " SSLCACertificateFile ". APACHEDIR . "/etc/apache22/{$virtualhost["reverse_int_ca"]}.crt\n";
}
}
diff --git a/config/apache_mod_security-dev/apache_virtualhost.xml b/config/apache_mod_security-dev/apache_virtualhost.xml
index 747ef975..7851e683 100644
--- a/config/apache_mod_security-dev/apache_virtualhost.xml
+++ b/config/apache_mod_security-dev/apache_virtualhost.xml
@@ -267,9 +267,19 @@
none
- Intermediate CA certificate (optional)
+ HTTPS SSL certificate chain
+ ssl_cert_chain
+ Select intermediate CA assigned to server certificate. Not all certificates require this.
+ select_source
+
+ descr
+ refid
+ none
+
+
+ Client certificates CA (optional)reverse_int_ca
- Select intermediate CA assigned to certificate. Not all certificates require this.
+ Select CA assigned to client certificates.select_sourcedescr
--
cgit v1.2.3
From 238612a72478ce9c00d25b31f9a7516a69f996c5 Mon Sep 17 00:00:00 2001
From: Bryan Paradis
Date: Wed, 22 Jan 2014 23:08:05 -0500
Subject: Updated pkg_config.8.* vnstat2 maintainer/version
---
pkg_config.8.xml | 4 ++--
pkg_config.8.xml.amd64 | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/pkg_config.8.xml b/pkg_config.8.xml
index 0e40dfb2..6e03c0a7 100644
--- a/pkg_config.8.xml
+++ b/pkg_config.8.xml
@@ -827,10 +827,10 @@
vnstat-1.11.tbzvnstat-1.11_1-i386.pbi/usr/ports/net/vnstat
- 1.10_2
+ 1.11_1Stable2.0
- crazypark2@yahoo.dk
+ bryan.paradis@gmail.comhttp://www.pfsense.com/packages/config/vnstat2/vnstat2.xmlvnstat2.xml
diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64
index 6454a58e..39911a23 100644
--- a/pkg_config.8.xml.amd64
+++ b/pkg_config.8.xml.amd64
@@ -814,10 +814,10 @@
vnstat-1.11.tbzvnstat-1.11_1-amd64.pbi/usr/ports/net/vnstat
- 1.10_2
+ 1.11_1Stable2.0
- crazypark2@yahoo.dk
+ bryan.paradis@gmail.comhttp://www.pfsense.com/packages/config/vnstat2/vnstat2.xmlvnstat2.xml
--
cgit v1.2.3
From 3f126784b31d5b5011fb10be7802cf122d953d16 Mon Sep 17 00:00:00 2001
From: Bryan Paradis
Date: Wed, 22 Jan 2014 23:09:02 -0500
Subject: added vnstat_php_frontend moving away from tar
---
config/vnstat2/vnstat_php_frontend/COPYING | 341 +++++++++++++++++++
config/vnstat2/vnstat_php_frontend/README | 52 +++
config/vnstat2/vnstat_php_frontend/VeraBd.ttf | Bin 0 -> 58716 bytes
config/vnstat2/vnstat_php_frontend/config.php | 69 ++++
config/vnstat2/vnstat_php_frontend/graph.php | 303 +++++++++++++++++
config/vnstat2/vnstat_php_frontend/graph_svg.php | 362 +++++++++++++++++++++
config/vnstat2/vnstat_php_frontend/index.php | 196 +++++++++++
config/vnstat2/vnstat_php_frontend/lang/cs.php | 39 +++
config/vnstat2/vnstat_php_frontend/lang/en.php | 39 +++
config/vnstat2/vnstat_php_frontend/lang/nl.php | 40 +++
config/vnstat2/vnstat_php_frontend/localize.php | 15 +
.../vnstat_php_frontend/themes/dark/style.css | 21 ++
.../vnstat_php_frontend/themes/dark/theme.php | 16 +
.../vnstat_php_frontend/themes/espresso/style.css | 170 ++++++++++
.../vnstat_php_frontend/themes/espresso/theme.php | 17 +
.../vnstat_php_frontend/themes/light/style.css | 159 +++++++++
.../vnstat_php_frontend/themes/light/theme.php | 15 +
.../vnstat_php_frontend/themes/pfSense/style.css | 170 ++++++++++
.../vnstat_php_frontend/themes/pfSense/theme.php | 17 +
.../vnstat_php_frontend/themes/red/style.css | 170 ++++++++++
.../vnstat_php_frontend/themes/red/theme.php | 16 +
.../vnstat2/vnstat_php_frontend/vera_copyright.txt | 124 +++++++
config/vnstat2/vnstat_php_frontend/vnstat.php | 211 ++++++++++++
23 files changed, 2562 insertions(+)
create mode 100644 config/vnstat2/vnstat_php_frontend/COPYING
create mode 100644 config/vnstat2/vnstat_php_frontend/README
create mode 100644 config/vnstat2/vnstat_php_frontend/VeraBd.ttf
create mode 100644 config/vnstat2/vnstat_php_frontend/config.php
create mode 100644 config/vnstat2/vnstat_php_frontend/graph.php
create mode 100644 config/vnstat2/vnstat_php_frontend/graph_svg.php
create mode 100644 config/vnstat2/vnstat_php_frontend/index.php
create mode 100644 config/vnstat2/vnstat_php_frontend/lang/cs.php
create mode 100644 config/vnstat2/vnstat_php_frontend/lang/en.php
create mode 100644 config/vnstat2/vnstat_php_frontend/lang/nl.php
create mode 100644 config/vnstat2/vnstat_php_frontend/localize.php
create mode 100644 config/vnstat2/vnstat_php_frontend/themes/dark/style.css
create mode 100644 config/vnstat2/vnstat_php_frontend/themes/dark/theme.php
create mode 100644 config/vnstat2/vnstat_php_frontend/themes/espresso/style.css
create mode 100644 config/vnstat2/vnstat_php_frontend/themes/espresso/theme.php
create mode 100644 config/vnstat2/vnstat_php_frontend/themes/light/style.css
create mode 100644 config/vnstat2/vnstat_php_frontend/themes/light/theme.php
create mode 100644 config/vnstat2/vnstat_php_frontend/themes/pfSense/style.css
create mode 100644 config/vnstat2/vnstat_php_frontend/themes/pfSense/theme.php
create mode 100644 config/vnstat2/vnstat_php_frontend/themes/red/style.css
create mode 100644 config/vnstat2/vnstat_php_frontend/themes/red/theme.php
create mode 100644 config/vnstat2/vnstat_php_frontend/vera_copyright.txt
create mode 100644 config/vnstat2/vnstat_php_frontend/vnstat.php
diff --git a/config/vnstat2/vnstat_php_frontend/COPYING b/config/vnstat2/vnstat_php_frontend/COPYING
new file mode 100644
index 00000000..a17bdaff
--- /dev/null
+++ b/config/vnstat2/vnstat_php_frontend/COPYING
@@ -0,0 +1,341 @@
+GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ , 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
+
diff --git a/config/vnstat2/vnstat_php_frontend/README b/config/vnstat2/vnstat_php_frontend/README
new file mode 100644
index 00000000..20053152
--- /dev/null
+++ b/config/vnstat2/vnstat_php_frontend/README
@@ -0,0 +1,52 @@
+0. WHAT IS IT?
+
+This is a PHP frontend end to vnstat, a network traffic logger.
+Since vnstat is console mode only I created this script to
+make a 'nice' report of the data collected by vnstat.
+For more information about vnstat check out http://humdi.net/vnstat/
+For updates to this script check http://www.sqweek.com
+
+
+1. REQUIREMENTS
+
+- vnstat setup and collecting data
+- webserver with PHP
+- php-gd extension installed for PNG graphs
+
+
+2. INSTALL
+
+Installation should be really straightforward:
+
+Put the files from this package somewhere inside the webroot of
+your webserver. Then edit the few configuration options in config.php
+to suit your situation and your good to go. The various options are
+explained in config.php.
+
+
+3. LICENSE
+
+vnstat PHP frontend 1.5.1
+Copyright (c)2006-2008 Bjorge Dijkstra (bjd@jooz.net)
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+NOTE:
+ The Truetype font file VeraBd.ttf is copyright by Bitstream Inc.
+ See vera_copyright.txt for more information.
+
+
+
diff --git a/config/vnstat2/vnstat_php_frontend/VeraBd.ttf b/config/vnstat2/vnstat_php_frontend/VeraBd.ttf
new file mode 100644
index 00000000..51d6111d
Binary files /dev/null and b/config/vnstat2/vnstat_php_frontend/VeraBd.ttf differ
diff --git a/config/vnstat2/vnstat_php_frontend/config.php b/config/vnstat2/vnstat_php_frontend/config.php
new file mode 100644
index 00000000..3a4cd51a
--- /dev/null
+++ b/config/vnstat2/vnstat_php_frontend/config.php
@@ -0,0 +1,69 @@
+ /path/to/data_dir/vnstat_dump_$iface
+ //
+ $vnstat_bin = '/usr/local/bin/vnstat';
+ $data_dir = './dumps';
+
+ // graphics format to use: svg or png
+ $graph_format='svg';
+
+ // Font to use for PNG graphs
+ define('GRAPH_FONT',dirname(__FILE__).'/VeraBd.ttf');
+
+ // Font to use for SVG graphs
+ define('SVG_FONT', 'Verdana');
+
+ define('DEFAULT_COLORSCHEME', 'pfSense');
+?>
\ No newline at end of file
diff --git a/config/vnstat2/vnstat_php_frontend/graph.php b/config/vnstat2/vnstat_php_frontend/graph.php
new file mode 100644
index 00000000..fb00be67
--- /dev/null
+++ b/config/vnstat2/vnstat_php_frontend/graph.php
@@ -0,0 +1,303 @@
+ $high)
+ $high = $data[$i]['rx'];
+ if ($data[$i]['tx'] > $high)
+ $high = $data[$i]['tx'];
+ }
+
+ while ($high > ($prescale * $y_scale * $y_ticks))
+ {
+ $y_scale = $y_scale * 2;
+ if ($y_scale >= 1024)
+ {
+ $prescale = $prescale * 1024;
+ $y_scale = $y_scale / 1024;
+ if ($unit == 'K')
+ $unit = 'M';
+ else if ($unit == 'M')
+ $unit = 'G';
+ else if ($unit == 'G')
+ $unit = 'T';
+ }
+ }
+
+ draw_grid($x_ticks, $y_ticks);
+
+ //
+ // graph scale factor (per pixel)
+ //
+ imagesetthickness($im, 1);
+ $sf = ($prescale * $y_scale * $y_ticks) / $gr_h;
+
+ if ($data[0] == 'nodata')
+ {
+ $text = 'no data available';
+ $bbox = imagettfbbox(10, 0, GRAPH_FONT, $text);
+ $textwidth = $bbox[2] - $bbox[0];
+ imagettftext($im, 10, 0, ($iw-$textwidth)/2, $ytm + 80, $cl['text'], GRAPH_FONT, $text);
+ }
+ else
+ {
+ //
+ // draw bars
+ //
+ for ($i=0; $i<$x_ticks; $i++)
+ {
+ $x = $xlm + ($i * $x_step);
+ $y = $ytm + ($ih - $ytm - $ybm) - (($data[$i]['rx'] - $offset) / $sf);
+
+ $depth = $x_step / 8;
+ $space = 0;
+
+ $x1 = $x;
+ $y1 = $y;
+ $x2 = $x + $bar_w - $space;
+ $y2 = $ih - $ybm;
+
+ imagefilledrectangle($im, $x1, $y1, $x2, $y2, $cl['rx']);
+ imagerectangle($im, $x1, $y1, $x2, $y2, $cl['rx_border']);
+
+ imagefilledrectangle($im, $x1 - $depth, $y1 + $depth, $x2 -$depth, $y2 + $depth, $cl['rx']);
+ imagerectangle($im, $x1 - $depth, $y1 + $depth, $x2 - $depth, $y2 + $depth, $cl['rx_border']);
+
+ imagefilledpolygon($im, array($x1, $y1, $x2, $y1, $x2 - $depth, $y1 + $depth, $x1 - $depth, $y1 + $depth), 4, $cl['rx']);
+ imagepolygon($im, array($x1, $y1, $x2, $y1, $x2 - $depth, $y1 + $depth, $x1 - $depth, $y1 + $depth), 4, $cl['rx_border']);
+ imagefilledpolygon($im, array($x2, $y1, $x2, $y2, $x2 - $depth, $y2 + $depth, $x2 - $depth, $y1 + $depth), 4, $cl['rx']);
+ imagepolygon($im, array($x2, $y1, $x2, $y2, $x2 - $depth, $y2 + $depth, $x2 - $depth, $y1 + $depth), 4, $cl['rx_border']);
+
+ $y1 = $ytm + ($ih - $ytm - $ybm) - (($data[$i]['tx'] - $offset) / $sf);
+ $x1 = $x1 + $bar_w;
+ $x2 = $x2 + $bar_w;
+
+ imagefilledrectangle($im, $x1, $y1, $x2, $y2, $cl['tx']);
+ imagerectangle($im, $x1, $y1, $x2, $y2, $cl['tx_border']);
+
+ imagefilledrectangle($im, $x1 - $depth, $y1 + $depth, $x2 - $depth, $y2 + $depth, $cl['tx']);
+ imagerectangle($im, $x1 - $depth, $y1 + $depth, $x2 - $depth, $y2 + $depth, $cl['tx_border']);
+
+ imagefilledpolygon($im, array($x1, $y1, $x2, $y1, $x2 - $depth, $y1 + $depth, $x1 - $depth, $y1 + $depth), 4, $cl['tx']);
+ imagepolygon($im, array($x1, $y1, $x2, $y1, $x2 - $depth, $y1 + $depth, $x1 - $depth, $y1 + $depth), 4, $cl['tx_border']);
+ imagefilledpolygon($im, array($x2, $y1, $x2, $y2, $x2 - $depth, $y2 + $depth, $x2 - $depth, $y1 + $depth), 4, $cl['tx']);
+ imagepolygon($im, array($x2, $y1, $x2, $y2, $x2 - $depth, $y2 + $depth, $x2 - $depth, $y1 + $depth), 4, $cl['tx_border']);
+ }
+
+ //
+ // axis labels
+ //
+ for ($i=0; $i<=$y_ticks; $i++)
+ {
+ $label = ($i * $y_scale).$unit;
+ $bbox = imagettfbbox(8, 0, GRAPH_FONT, $label);
+ $textwidth = $bbox[2] - $bbox[0];
+ imagettftext($im, 8, 0, $xlm - $textwidth - 16, ($ih - $ybm) - ($i * $y_step) + 8 + $depth, $cl['text'], GRAPH_FONT, $label);
+ }
+
+ for ($i=0; $i<$x_ticks; $i++)
+ {
+ $label = $data[$i]['img_label'];
+ $bbox = imagettfbbox(9, 0, GRAPH_FONT, $label);
+ $textwidth = $bbox[2] - $bbox[0];
+ imagettftext($im, 9, 0, $xlm + ($i * $x_step) + ($x_step / 2) - ($textwidth / 2) - $depth - 4, $ih - $ybm + 20 + $depth, $cl['text'], GRAPH_FONT, $label);
+ }
+ }
+
+ draw_border();
+
+
+ //
+ // legend
+ //
+ imagefilledrectangle($im, $xlm, $ih-$ybm+39, $xlm+8,$ih-$ybm+47,$cl['rx']);
+ imagerectangle($im, $xlm, $ih-$ybm+39, $xlm+8,$ih-$ybm+47,$cl['text']);
+ imagettftext($im, 8,0, $xlm+14, $ih-$ybm+48,$cl['text'], GRAPH_FONT,'bytes in');
+
+ imagefilledrectangle($im, $xlm+120 , $ih-$ybm+39, $xlm+128,$ih-$ybm+47,$cl['tx']);
+ imagerectangle($im, $xlm+120, $ih-$ybm+39, $xlm+128,$ih-$ybm+47,$cl['text']);
+ imagettftext($im, 8,0, $xlm+134, $ih-$ybm+48,$cl['text'], GRAPH_FONT,'bytes out');
+ }
+
+ function output_image()
+ {
+ global $page,$hour,$day,$month,$im,$iface;
+
+ if ($page == 'summary')
+ return;
+
+ init_image();
+
+ if ($page == 'h')
+ {
+ draw_data($hour);
+ }
+ else if ($page == 'd')
+ {
+ draw_data($day);
+ }
+ else if ($page == 'm')
+ {
+ draw_data($month);
+ }
+
+ header('Content-type: image/png');
+ imagepng($im);
+ }
+
+ get_vnstat_data();
+ output_image();
+?>
diff --git a/config/vnstat2/vnstat_php_frontend/graph_svg.php b/config/vnstat2/vnstat_php_frontend/graph_svg.php
new file mode 100644
index 00000000..8992ed12
--- /dev/null
+++ b/config/vnstat2/vnstat_php_frontend/graph_svg.php
@@ -0,0 +1,362 @@
+\n";
+ print "\n";
+ }
+
+ function svg_options($options)
+ {
+ foreach ($options as $key => $value) {
+ print "$key=\"$value\" ";
+ }
+ }
+
+ function svg_group($options)
+ {
+ print "\n";
+ }
+
+ function svg_group_end()
+ {
+ print "\n";
+ }
+
+ function svg_text($x, $y, $text, $options = array())
+ {
+ printf("$text\n";
+ }
+
+ function svg_line($x1, $y1, $x2, $y2, $options = array())
+ {
+ printf("\n";
+ }
+
+ function svg_rect($x, $y, $w, $h, $options = array())
+ {
+ printf("\n";
+ }
+
+ function svg_poly($points, $options = array())
+ {
+ print "\n";
+ }
+
+ function allocate_color($colors)
+ {
+ $col['rgb'] = sprintf("#%02X%02X%02X", $colors[0], $colors[1], $colors[2]);
+ $col['opacity'] = sprintf("%F", (127 - $colors[3]) / 127);
+ return $col;
+ }
+
+ function init_image()
+ {
+ global $xlm, $xrm, $ytm, $ybm, $iw, $ih,$graph, $cl, $iface, $colorscheme, $style;
+
+ if ($graph == 'none')
+ return;
+
+ //
+ // image object
+ //
+ $xlm = 70;
+ $xrm = 20;
+ $ytm = 35;
+ $ybm = 60;
+ if ($graph == 'small')
+ {
+ $iw = 300 + $xrm + $xlm;
+ $ih = 100 + $ytm + $ybm;
+ }
+ else
+ {
+ $iw = 600 + $xrm + $xlm;
+ $ih = 200 + $ytm + $ybm;
+ }
+
+ svg_create($iw, $ih);
+
+ //
+ // colors
+ //
+ $cs = $colorscheme;
+ $cl['image_background'] = allocate_color($cs['image_background']);
+ $cl['background'] = allocate_color($cs['graph_background']);
+ $cl['background_2'] = allocate_color($cs['graph_background_2']);
+ $cl['grid_stipple_1'] = allocate_color($cs['grid_stipple_1']);
+ $cl['grid_stipple_2'] = allocate_color($cs['grid_stipple_2']);
+ $cl['text'] = allocate_color($cs['text']);
+ $cl['border'] = allocate_color($cs['border']);
+ $cl['rx'] = allocate_color($cs['rx']);
+ $cl['rx_border'] = allocate_color($cs['rx_border']);
+ $cl['tx'] = allocate_color($cs['tx']);
+ $cl['tx_border'] = allocate_color($cs['tx_border']);
+
+ svg_rect(0, 0, $iw, $ih, array( 'stroke' => 'none', 'stroke-width' => 0, 'fill' => $cl['image_background']['rgb']) );
+ svg_rect($xlm, $ytm, $iw-$xrm-$xlm, $ih-$ybm-$ytm, array( 'stroke' => 'none', 'stroke-width' => 0, 'fill' => $cl['background']['rgb']) );
+
+ $depth = 12;
+ svg_group( array( 'stroke' => 'none', 'stroke-width' => 0, 'fill' => $cl['background_2']['rgb'], 'fill-opacity' => $cl['background_2']['opacity']) );
+ svg_poly(array($xlm, $ytm, $xlm, $ih - $ybm, $xlm - $depth, $ih - $ybm + $depth, $xlm - $depth, $ytm + $depth));
+ svg_poly(array($xlm, $ih - $ybm, $xlm - $depth, $ih - $ybm + $depth, $iw - $xrm - $depth, $ih - $ybm + $depth, $iw - $xrm, $ih - $ybm));
+ svg_group_end();
+
+ // draw title
+ $text = T('Traffic data for')." $iface";
+ svg_text($iw / 2, ($ytm / 2), $text, array( 'stroke' => $cl['text'], 'fill' => $cl['text']['rgb'],'stroke-width' => 0, 'font-family' => SVG_FONT, 'font-weight' => 'bold', 'text-anchor' => 'middle' ));
+ }
+
+ function draw_border()
+ {
+ global $cl, $iw, $ih;
+ svg_rect(1, 1, $iw-2, $ih-2, array( 'stroke' => $cl['border']['rgb'], 'stroke-opacity' => $cl['border']['opacity'], 'stroke-width' => 1, 'fill' => 'none') );
+ }
+
+ function draw_grid($x_ticks, $y_ticks)
+ {
+ global $cl, $iw, $ih, $xlm, $xrm, $ytm, $ybm;
+ $x_step = ($iw - $xlm - $xrm) / $x_ticks;
+ $y_step = ($ih - $ytm - $ybm) / $y_ticks;
+
+ $depth = 12;
+
+ svg_group( array( 'stroke' => $cl['grid_stipple_1']['rgb'], 'stroke-opacity' => $cl['grid_stipple_1']['opacity'], 'stroke-width' => '1px', 'stroke-dasharray' => '1,1' ) );
+ for ($i = $xlm; $i <= ($iw - $xrm); $i += $x_step)
+ {
+ svg_line($i, $ytm, $i, $ih-$ybm);
+ svg_line($i, $ih-$ybm, $i-$depth, $ih-$ybm+$depth);
+ }
+ for ($i = $ytm; $i <= ($ih - $ybm); $i += $y_step)
+ {
+ svg_line($xlm, $i, $iw - $xrm, $i);
+ svg_line($xlm, $i, $xlm - $depth, $i + $depth);
+ }
+ svg_group_end();
+
+ svg_group( array( 'stroke' => $cl['border']['rgb'], 'stroke-width' => '1px', 'stroke-opacity' => $cl['border']['opacity'] ) );
+ svg_line($xlm, $ytm, $xlm, $ih - $ybm);
+ svg_line($xlm, $ih - $ybm, $iw - $xrm, $ih - $ybm);
+ svg_group_end();
+ }
+
+
+ function draw_data($data)
+ {
+ global $cl,$iw,$ih,$xlm,$xrm,$ytm,$ybm;
+
+ sort($data);
+
+ $x_ticks = count($data);
+ $y_ticks = 10;
+ $y_scale = 1;
+ $prescale = 1;
+ $unit = 'K';
+ $offset = 0;
+ $gr_h = $ih - $ytm - $ybm;
+ $x_step = ($iw - $xlm - $xrm) / $x_ticks;
+ $y_step = ($ih - $ytm - $ybm) / $y_ticks;
+ $bar_w = ($x_step / 2) ;
+
+ //
+ // determine scale
+ //
+ $low = 99999999999;
+ $high = 0;
+ for ($i=0; $i<$x_ticks; $i++)
+ {
+ if ($data[$i]['rx'] < $low)
+ $low = $data[$i]['rx'];
+ if ($data[$i]['tx'] < $low)
+ $low = $data[$i]['tx'];
+ if ($data[$i]['rx'] > $high)
+ $high = $data[$i]['rx'];
+ if ($data[$i]['tx'] > $high)
+ $high = $data[$i]['tx'];
+ }
+
+ while ($high > ($prescale * $y_scale * $y_ticks))
+ {
+ $y_scale = $y_scale * 2;
+ if ($y_scale >= 1024)
+ {
+ $prescale = $prescale * 1024;
+ $y_scale = $y_scale / 1024;
+ if ($unit == 'K')
+ $unit = 'M';
+ else if ($unit == 'M')
+ $unit = 'G';
+ else if ($unit == 'G')
+ $unit = 'T';
+ }
+ }
+
+ draw_grid($x_ticks, $y_ticks);
+
+ //
+ // graph scale factor (per pixel)
+ //
+ $sf = ($prescale * $y_scale * $y_ticks) / $gr_h;
+
+ if ($data[0] == 'nodata')
+ {
+ $text = 'no data available';
+ svg_text($iw/2, $ytm + 80, $text, array( 'stroke' => $cl['text']['rgb'], 'fill' => $cl['text']['rgb'], 'stroke-width' => 0, 'font-family' => SVG_FONT, 'font-size' => '16pt', 'text-anchor' => 'middle') );
+ }
+ else
+ {
+ //
+ // draw bars
+ //
+ for ($i=0; $i<$x_ticks; $i++)
+ {
+ $x = $xlm + ($i * $x_step);
+ $y = $ytm + ($ih - $ytm - $ybm) - (($data[$i]['rx'] - $offset) / $sf);
+
+ $depth = ($x_ticks < 20) ? 8 : 6;
+ $space = 0;
+
+ $x1 = (int)$x;
+ $y1 = (int)$y;
+ $w = (int)($bar_w - $space);
+ $h = (int)($ih - $ybm - $y);
+ $x2 = (int)($x + $bar_w - $space);
+ $y2 = (int)($ih - $ybm);
+
+ svg_group( array( 'stroke' => $cl['rx_border']['rgb'], 'stroke-opacity' => $cl['rx_border']['opacity'],
+ 'stroke-width' => 1, 'stroke-linejoin' => 'round',
+ 'fill' => $cl['rx']['rgb'], 'fill-opacity' => $cl['rx']['opacity'] ) );
+ svg_rect($x1, $y1, $w, $h);
+ svg_rect($x1 - $depth, $y1 + $depth, $w, $h);
+ svg_poly(array($x1, $y1, $x2, $y1, $x2 - $depth, $y1 + $depth, $x1 - $depth, $y1 + $depth));
+ svg_poly(array($x2, $y1, $x2, $y2, $x2 - $depth, $y2 + $depth, $x2 - $depth, $y1 + $depth));
+ svg_group_end();
+
+ $y1 = (int)($ytm + ($ih - $ytm - $ybm) - (($data[$i]['tx'] - $offset) / $sf));
+ $x1 = (int)($x1 + $bar_w);
+ $x2 = (int)($x2 + $bar_w);
+ $w = (int)($bar_w - $space);
+ $h = (int)($ih - $ybm - $y1 - 1);
+
+ svg_group( array( 'stroke' => $cl['tx_border']['rgb'], 'stroke-opacity' => $cl['tx_border']['opacity'],
+ 'stroke-width' => 1, 'stroke-linejoin' => 'round',
+ 'fill' => $cl['tx']['rgb'], 'fill-opacity' => $cl['tx']['opacity'] ) );
+ svg_rect($x1, $y1, $w, $h);
+ svg_rect($x1 - $depth, $y1 + $depth, $w, $h);
+ svg_poly(array($x1, $y1, $x2, $y1, $x2 - $depth, $y1 + $depth, $x1 - $depth, $y1 + $depth));
+ svg_poly(array($x2, $y1, $x2, $y2, $x2 - $depth, $y2 + $depth, $x2 - $depth, $y1 + $depth));
+ svg_group_end();
+ }
+
+ //
+ // axis labels
+ //
+ svg_group( array( 'fill' => $cl['text']['rgb'], 'fill-opacity' => $cl['text']['opacity'], 'stroke-width' => '0', 'font-family' => SVG_FONT, 'font-size' => '10pt', 'text-anchor' => 'end' ) );
+ for ($i=0; $i<=$y_ticks; $i++)
+ {
+ $label = ($i * $y_scale).$unit;
+ $tx = $xlm - 16;
+ $ty = (int)(($ih - $ybm) - ($i * $y_step) + 8 + $depth);
+ svg_text($tx, $ty, $label);
+ }
+ svg_group_end();
+
+ svg_group( array( 'fill' => $cl['text']['rgb'], 'fill-opacity' => $cl['text']['opacity'], 'stroke-width' => '0', 'font-family' => SVG_FONT, 'font-size' => '10pt', 'text-anchor' => 'middle' ) );
+ for ($i=0; $i<$x_ticks; $i++)
+ {
+ $label = $data[$i]['img_label'];
+ svg_text($xlm + ($i * $x_step) + ($x_step / 2) - $depth - 4, $ih - $ybm + 20 + $depth, $label);
+ }
+ svg_group_end();
+ }
+
+ draw_border();
+
+
+ //
+ // legend
+ //
+ svg_rect($xlm, $ih-$ybm+39, 8, 8, array( 'stroke' => $cl['text']['rgb'], 'stroke-width' => 1, 'fill' => $cl['rx']['rgb']) );
+ svg_text($xlm+14, $ih-$ybm+48, T('bytes in'), array( 'fill' => $cl['text']['rgb'], 'stroke-width' => 0, 'font-family' => SVG_FONT, 'font-size' => '8pt') );
+
+ svg_rect($xlm+120 , $ih-$ybm+39, 8, 8, array( 'stroke' => $cl['text']['rgb'], 'stroke-width' => 1, 'fill' => $cl['tx']['rgb']) );
+ svg_text($xlm+134, $ih-$ybm+48, T('bytes out'), array( 'fill' => $cl['text']['rgb'], 'stroke-width' => 0, 'font-family' => SVG_FONT, 'font-size' => '8pt') );
+ }
+
+ function output_image()
+ {
+ global $page,$hour,$day,$month,$iface;
+
+ if ($page == 'summary')
+ return;
+
+ init_image();
+
+ if ($page == 'h')
+ {
+ draw_data($hour);
+ }
+ else if ($page == 'd')
+ {
+ draw_data($day);
+ }
+ else if ($page == 'm')
+ {
+ draw_data($month);
+ }
+
+ svg_end();
+ }
+
+ get_vnstat_data();
+ output_image();
+?>
diff --git a/config/vnstat2/vnstat_php_frontend/index.php b/config/vnstat2/vnstat_php_frontend/index.php
new file mode 100644
index 00000000..70c0427f
--- /dev/null
+++ b/config/vnstat2/vnstat_php_frontend/index.php
@@ -0,0 +1,196 @@
+\n";
+ foreach ($iface_list as $if)
+ {
+ print "
+
+
diff --git a/config/vnstat2/vnstat_php_frontend/lang/cs.php b/config/vnstat2/vnstat_php_frontend/lang/cs.php
new file mode 100644
index 00000000..8704a503
--- /dev/null
+++ b/config/vnstat2/vnstat_php_frontend/lang/cs.php
@@ -0,0 +1,39 @@
+
diff --git a/config/vnstat2/vnstat_php_frontend/themes/dark/style.css b/config/vnstat2/vnstat_php_frontend/themes/dark/style.css
new file mode 100644
index 00000000..8cf475fe
--- /dev/null
+++ b/config/vnstat2/vnstat_php_frontend/themes/dark/style.css
@@ -0,0 +1,21 @@
+* {margin:0; padding:0;}
+body {background:#2f2f2f; font-family:Verdana; font-size:12px;}
+#wrap {width: 960px; background:#242424; padding:10px; margin:0 auto; border:1px solid #474747;}
+#sidebar {width: 160px; float: left; padding: 3px 4px; color: #fff; background-color: #2F2F2F; border:1px solid #474747; -moz-border-radius:8px;}
+#sidebar ul.iface {}
+#sidebar li.iface {list-style-type:none; color:#08BB08; text-transform:uppercase; padding-bottom:10px; text-align:center;}
+#sidebar a{color:#aaa;}
+#sidebar ul.page {}
+#sidebar li.page {list-style-type:none; text-transform:none;}
+#content {margin-left: 180px; width: 780px;}
+#header {padding: 3px; color: #fff; background-color: #2F2F2F; text-align: center; border:1px solid #474747; font-size:14px; font-weight:bold; -moz-border-radius:8px;}
+#footer {padding: 3px; color: #fff; background-color: #2F2F2F; text-align: center; border:1px solid #474747; font-size:11px; -moz-border-radius:8px; clear:both; margin-top:10px;}
+#footer a {color:#fff;}
+#main {padding: 10px 10px 10px 10px; color: #fff; background-color: #2F2F2F; text-align: center; border:1px solid #474747; -moz-border-radius:8px; margin-top:10px;}
+#main td {padding:1px 0;}
+#main td.numeric_odd {text-align: right; color: #fff; background:#474747;}
+#main td.numeric_even {text-align: right; color: #fff; background:#242424;}
+#main td.label_odd {color: #fff; background:#474747;}
+#main td.label_even {color: #fff; background:#242424;}
+#main th.label {color: #fff; padding:2px 0; border-bottom:1px solid #fff;}
+#main caption {padding: 3px 0 4px 0; color:#08BB08; text-transform:uppercase;}
\ No newline at end of file
diff --git a/config/vnstat2/vnstat_php_frontend/themes/dark/theme.php b/config/vnstat2/vnstat_php_frontend/themes/dark/theme.php
new file mode 100644
index 00000000..6df45cb2
--- /dev/null
+++ b/config/vnstat2/vnstat_php_frontend/themes/dark/theme.php
@@ -0,0 +1,16 @@
+ array( 36, 36, 36, 0 ),
+ 'graph_background' => array( 220, 220, 230, 0 ),
+ 'graph_background_2' => array( 205, 205, 220, 0 ),
+ 'grid_stipple_1' => array( 140, 140, 140, 0 ),
+ 'grid_stipple_2' => array( 200, 200, 200, 0 ),
+ 'border' => array( 71, 71, 71, 0 ),
+ 'text' => array( 255, 255, 255,0 ),
+ 'rx' => array( 10, 180, 10, 50 ),
+ 'rx_border' => array( 0, 120, 0, 90 ),
+ 'tx' => array( 130, 130, 130, 50 ),
+ 'tx_border' => array( 60, 60, 60, 90 )
+ );
+?>
diff --git a/config/vnstat2/vnstat_php_frontend/themes/espresso/style.css b/config/vnstat2/vnstat_php_frontend/themes/espresso/style.css
new file mode 100644
index 00000000..e5dff7f9
--- /dev/null
+++ b/config/vnstat2/vnstat_php_frontend/themes/espresso/style.css
@@ -0,0 +1,170 @@
+body
+{
+ background-color: #363330;
+ margin: 8px;
+ padding: 0;
+}
+
+#content
+{
+ width: 898px;
+}
+
+#sidebar
+{
+ position: absolute;
+ left: 8px;
+ top: 8px;
+ width: 160px;
+ border-right: 1px solid #D3CAAA;
+ border-collapse: collapse;
+ float: left;
+}
+
+#sidebar ul.iface
+{
+ margin: 0px;
+ padding: 0px;
+ border-top: 1px dashed #D3CAAA;
+ background-color: #363330;
+ color: #D3CAAA;
+}
+
+#sidebar li.iface
+{
+ list-style-type: none;
+ margin: 0px;
+ padding: 0px;
+ font-family: 'Trebuchet MS', Verdana, sans-serif;
+ font-size: 1em;
+ font-weight: bold;
+ border-bottom: 1px dashed #D3CAAA;
+}
+
+#sidebar a
+{
+ font-family: 'Trebuchet MS', Verdana, sans-serif;
+ font-size: 1em;
+ font-weight: bold;
+}
+
+#sidebar ul.page
+{
+ margin: 0px;
+ padding: 0px;
+ border-top: 1px dashed #D3CAAA;
+}
+
+#sidebar li.page
+{
+ list-style-type: none;
+ margin: 0px;
+ padding: 4px;
+ border: none;
+ font-family: 'Trebuchet MS', Verdana, sans-serif;
+ font-size: 0.75em;
+ font-weight: normal;
+ text-align: right;
+ background-color: #413D39;
+ color: #D3CAAA;
+}
+
+
+#header
+{
+ width: 720px;
+ margin-left: 160px;
+ padding: 0px 8px 0px 8px;
+ border-width: 1px 1px 1px 1px;
+ border-style: dashed solid dashed solid;
+ border-color: #D3CAAA;
+ border-collapse: collapse;
+ background-color: #363330;
+ color: #D3CAAA;
+ font-family: 'Trebuchet MS', Verdana, sans-serif;
+ font-size: 1em;
+ font-weight: bold;
+ text-align: center;
+}
+
+#footer
+{
+ width: 720px;
+ margin-left: 160px;
+ padding: 2px 8px 2px 8px;
+ border-width: 1px 1px 1px 1px;
+ border-style: solid;
+ border-color: #D3CAAA;
+ border-collapse: collapse;
+ background-color: #363330;
+ color: #D3CAAA;
+ font-family: 'Trebuchet MS', Verdana, sans-serif;
+ font-size: 0.70em;
+ text-align: center;
+}
+
+#main
+{
+ width: 720px;
+ margin-left: 160px;
+ padding: 8px 8px 8px 8px;
+ border-left: 1px solid #D3CAAA;
+ border-right: 1px solid #D3CAAA;
+ border-collapse: collapse;
+}
+
+#main td
+{
+ font-family: 'Trebuchet MS', Verdana, sans-serif;
+ font-size: 0.8em;
+}
+
+#main td.numeric_odd
+{
+ text-align: right;
+ background-color: #756F68;
+ color: #D3CAAA;
+}
+
+#main td.numeric_even
+{
+ text-align: right;
+ background-color: #544C4A;
+ color: #D3CAAA;
+}
+
+#main td.label_odd
+{
+ background-color: #413D39;
+ color: #D3CAAA;
+}
+
+#main td.label_even
+{
+ background-color: #5A514F;
+ color: #D3CAAA;
+}
+
+#main th.label
+{
+ font-family: 'Trebuchet MS', Verdana, sans-serif;
+ font-size: 1em;
+ font-weight: bold;
+ background-color: #413D39;
+ color: #D3CAAA;
+}
+
+#main caption
+{
+ font-family: 'Trebuchet MS', Verdana, sans-serif;
+ font-size: 1.25em;
+ font-weight: bold;
+ padding: 4px;
+ color: #D3CAAA;
+}
+
+a
+{
+ text-decoration: none;
+ color: #D3CAAA;
+}
diff --git a/config/vnstat2/vnstat_php_frontend/themes/espresso/theme.php b/config/vnstat2/vnstat_php_frontend/themes/espresso/theme.php
new file mode 100644
index 00000000..3c7818f5
--- /dev/null
+++ b/config/vnstat2/vnstat_php_frontend/themes/espresso/theme.php
@@ -0,0 +1,17 @@
+ array( 065, 061, 057, 0 ),
+ 'graph_background' => array( 117, 111, 104, 30 ),
+ 'graph_background_2' => array( 128, 122, 102, 30 ),
+ 'grid_stipple_1' => array( 140, 140, 140, 0 ),
+ 'grid_stipple_2' => array( 200, 200, 200, 0 ),
+ 'border' => array( 211, 202, 170, 0 ),
+ 'text' => array( 211, 202, 170, 0 ),
+ 'rx' => array( 211, 202, 170, 50 ),
+ 'rx_border' => array( 80, 40, 40, 90 ),
+ 'tx' => array( 163, 156, 131, 50 ),
+ 'tx_border' => array( 60, 60, 60, 90 )
+ );
+?>
diff --git a/config/vnstat2/vnstat_php_frontend/themes/light/style.css b/config/vnstat2/vnstat_php_frontend/themes/light/style.css
new file mode 100644
index 00000000..28503f1d
--- /dev/null
+++ b/config/vnstat2/vnstat_php_frontend/themes/light/style.css
@@ -0,0 +1,159 @@
+body
+{
+ margin: 0;
+ padding: 0;
+}
+
+#wrap
+{
+ xwidth: 868px;
+}
+
+#sidebar
+{
+ width: 160px;
+ border-right: 1px solid #99b;
+ border-collapse: collapse;
+ float: left;
+}
+
+#sidebar ul.iface
+{
+ margin: 0;
+ padding: 0;
+ border-top: 1px solid #99b;
+ color: #000;
+ background-color: #eef;
+}
+
+#sidebar li.iface
+{
+ margin: 0;
+ padding: 0;
+ list-style-type: none;
+ font-family: 'Trebuchet MS', Verdana, sans-serif;
+ font-size: 1em;
+ font-weight: bold;
+ xborder-top: 1px solid #99b;
+ border-bottom: 1px solid #99b;
+}
+
+#sidebar a
+{
+ font-family: 'Trebuchet MS', Verdana, sans-serif;
+ font-size: 1em;
+ font-weight: bold;
+}
+
+#sidebar ul.page
+{
+ margin: 0;
+ padding: 0;
+ border-top: 1px solid #99b;
+}
+
+#sidebar li.page
+{
+ margin: 0;
+ padding: 4px;
+ border: none;
+ list-style-type: none;
+ font-family: 'Trebuchet MS', Verdana, sans-serif;
+ font-size: 0.75em;
+ font-weight: normal;
+ text-align: right;
+ color: #000;
+ background-color: #fff;
+}
+
+#content
+{
+ margin-left: 160px;
+ width: 720px;
+}
+
+
+#header
+{
+ padding: 0px 8px 0px 8px;
+ border-width: 1px;
+ border-style: solid solid solid solid;
+ border-color: #99b;
+ border-collapse: collapse;
+ color: #000;
+ background-color: #eef;
+ font-family: 'Trebuchet MS', Verdana, sans-serif;
+ font-size: 1em;
+ font-weight: bold;
+ text-align: center;
+}
+
+#footer
+{
+ padding: 2px 8px 2px 8px;
+ border: 1px solid #99b;
+ border-collapse: collapse;
+ color: #000;
+ background-color: #eef;
+ font-family: 'Trebuchet MS', Verdana, sans-serif;
+ font-size: 0.65em;
+ font-weight: bold;
+ text-align: center;
+}
+
+#main
+{
+ padding: 8px;
+ border-left: 1px solid #99b;
+ border-right: 1px solid #99b;
+ border-collapse: collapse;
+}
+
+#main td
+{
+ font-family: 'Trebuchet MS', Verdana, sans-serif;
+ font-size: 0.8em;
+}
+
+#main td.numeric_odd
+{
+ text-align: right;
+ color: #000;
+ background-color: #eef;
+}
+
+#main td.numeric_even
+{
+ text-align: right;
+ color: #000;
+ background-color: #fff;
+}
+
+#main td.label_odd
+{
+ color: #000;
+ background-color: #dde;
+}
+
+#main td.label_even
+{
+ color: #000;
+ background-color: #eee;
+}
+
+#main th.label
+{
+ font-family: 'Trebuchet MS', Verdana, sans-serif;
+ font-size: 1em;
+ font-weight: bold;
+ color: #000;
+ background-color: #dde;
+}
+
+#main caption
+{
+ font-family: 'Trebuchet MS', Verdana, sans-serif;
+ font-size: 1.25em;
+ font-weight: bold;
+ padding: 4px;
+}
diff --git a/config/vnstat2/vnstat_php_frontend/themes/light/theme.php b/config/vnstat2/vnstat_php_frontend/themes/light/theme.php
new file mode 100644
index 00000000..2516c874
--- /dev/null
+++ b/config/vnstat2/vnstat_php_frontend/themes/light/theme.php
@@ -0,0 +1,15 @@
+ array( 255, 255, 255, 0 ),
+ 'graph_background' => array( 220, 220, 230, 0 ),
+ 'graph_background_2' => array( 205, 205, 220, 0 ),
+ 'grid_stipple_1' => array( 140, 140, 140, 0 ),
+ 'grid_stipple_2' => array( 200, 200, 200, 0 ),
+ 'border' => array( 0, 0, 0, 0 ),
+ 'text' => array( 0, 0, 0, 0 ),
+ 'rx' => array( 190, 190, 20, 50 ),
+ 'rx_border' => array( 40, 80, 40, 90 ),
+ 'tx' => array( 130, 160, 100, 50 ),
+ 'tx_border' => array( 80, 40, 40, 90 )
+ );
+?>
diff --git a/config/vnstat2/vnstat_php_frontend/themes/pfSense/style.css b/config/vnstat2/vnstat_php_frontend/themes/pfSense/style.css
new file mode 100644
index 00000000..0136624d
--- /dev/null
+++ b/config/vnstat2/vnstat_php_frontend/themes/pfSense/style.css
@@ -0,0 +1,170 @@
+body
+{
+ background-color: #FFFFFF;
+ margin: 8px;
+ padding: 0;
+}
+
+#content
+{
+ width: 898px;
+}
+
+#sidebar
+{
+ position: absolute;
+ left: 8px;
+ top: 8px;
+ width: 160px;
+ border-right: 1px solid #990000;
+ border-collapse: collapse;
+ float: left;
+}
+
+#sidebar ul.iface
+{
+ margin: 0px;
+ padding: 0px;
+ border-top: 1px dashed #990000;
+ background-color: #990000;
+ color: #FFFFFF;
+}
+
+#sidebar li.iface
+{
+ list-style-type: none;
+ margin: 1px;
+ padding: 0px;
+ font-family: 'Trebuchet MS', Verdana, sans-serif;
+ font-size: 1em;
+ font-weight: bold;
+ border-bottom: 1px dashed #990000;
+}
+
+#sidebar a
+{
+ font-family: 'Trebuchet MS', Verdana, sans-serif;
+ font-size: 1em;
+ font-weight: bold;
+}
+
+#sidebar ul.page
+{
+ margin: 0px;
+ padding: 0px;
+ border-top: 1px dashed #990000;
+}
+
+#sidebar li.page
+{
+ list-style-type: none;
+ margin: 0px;
+ padding: 4px;
+ border: none;
+ font-family: 'Trebuchet MS', Verdana, sans-serif;
+ font-size: 0.75em;
+ font-weight: normal;
+ text-align: right;
+ background-color: #BBBBBB;
+ color: #000000;
+}
+
+
+#header
+{
+ width: 720px;
+ margin-left: 160px;
+ padding: 0px 8px 0px 8px;
+ border-width: 1px 1px 1px 1px;
+ border-style: dashed solid dashed solid;
+ border-color: #990000;
+ border-collapse: collapse;
+ background-color: #990000;
+ color: #FFFFFF;
+ font-family: 'Trebuchet MS', Verdana, sans-serif;
+ font-size: 1em;
+ font-weight: bold;
+ text-align: center;
+}
+
+#footer
+{
+ width: 720px;
+ margin-left: 160px;
+ padding: 2px 8px 2px 8px;
+ border-width: 1px 1px 1px 1px;
+ border-style: solid;
+ border-color: #82001D;
+ border-collapse: collapse;
+ background-color: #D2D2D2;
+ color: #82001D;
+ font-family: 'Trebuchet MS', Verdana, sans-serif;
+ font-size: 0.70em;
+ text-align: center;
+}
+
+#main
+{
+ width: 720px;
+ margin-left: 160px;
+ padding: 8px 8px 8px 8px;
+ border-left: 1px solid #82001D;
+ border-right: 1px solid #82001D;
+ border-collapse: collapse;
+}
+
+#main td
+{
+ font-family: 'Trebuchet MS', Verdana, sans-serif;
+ font-size: 0.8em;
+}
+
+#main td.numeric_odd
+{
+ text-align: right;
+ background-color: #C9C9C9;
+ color: #82001D;
+}
+
+#main td.numeric_even
+{
+ text-align: right;
+ background-color: #CFCFCF;
+ color: #82001D;
+}
+
+#main td.label_odd
+{
+ background-color: #A6A6A6;
+ color: #82001D;
+}
+
+#main td.label_even
+{
+ background-color: #C1C1C1;
+ color: #82001D;
+}
+
+#main th.label
+{
+ font-family: 'Trebuchet MS', Verdana, sans-serif;
+ font-size: 1em;
+ font-weight: bold;
+ background-color: #A6A6A6;
+ color: #82001D;
+}
+
+#main caption
+{
+ font-family: 'Trebuchet MS', Verdana, sans-serif;
+ font-size: 1.25em;
+ font-weight: bold;
+ padding: 4px;
+ color: #82001D;
+}
+
+a
+{
+ text-decoration: none;
+ color: #000000;
+}
diff --git a/config/vnstat2/vnstat_php_frontend/themes/pfSense/theme.php b/config/vnstat2/vnstat_php_frontend/themes/pfSense/theme.php
new file mode 100644
index 00000000..6489f842
--- /dev/null
+++ b/config/vnstat2/vnstat_php_frontend/themes/pfSense/theme.php
@@ -0,0 +1,17 @@
+ array( 240, 240, 240, 0 ),
+ 'graph_background' => array( 255, 255, 255, 0 ),
+ 'graph_background_2' => array( 255, 255, 255, 0 ),
+ 'grid_stipple_1' => array( 144, 0, 0, 0 ),
+ 'grid_stipple_2' => array( 144, 0, 0, 0 ),
+ 'border' => array( 0, 0, 0, 0 ),
+ 'text' => array( 0, 0, 0, 0 ),
+ 'rx' => array( 190, 20, 20, 50 ),
+ 'rx_border' => array( 80, 40, 40, 90 ),
+ 'tx' => array( 130, 130, 130, 50 ),
+ 'tx_border' => array( 60, 60, 60, 90 )
+ );
+?>
\ No newline at end of file
diff --git a/config/vnstat2/vnstat_php_frontend/themes/red/style.css b/config/vnstat2/vnstat_php_frontend/themes/red/style.css
new file mode 100644
index 00000000..48ab8d55
--- /dev/null
+++ b/config/vnstat2/vnstat_php_frontend/themes/red/style.css
@@ -0,0 +1,170 @@
+body
+{
+ background-color: #D2D2D2;
+ margin: 8px;
+ padding: 0;
+}
+
+#content
+{
+ width: 898px;
+}
+
+#sidebar
+{
+ position: absolute;
+ left: 8px;
+ top: 8px;
+ width: 160px;
+ border-right: 1px solid #82001D;
+ border-collapse: collapse;
+ float: left;
+}
+
+#sidebar ul.iface
+{
+ margin: 0px;
+ padding: 0px;
+ border-top: 1px dashed #82001D;
+ background-color: #D2D2D2;
+ color: #82001D;
+}
+
+#sidebar li.iface
+{
+ list-style-type: none;
+ margin: 0px;
+ padding: 0px;
+ font-family: 'Trebuchet MS', Verdana, sans-serif;
+ font-size: 1em;
+ font-weight: bold;
+ border-bottom: 1px dashed #82001D;
+}
+
+#sidebar a
+{
+ font-family: 'Trebuchet MS', Verdana, sans-serif;
+ font-size: 1em;
+ font-weight: bold;
+}
+
+#sidebar ul.page
+{
+ margin: 0px;
+ padding: 0px;
+ border-top: 1px dashed #82001D;
+}
+
+#sidebar li.page
+{
+ list-style-type: none;
+ margin: 0px;
+ padding: 4px;
+ border: none;
+ font-family: 'Trebuchet MS', Verdana, sans-serif;
+ font-size: 0.75em;
+ font-weight: normal;
+ text-align: right;
+ background-color: #C1C1C1;
+ color: #82001D;
+}
+
+
+#header
+{
+ width: 720px;
+ margin-left: 160px;
+ padding: 0px 8px 0px 8px;
+ border-width: 1px 1px 1px 1px;
+ border-style: dashed solid dashed solid;
+ border-color: #82001D;
+ border-collapse: collapse;
+ background-color: #D2D2D2;
+ color: #82001D;
+ font-family: 'Trebuchet MS', Verdana, sans-serif;
+ font-size: 1em;
+ font-weight: bold;
+ text-align: center;
+}
+
+#footer
+{
+ width: 720px;
+ margin-left: 160px;
+ padding: 2px 8px 2px 8px;
+ border-width: 1px 1px 1px 1px;
+ border-style: solid;
+ border-color: #82001D;
+ border-collapse: collapse;
+ background-color: #D2D2D2;
+ color: #82001D;
+ font-family: 'Trebuchet MS', Verdana, sans-serif;
+ font-size: 0.70em;
+ text-align: center;
+}
+
+#main
+{
+ width: 720px;
+ margin-left: 160px;
+ padding: 8px 8px 8px 8px;
+ border-left: 1px solid #82001D;
+ border-right: 1px solid #82001D;
+ border-collapse: collapse;
+}
+
+#main td
+{
+ font-family: 'Trebuchet MS', Verdana, sans-serif;
+ font-size: 0.8em;
+}
+
+#main td.numeric_odd
+{
+ text-align: right;
+ background-color: #C9C9C9;
+ color: #82001D;
+}
+
+#main td.numeric_even
+{
+ text-align: right;
+ background-color: #CFCFCF;
+ color: #82001D;
+}
+
+#main td.label_odd
+{
+ background-color: #A6A6A6;
+ color: #82001D;
+}
+
+#main td.label_even
+{
+ background-color: #C1C1C1;
+ color: #82001D;
+}
+
+#main th.label
+{
+ font-family: 'Trebuchet MS', Verdana, sans-serif;
+ font-size: 1em;
+ font-weight: bold;
+ background-color: #A6A6A6;
+ color: #82001D;
+}
+
+#main caption
+{
+ font-family: 'Trebuchet MS', Verdana, sans-serif;
+ font-size: 1.25em;
+ font-weight: bold;
+ padding: 4px;
+ color: #82001D;
+}
+
+a
+{
+ text-decoration: none;
+ color: #A80022;
+}
diff --git a/config/vnstat2/vnstat_php_frontend/themes/red/theme.php b/config/vnstat2/vnstat_php_frontend/themes/red/theme.php
new file mode 100644
index 00000000..2c9ba6f4
--- /dev/null
+++ b/config/vnstat2/vnstat_php_frontend/themes/red/theme.php
@@ -0,0 +1,16 @@
+ array( 225, 225, 225, 0 ),
+ 'graph_background' => array( 220, 220, 230, 0 ),
+ 'graph_background_2' => array( 205, 205, 220, 0 ),
+ 'grid_stipple_1' => array( 140, 140, 140, 0 ),
+ 'grid_stipple_2' => array( 200, 200, 200, 0 ),
+ 'border' => array( 0, 0, 0, 0 ),
+ 'text' => array( 0, 0, 0, 0 ),
+ 'rx' => array( 190, 20, 20, 50 ),
+ 'rx_border' => array( 80, 40, 40, 90 ),
+ 'tx' => array( 130, 130, 130, 50 ),
+ 'tx_border' => array( 60, 60, 60, 90 )
+ );
+?>
diff --git a/config/vnstat2/vnstat_php_frontend/vera_copyright.txt b/config/vnstat2/vnstat_php_frontend/vera_copyright.txt
new file mode 100644
index 00000000..e651be1c
--- /dev/null
+++ b/config/vnstat2/vnstat_php_frontend/vera_copyright.txt
@@ -0,0 +1,124 @@
+Bitstream Vera Fonts Copyright
+
+The fonts have a generous copyright, allowing derivative works (as
+long as "Bitstream" or "Vera" are not in the names), and full
+redistribution (so long as they are not *sold* by themselves). They
+can be be bundled, redistributed and sold with any software.
+
+The fonts are distributed under the following copyright:
+
+Copyright
+=========
+
+Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream
+Vera is a trademark of Bitstream, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the fonts accompanying this license ("Fonts") and associated
+documentation files (the "Font Software"), to reproduce and distribute
+the Font Software, including without limitation the rights to use,
+copy, merge, publish, distribute, and/or sell copies of the Font
+Software, and to permit persons to whom the Font Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright and trademark notices and this permission notice
+shall be included in all copies of one or more of the Font Software
+typefaces.
+
+The Font Software may be modified, altered, or added to, and in
+particular the designs of glyphs or characters in the Fonts may be
+modified and additional glyphs or characters may be added to the
+Fonts, only if the fonts are renamed to names not containing either
+the words "Bitstream" or the word "Vera".
+
+This License becomes null and void to the extent applicable to Fonts
+or Font Software that has been modified and is distributed under the
+"Bitstream Vera" names.
+
+The Font Software may be sold as part of a larger software package but
+no copy of one or more of the Font Software typefaces may be sold by
+itself.
+
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL
+BITSTREAM OR THE GNOME FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL,
+OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT
+SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
+
+Except as contained in this notice, the names of Gnome, the Gnome
+Foundation, and Bitstream Inc., shall not be used in advertising or
+otherwise to promote the sale, use or other dealings in this Font
+Software without prior written authorization from the Gnome Foundation
+or Bitstream Inc., respectively. For further information, contact:
+fonts at gnome dot org.
+
+Copyright FAQ
+=============
+
+ 1. I don't understand the resale restriction... What gives?
+
+ Bitstream is giving away these fonts, but wishes to ensure its
+ competitors can't just drop the fonts as is into a font sale system
+ and sell them as is. It seems fair that if Bitstream can't make money
+ from the Bitstream Vera fonts, their competitors should not be able to
+ do so either. You can sell the fonts as part of any software package,
+ however.
+
+ 2. I want to package these fonts separately for distribution and
+ sale as part of a larger software package or system. Can I do so?
+
+ Yes. A RPM or Debian package is a "larger software package" to begin
+ with, and you aren't selling them independently by themselves.
+ See 1. above.
+
+ 3. Are derivative works allowed?
+ Yes!
+
+ 4. Can I change or add to the font(s)?
+ Yes, but you must change the name(s) of the font(s).
+
+ 5. Under what terms are derivative works allowed?
+
+ You must change the name(s) of the fonts. This is to ensure the
+ quality of the fonts, both to protect Bitstream and Gnome. We want to
+ ensure that if an application has opened a font specifically of these
+ names, it gets what it expects (though of course, using fontconfig,
+ substitutions could still could have occurred during font
+ opening). You must include the Bitstream copyright. Additional
+ copyrights can be added, as per copyright law. Happy Font Hacking!
+
+ 6. If I have improvements for Bitstream Vera, is it possible they might get
+ adopted in future versions?
+
+ Yes. The contract between the Gnome Foundation and Bitstream has
+ provisions for working with Bitstream to ensure quality additions to
+ the Bitstream Vera font family. Please contact us if you have such
+ additions. Note, that in general, we will want such additions for the
+ entire family, not just a single font, and that you'll have to keep
+ both Gnome and Jim Lyles, Vera's designer, happy! To make sense to add
+ glyphs to the font, they must be stylistically in keeping with Vera's
+ design. Vera cannot become a "ransom note" font. Jim Lyles will be
+ providing a document describing the design elements used in Vera, as a
+ guide and aid for people interested in contributing to Vera.
+
+ 7. I want to sell a software package that uses these fonts: Can I do so?
+
+ Sure. Bundle the fonts with your software and sell your software
+ with the fonts. That is the intent of the copyright.
+
+ 8. If applications have built the names "Bitstream Vera" into them,
+ can I override this somehow to use fonts of my choosing?
+
+ This depends on exact details of the software. Most open source
+ systems and software (e.g., Gnome, KDE, etc.) are now converting to
+ use fontconfig (see www.fontconfig.org) to handle font configuration,
+ selection and substitution; it has provisions for overriding font
+ names and subsituting alternatives. An example is provided by the
+ supplied local.conf file, which chooses the family Bitstream Vera for
+ "sans", "serif" and "monospace". Other software (e.g., the XFree86
+ core server) has other mechanisms for font substitution.
+
diff --git a/config/vnstat2/vnstat_php_frontend/vnstat.php b/config/vnstat2/vnstat_php_frontend/vnstat.php
new file mode 100644
index 00000000..9c7e211c
--- /dev/null
+++ b/config/vnstat2/vnstat_php_frontend/vnstat.php
@@ -0,0 +1,211 @@
+
--
cgit v1.2.3
From 5f345d7ed67f48103b14c6e0e698c981698e0981 Mon Sep 17 00:00:00 2001
From: Bryan Paradis
Date: Wed, 22 Jan 2014 23:11:02 -0500
Subject: updated vnstat2.inc paths, indents, uninstall
---
config/vnstat2/vnstat2.inc | 36 +++++++++++++++++-------------------
1 file changed, 17 insertions(+), 19 deletions(-)
diff --git a/config/vnstat2/vnstat2.inc b/config/vnstat2/vnstat2.inc
index 54a15aa6..64eaaa38 100644
--- a/config/vnstat2/vnstat2.inc
+++ b/config/vnstat2/vnstat2.inc
@@ -3,16 +3,16 @@ function vnstat_install_deinstall() {
conf_mount_rw();
global $config;
// Remove Vnstat package and files
- exec("cd /var/db/pkg/ && pkg_delete `ls | grep vnstat`");
+ exec("cd /var/db/pkg/ && pkg_delete `ls | grep vnstat`");
exec("rm -d -R /usr/local/www/vnstat2");
exec("rm -d -R /usr/local/www/vnstati");
- exec("rm /usr/local/pkg/vnstat_php_frontend.xml");
- exec("rm /usr/local/pkg/vnstat2.sh");
- exec("rm /usr/local/etc/vnstat2.conf");
exec("rm /usr/local/www/diag_vnstat.php");
exec("rm /usr/local/www/diag_vnstat2.php");
exec("rm /usr/local/www/vnstati.php");
exec("rm /usr/local/www/vnstat2_img.php");
+ exec("rm -d -R /usr/local/pkg/vnstat2");
+ exec("rm /usr/local/etc/vnstat2.conf");
+
// Remove vnstat cron entry from config.xml
vnstat2_install_cron(false);
conf_mount_ro();
@@ -25,7 +25,7 @@ function vnstat2_install_cron($vnstat_cron_value) {
return;
$x=0;
foreach($config['cron']['item'] as $item) {
- if(strstr($item['command'], "/usr/local/pkg/vnstat2.sh")) {
+ if(strstr($item['command'], "/usr/local/pkg/vnstat2/vnstat2.sh")) {
$is_installed = true;
break;
}
@@ -41,7 +41,7 @@ function vnstat2_install_cron($vnstat_cron_value) {
$cron_item['month'] = "*";
$cron_item['wday'] = "*";
$cron_item['who'] = "root";
- $cron_item['command'] = "/usr/local/pkg/vnstat2.sh";
+ $cron_item['command'] = "/usr/local/pkg/vnstat2/vnstat2.sh";
$config['cron']['item'][] = $cron_item;
write_config();
configure_cron();
@@ -70,10 +70,10 @@ function change_vnstat_conf(){
$no_vnstat_phpfrontend = $config['installedpackages']['vnstat2']['config'][0]['vnstat_phpfrontend'];
if ($no_vnstat_phpfrontend == "on"){
vnstat_php_frontend();
- }
+ }
else {
exec("[ -d /usr/local/www/vnstat2 ] && rm -d -R /usr/local/www/vnstat2");
-}
+ }
conf_mount_ro();
}
@@ -149,16 +149,16 @@ function vnstat_install_config() {
conf_mount_rw();
// Create vnstat database dir where it also will work for nanobsd
// exec("[ -d /var/db/vnstat ] && mv /var/db/vnstat /conf/vnstat");
- exec("[ -d /usr/local/pkg/vnstat ] && mv /usr/local/pkg/vnstat /conf/vnstat");
+ exec("[ -d /usr/local/pkg/vnstat2/vnstat ] && mv /usr/local/pkg/vnstat2/vnstat /conf/vnstat");
exec("[ ! -d /conf/vnstat ] && mkdir /conf/vnstat");
// Check for pbi install and arch type then create symlinks
if (file_exists('/usr/pbi/vnstat-i386')) { exec("ln -s /usr/local/etc/vnstat.conf /usr/pbi/vnstat-i386/etc/vnstat.conf"); }
if (file_exists('/usr/pbi/vnstat-amd64')) { exec("ln -s /usr/local/etc/vnstat.conf /usr/pbi/vnstat-amd64/etc/vnstat.conf"); }
// Copy files to web dir
- exec("[ ! -f /usr/local/www/diag_vnstat2.php ] && cp /usr/local/pkg/diag_vnstat2.abc /usr/local/www/diag_vnstat2.php");
- exec("[ ! -f /usr/local/www/diag_vnstat.php ] && cp /usr/local/pkg/diag_vnstat.abc /usr/local/www/diag_vnstat.php");
- exec("[ ! -f /usr/local/www/vnstati.php ] && cp /usr/local/pkg/vnstati.abc /usr/local/www/vnstati.php");
- exec("[ ! -f /usr/local/www/vnstat2_img.php ] && cp /usr/local/pkg/vnstat2_img.abc /usr/local/www/vnstat2_img.php");
+ exec("[ ! -f /usr/local/www/diag_vnstat2.php ] && cp /usr/local/pkg/vnstat2/diag_vnstat2.abc /usr/local/www/diag_vnstat2.php");
+ exec("[ ! -f /usr/local/www/diag_vnstat.php ] && cp /usr/local/pkg/vnstat2/diag_vnstat.abc /usr/local/www/diag_vnstat.php");
+ exec("[ ! -f /usr/local/www/vnstati.php ] && cp /usr/local/pkg/vnstat2/vnstati.abc /usr/local/www/vnstati.php");
+ exec("[ ! -f /usr/local/www/vnstat2_img.php ] && cp /usr/local/pkg/vnstat2/vnstat2_img.abc /usr/local/www/vnstat2_img.php");
// Add MonthRotate value to config.xml and write /usr/local/etc/vnstat.conf
$no_monthrotate = $config['installedpackages']['vnstat2']['config'][0]['monthrotate'];
if ($no_monthrotate == ""){
@@ -197,10 +197,8 @@ function vnstat_install_config() {
function vnstat_php_frontend(){
global $config;
-// Unpack and move Vnstat frontend
- exec("cd ..");
- exec("tar -zxovf /usr/local/pkg/vnstat_php_frontend-1.5.1-updated.tar.gz");
- exec("mv vnstat_php_frontend-1.5.1-updated /usr/local/www/vnstat2");
+// Copy vnstat_php_frontend to www
+ exec("cp -a /usr/local/pkg/vnstat2/vnstat_php_frontend/. /usr/local/www/vnstat2/");
// Find information to be writing in config.php
// $iface_list_array_items
exec("ls /conf/vnstat/ | grep -v '\.'", $vnstat_nic_in);
@@ -228,8 +226,8 @@ function vnstat_php_frontend(){
$iface_title_array = implode($iface_title_array_items2);
// php in php static items
// added to new items for the front end version 1.5.1
- $locale = "\$locale = 'en_US.UTF-8';";
- $language = "\$language = 'en';";
+ $locale = "\$locale = 'en_US.UTF-8';";
+ $language = "\$language = 'en';";
$vnstat_bin2 = "\$vnstat_bin = '/usr/local/bin/vnstat';";
$data_dir2 = "\$data_dir = './dumps';";
$graph_format2 ="\$graph_format='svg';";
--
cgit v1.2.3
From b7ba2b9476ee4f66ce6a3710cd9b9883fc5e074d Mon Sep 17 00:00:00 2001
From: Bryan Paradis
Date: Thu, 23 Jan 2014 00:32:11 -0500
Subject: vnstat2.xml paths + additional vnstat_php_frontend
---
config/vnstat2/vnstat2.xml | 138 ++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 124 insertions(+), 14 deletions(-)
diff --git a/config/vnstat2/vnstat2.xml b/config/vnstat2/vnstat2.xml
index 6d8ba41a..428b0f60 100644
--- a/config/vnstat2/vnstat2.xml
+++ b/config/vnstat2/vnstat2.xml
@@ -10,7 +10,7 @@
1.0Vnstat2/pkg_edit.php?xml=vnstat2.xml&id=0
- /usr/local/pkg/vnstat2.inc
+ /usr/local/pkg/vnstat2/vnstat2.inc
';}
+if($pfsense_stable == 'yes'){echo '
' . $pgtitle . '
';}
/* Display Alert message */
if ($input_errors) {
print_input_errors($input_errors); // TODO: add checks
@@ -403,8 +401,11 @@ if (file_exists("/var/log/snort/snort_{$if_real}{$snort_uuid}/alert")) {
$alert_ip_src = $fields[6];
/* Add zero-width space as soft-break opportunity after each colon if we have an IPv6 address */
$alert_ip_src = str_replace(":", ":", $alert_ip_src);
- /* Add Reverse DNS lookup icon */
- $alert_ip_src .= " ";
+ /* Add Reverse DNS lookup icons */
+ $alert_ip_src .= " ";
+ $alert_ip_src .= "";
+ $alert_ip_src .= " ";
$alert_ip_src .= "";
/* Add icons for auto-adding to Suppress List if appropriate */
@@ -430,8 +431,11 @@ if (file_exists("/var/log/snort/snort_{$if_real}{$snort_uuid}/alert")) {
$alert_ip_dst = $fields[8];
/* Add zero-width space as soft-break opportunity after each colon if we have an IPv6 address */
$alert_ip_dst = str_replace(":", ":", $alert_ip_dst);
- /* Add Reverse DNS lookup icon */
- $alert_ip_dst .= " ";
+ /* Add Reverse DNS lookup icons */
+ $alert_ip_dst .= " ";
+ $alert_ip_dst .= "";
+ $alert_ip_dst .= " ";
$alert_ip_dst .= "";
/* Add icons for auto-adding to Suppress List if appropriate */
--
cgit v1.2.3
From 6e4487e155682494cf72e59cf8423f60c05a35c0 Mon Sep 17 00:00:00 2001
From: "Danilo G. Baio (dbaio)"
Date: Sun, 26 Jan 2014 13:23:31 -0200
Subject: apcupsd - add script to send mail reports
---
config/apcupsd/apcupsd_mail.php | 96 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 96 insertions(+)
create mode 100755 config/apcupsd/apcupsd_mail.php
diff --git a/config/apcupsd/apcupsd_mail.php b/config/apcupsd/apcupsd_mail.php
new file mode 100755
index 00000000..3b1e40be
--- /dev/null
+++ b/config/apcupsd/apcupsd_mail.php
@@ -0,0 +1,96 @@
+
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+*/
+
+require_once("pkg-utils.inc");
+require_once("globals.inc");
+require_once("phpmailer/class.phpmailer.php");
+
+global $config, $g;
+
+$apcstatus[killpower] = "UPS now committed to shut down";
+$apcstatus[commfailure] = "Communications with UPS lost";
+$apcstatus[commok] = "Communciations with UPS restored";
+$apcstatus[onbattery] = "Power failure. Running on UPS batteries";
+$apcstatus[offbattery] = "Power has returned...";
+$apcstatus[failing] = "UPS battery power exhaused. Doing shutdown";
+$apcstatus[timeout] = "UPS battery runtime limit exceeded. Doing shutdown";
+$apcstatus[loadlimit] = "UPS battery discharge limit reached. Doing shutdown";
+$apcstatus[runlimit] = "UPS battery runtime percent reached. Doing shutdown";
+$apcstatus[doreboot] = "Beginning Reboot Sequence";
+$apcstatus[doshutdown] = "Beginning Shutdown Sequence";
+$apcstatus[annoyme] = "Power problems please logoff";
+$apcstatus[emergency] = "Emergency Shutdown. Possible UPS battery failure";
+$apcstatus[changeme] = "Emergency! UPS batteries have failed. Change them NOW";
+$apcstatus[remotedown] = "Remote Shutdown. Beginning Shutdown Sequence";
+
+if (empty($argv[1]) || empty($apcstatus["$argv[1]"]))
+ return;
+
+$apcsubject = $apcstatus["$argv[1]"];
+
+if (empty($config['notifications']['smtp']['ipaddress']))
+ return;
+
+$mail = new PHPMailer();
+$mail->IsSMTP();
+$mail->Host = $config['notifications']['smtp']['ipaddress'];
+
+if ($config['notifications']['smtp']['ssl'] == "checked")
+ $mail->SMTPSecure = "ssl";
+
+$mail->Port = empty($config['notifications']['smtp']['port']) ? 25 : $config['notifications']['smtp']['port'];
+
+if($config['notifications']['smtp']['username'] &&
+ $config['notifications']['smtp']['password']) {
+ $mail->SMTPAuth = true;
+ $mail->Username = $config['notifications']['smtp']['username'];
+ $mail->Password = $config['notifications']['smtp']['password'];
+}
+
+$mail->ContentType = 'text/html';
+$mail->IsHTML(true);
+$mail->AddReplyTo($config['notifications']['smtp']['fromaddress'], "Apcupsd");
+$mail->SetFrom($config['notifications']['smtp']['fromaddress'], "Apcupsd");
+$address = $config['notifications']['smtp']['notifyemailaddress'];
+$mail->AddAddress($address, "Apcupsd Recipient");
+$mail->Subject = "{$config['system']['hostname']}.{$config['system']['domain']} - {$apcsubject}";
+
+putenv("PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin");
+$mail->Body = "
diff --git a/config/snort/snort_rules_edit.php b/config/snort/snort_rules_edit.php
index c0087464..28deccd5 100755
--- a/config/snort/snort_rules_edit.php
+++ b/config/snort/snort_rules_edit.php
@@ -4,6 +4,7 @@
*
* Copyright (C) 2004, 2005 Scott Ullrich
* Copyright (C) 2011 Ermal Luci
+ * Copyright (C) 2014 Bill Meeks
* All rights reserved.
*
* Adapted for FreeNAS by Volker Theile (votdev@gmx.de)
@@ -97,18 +98,22 @@ elseif (isset($_GET['ids'])) {
// If flowbit rule, point to interface-specific file
if ($file == "Auto-Flowbit Rules")
$rules_map = snort_load_rules_map("{$snortcfgdir}/rules/" . FLOWBITS_FILENAME);
+ elseif (file_exists("{$snortdir}/preproc_rules/{$file}"))
+ $rules_map = snort_load_rules_map("{$snortdir}/preproc_rules/{$file}");
else
$rules_map = snort_load_rules_map("{$snortdir}/rules/{$file}");
$contents = $rules_map[$_GET['gid']][trim($_GET['ids'])]['rule'];
$wrap_flag = "soft";
}
-
// Is it our special flowbit rules file?
elseif ($file == "Auto-Flowbit Rules")
$contents = file_get_contents("{$snortcfgdir}/rules/{$flowbit_rules_file}");
// Is it a rules file in the ../rules/ directory?
elseif (file_exists("{$snortdir}/rules/{$file}"))
$contents = file_get_contents("{$snortdir}/rules/{$file}");
+// Is it a rules file in the ../preproc_rules/ directory?
+elseif (file_exists("{$snortdir}/preproc_rules/{$file}"))
+ $contents = file_get_contents("{$snortdir}/preproc_rules/{$file}");
// Is it a fully qualified path and file?
elseif (file_exists($file))
$contents = file_get_contents($file);
--
cgit v1.2.3
From 7694df7ce3ab4c570e2d9ba1e270d1aa3192d665 Mon Sep 17 00:00:00 2001
From: bmeeks8
Date: Mon, 27 Jan 2014 21:55:53 -0500
Subject: Add disable SID icon for alerts on Alerts tab
---
config/snort/snort_alerts.php | 78 ++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 77 insertions(+), 1 deletion(-)
diff --git a/config/snort/snort_alerts.php b/config/snort/snort_alerts.php
index 8b00bf00..eb6190f5 100755
--- a/config/snort/snort_alerts.php
+++ b/config/snort/snort_alerts.php
@@ -7,6 +7,7 @@
* Copyright (C) 2003-2004 Manuel Kasper .
* Copyright (C) 2006 Scott Ullrich
* Copyright (C) 2012 Ermal Luci
+ * Copyright (C) 2013,2014 Bill Meeks
* All rights reserved.
*
* Modified for the Pfsense snort package v. 1.8+
@@ -141,6 +142,11 @@ $a_instance = &$config['installedpackages']['snortglobal']['rule'];
$snort_uuid = $a_instance[$instanceid]['uuid'];
$if_real = snort_get_real_interface($a_instance[$instanceid]['interface']);
+// Load up the arrays of force-enabled and force-disabled SIDs
+$enablesid = snort_load_sid_mods($a_instance[$instanceid]['rule_sid_on']);
+$disablesid = snort_load_sid_mods($a_instance[$instanceid]['rule_sid_off']);
+
+$pconfig = array();
if (is_array($config['installedpackages']['snortglobal']['alertsblocks'])) {
$pconfig['arefresh'] = $config['installedpackages']['snortglobal']['alertsblocks']['arefresh'];
$pconfig['alertnumber'] = $config['installedpackages']['snortglobal']['alertsblocks']['alertnumber'];
@@ -215,6 +221,64 @@ if (($_GET['act'] == "addsuppress_srcip" || $_GET['act'] == "addsuppress_dstip")
$input_errors[] = gettext("Suppress List '{$a_instance[$instanceid]['suppresslistname']}' is defined for this interface, but it could not be found!");
}
+if ($_GET['act'] == "togglesid" && is_numeric($_GET['sidid']) && is_numeric($_GET['gen_id'])) {
+ // Get the GID tag embedded in the clicked rule icon.
+ $gid = $_GET['gen_id'];
+
+ // Get the SID tag embedded in the clicked rule icon.
+ $sid= $_GET['sidid'];
+
+ // See if the target SID is in our list of modified SIDs,
+ // and toggle it if present.
+ if (isset($enablesid[$gid][$sid]))
+ unset($enablesid[$gid][$sid]);
+ if (isset($disablesid[$gid][$sid]))
+ unset($disablesid[$gid][$sid]);
+ elseif (!isset($disablesid[$gid][$sid]))
+ $disablesid[$gid][$sid] = "disablesid";
+
+ // Write the updated enablesid and disablesid values to the config file.
+ $tmp = "";
+ foreach (array_keys($enablesid) as $k1) {
+ foreach (array_keys($enablesid[$k1]) as $k2)
+ $tmp .= "{$k1}:{$k2}||";
+ }
+ $tmp = rtrim($tmp, "||");
+
+ if (!empty($tmp))
+ $a_instance[$instanceid]['rule_sid_on'] = $tmp;
+ else
+ unset($a_instance[$instanceid]['rule_sid_on']);
+
+ $tmp = "";
+ foreach (array_keys($disablesid) as $k1) {
+ foreach (array_keys($disablesid[$k1]) as $k2)
+ $tmp .= "{$k1}:{$k2}||";
+ }
+ $tmp = rtrim($tmp, "||");
+
+ if (!empty($tmp))
+ $a_instance[$instanceid]['rule_sid_off'] = $tmp;
+ else
+ unset($a_instance[$instanceid]['rule_sid_off']);
+
+ /* Update the config.xml file. */
+ write_config();
+
+ /*************************************************/
+ /* Update the snort.conf file and rebuild the */
+ /* rules for this interface. */
+ /*************************************************/
+ $rebuild_rules = true;
+ snort_generate_conf($a_instance[$instanceid]);
+ $rebuild_rules = false;
+
+ /* Soft-restart Snort to live-load the new rules */
+ snort_reload_config($a_instance[$instanceid]);
+
+ $savemsg = gettext("The state for rule {$gid}:{$sid} has been modified. Snort is 'live-reloading' the new rules list. Please wait at least 30 secs for the process to complete before toggling additional rules.");
+}
+
if ($_GET['action'] == "clear" || $_POST['delete']) {
snort_post_delete_logs($snort_uuid);
$fd = @fopen("/var/log/snort/snort_{$if_real}{$snort_uuid}/alert", "w+");
@@ -468,6 +532,18 @@ if (file_exists("/var/log/snort/snort_{$if_real}{$snort_uuid}/alert")) {
$sidsupplink = "";
}
+ /* Add icon for toggling rule state */
+ if (isset($disablesid[$fields[1]][$fields[2]])) {
+ $sid_dsbl_link = "";
+ $sid_dsbl_link .= "";
+ }
+ else {
+ $sid_dsbl_link = "";
+ $sid_dsbl_link .= "";
+ }
+ /* DESCRIPTION */
$alert_class = $fields[11];
echo "
@@ -479,7 +555,7 @@ if (file_exists("/var/log/snort/snort_{$if_real}{$snort_uuid}/alert")) {
{$alert_src_p}
{$alert_ip_dst}
{$alert_dst_p}
-
{$alert_sid_str} {$sidsupplink}
+
{$alert_sid_str} {$sidsupplink} {$sid_dsbl_link}
{$alert_descr}
\n";
--
cgit v1.2.3
From a9356103959a9aeb0a466cd3c1adcf730e630076 Mon Sep 17 00:00:00 2001
From: bmeeks8
Date: Tue, 28 Jan 2014 11:15:14 -0500
Subject: Tweak new Reverse DNS feature based on pfSense version
---
config/snort/snort_alerts.php | 30 ++++++++++++++++++++----------
config/snort/snort_blocked.php | 24 +++++++++++++++---------
2 files changed, 35 insertions(+), 19 deletions(-)
diff --git a/config/snort/snort_alerts.php b/config/snort/snort_alerts.php
index eb6190f5..804c6e8a 100755
--- a/config/snort/snort_alerts.php
+++ b/config/snort/snort_alerts.php
@@ -146,6 +146,9 @@ $if_real = snort_get_real_interface($a_instance[$instanceid]['interface']);
$enablesid = snort_load_sid_mods($a_instance[$instanceid]['rule_sid_on']);
$disablesid = snort_load_sid_mods($a_instance[$instanceid]['rule_sid_off']);
+// Grab pfSense version so we can refer to it later on this page
+$pfs_version=substr(trim(file_get_contents("/etc/version")),0,3);
+
$pconfig = array();
if (is_array($config['installedpackages']['snortglobal']['alertsblocks'])) {
$pconfig['arefresh'] = $config['installedpackages']['snortglobal']['alertsblocks']['arefresh'];
@@ -465,13 +468,17 @@ if (file_exists("/var/log/snort/snort_{$if_real}{$snort_uuid}/alert")) {
$alert_ip_src = $fields[6];
/* Add zero-width space as soft-break opportunity after each colon if we have an IPv6 address */
$alert_ip_src = str_replace(":", ":", $alert_ip_src);
- /* Add Reverse DNS lookup icons */
- $alert_ip_src .= " ";
- $alert_ip_src .= "";
- $alert_ip_src .= " ";
+ /* Add Reverse DNS lookup icons (two different links if pfSense version supports them) */
+ $alert_ip_src .= " ";
+ if ($pfs_version > 2.0) {
+ $alert_ip_src .= "";
+ $alert_ip_src .= " ";
+ }
+ $alert_ip_src .= "";
$alert_ip_src .= "";
+
/* Add icons for auto-adding to Suppress List if appropriate */
if (!snort_is_alert_globally_suppressed($supplist, $fields[1], $fields[2]) &&
!isset($supplist[$fields[1]][$fields[2]]['by_src'][$fields[6]])) {
@@ -495,11 +502,14 @@ if (file_exists("/var/log/snort/snort_{$if_real}{$snort_uuid}/alert")) {
$alert_ip_dst = $fields[8];
/* Add zero-width space as soft-break opportunity after each colon if we have an IPv6 address */
$alert_ip_dst = str_replace(":", ":", $alert_ip_dst);
- /* Add Reverse DNS lookup icons */
- $alert_ip_dst .= " ";
- $alert_ip_dst .= "";
- $alert_ip_dst .= " ";
+ /* Add Reverse DNS lookup icons (two different links if pfSense version supports them) */
+ $alert_ip_dst .= " ";
+ if ($pfs_version > 2.0) {
+ $alert_ip_dst .= "";
+ $alert_ip_dst .= " ";
+ }
+ $alert_ip_dst .= "";
$alert_ip_dst .= "";
/* Add icons for auto-adding to Suppress List if appropriate */
diff --git a/config/snort/snort_blocked.php b/config/snort/snort_blocked.php
index f190413c..4fc470d3 100644
--- a/config/snort/snort_blocked.php
+++ b/config/snort/snort_blocked.php
@@ -7,6 +7,7 @@
*
* Modified for the Pfsense snort package v. 1.8+
* Copyright (C) 2009 Robert Zelaya Sr. Developer
+ * Copyright (C) 2014 Bill Meeks
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -33,6 +34,9 @@
require_once("guiconfig.inc");
require_once("/usr/local/pkg/snort/snort.inc");
+// Grab pfSense version so we can refer to it later on this page
+$pfs_version=substr(trim(file_get_contents("/etc/version")),0,3);
+
if (!is_array($config['installedpackages']['snortglobal']['alertsblocks']))
$config['installedpackages']['snortglobal']['alertsblocks'] = array();
@@ -261,23 +265,25 @@ if ($pconfig['brefresh'] == 'on')
/* Add zero-width space as soft-break opportunity after each colon if we have an IPv6 address */
$tmp_ip = str_replace(":", ":", $blocked_ip);
-
+ /* Add reverse DNS lookup icons (two different links if pfSense version supports them) */
+ $rdns_link = "";
+ if ($pfs_version > 2.0) {
+ $rdns_link .= "";
+ $rdns_link .= " ";
+ }
+ $rdns_link .= "";
+ $rdns_link .= "";
/* use one echo to do the magic*/
echo "
\n";
}
-
}
?>
--
cgit v1.2.3
From e1e2edc25cdecd36af6f2bb2d1e75b7857cafaed Mon Sep 17 00:00:00 2001
From: bmeeks8
Date: Tue, 28 Jan 2014 11:43:56 -0500
Subject: Fix so forced rule toggles back to its default on 2nd click
---
config/snort/snort_rules.php | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/config/snort/snort_rules.php b/config/snort/snort_rules.php
index 4307c8de..71fdbd16 100755
--- a/config/snort/snort_rules.php
+++ b/config/snort/snort_rules.php
@@ -167,18 +167,12 @@ if ($_GET['act'] == "toggle" && $_GET['ids'] && !empty($rules_map)) {
$sid= $_GET['ids'];
// See if the target SID is in our list of modified SIDs,
- // and toggle it if present; otherwise, add it to the
- // appropriate list.
- if (isset($enablesid[$gid][$sid])) {
+ // and toggle it back to default if present; otherwise,
+ // add it to the appropriate modified SID list.
+ if (isset($enablesid[$gid][$sid]))
unset($enablesid[$gid][$sid]);
- if (!isset($disablesid[$gid][$sid]))
- $disablesid[$gid][$sid] = "disablesid";
- }
- elseif (isset($disablesid[$gid][$sid])) {
+ elseif (isset($disablesid[$gid][$sid]))
unset($disablesid[$gid][$sid]);
- if (!isset($enablesid[$gid][$sid]))
- $enablesid[$gid][$sid] = "enablesid";
- }
else {
if ($rules_map[$gid][$sid]['disabled'] == 1)
$enablesid[$gid][$sid] = "enablesid";
@@ -759,7 +753,7 @@ if ($savemsg) {
$textse = "";
$iconb = "icon_reject_d.gif";
$disable_cnt++;
- $title = gettext("Disabled by user. Click to toggle to enabled state");
+ $title = gettext("Disabled by user. Click to toggle to default state");
}
elseif (($v['disabled'] == 1) && (!isset($enablesid[$gid][$sid]))) {
$textss = "";
@@ -772,7 +766,7 @@ if ($savemsg) {
$textss = $textse = "";
$iconb = "icon_reject.gif";
$enable_cnt++;
- $title = gettext("Enabled by user. Click to toggle to disabled state");
+ $title = gettext("Enabled by user. Click to toggle to default state");
}
else {
$textss = $textse = "";
--
cgit v1.2.3
From c613223747934c62488bb55fb72138bec353ff61 Mon Sep 17 00:00:00 2001
From: bmeeks8
Date: Tue, 28 Jan 2014 16:01:01 -0500
Subject: Fix snort_rules_edit.php to address
http://seclist.org/fulldisclosure/2014/Jan/187
---
config/snort/snort_rules_edit.php | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/config/snort/snort_rules_edit.php b/config/snort/snort_rules_edit.php
index 28deccd5..61a9574a 100755
--- a/config/snort/snort_rules_edit.php
+++ b/config/snort/snort_rules_edit.php
@@ -115,8 +115,12 @@ elseif (file_exists("{$snortdir}/rules/{$file}"))
elseif (file_exists("{$snortdir}/preproc_rules/{$file}"))
$contents = file_get_contents("{$snortdir}/preproc_rules/{$file}");
// Is it a fully qualified path and file?
-elseif (file_exists($file))
- $contents = file_get_contents($file);
+elseif (file_exists($file)) {
+ if (substr(realpath($file), 0, strlen(SNORTLOGDIR)) != SNORTLOGDIR)
+ $contents = gettext("\n\nERROR -- File: {$file} can not be viewed!");
+ else
+ $contents = file_get_contents($file);
+}
// It is not something we can display, so exit.
else
$input_errors[] = gettext("Unable to open file: {$displayfile}");
--
cgit v1.2.3
From ec1200d91b3ad257379cf8d267c3098073b78b5d Mon Sep 17 00:00:00 2001
From: bmeeks8
Date: Tue, 28 Jan 2014 16:19:59 -0500
Subject: Bump Snort package to 2.9.5.6 v3.0.4
---
config/snort/snort.inc | 4 ++--
config/snort/snort.xml | 6 +++---
config/snort/snort_check_for_rule_updates.php | 2 +-
config/snort/snort_migrate_config.php | 2 +-
config/snort/snort_post_install.php | 2 +-
pkg_config.10.xml | 6 +++++-
pkg_config.8.xml | 10 +++++++---
pkg_config.8.xml.amd64 | 10 +++++++---
8 files changed, 27 insertions(+), 15 deletions(-)
diff --git a/config/snort/snort.inc b/config/snort/snort.inc
index d983d995..777ae9d8 100755
--- a/config/snort/snort.inc
+++ b/config/snort/snort.inc
@@ -51,10 +51,10 @@ $snortver = array();
exec("/usr/local/bin/snort -V 2>&1 |/usr/bin/grep Version | /usr/bin/cut -c20-26", $snortver);
$snort_version = $snortver[0];
if (empty($snort_version))
- $snort_version = "2.9.5.5";
+ $snort_version = "2.9.5.6";
/* package version */
-$pfSense_snort_version = "3.0.2";
+$pfSense_snort_version = "3.0.4";
$snort_package_version = "Snort {$snort_version} pkg v{$pfSense_snort_version}";
// Define SNORTDIR and SNORTLIBDIR constants according to pfSense version
diff --git a/config/snort/snort.xml b/config/snort/snort.xml
index 9d4f1d61..a2d14bf0 100755
--- a/config/snort/snort.xml
+++ b/config/snort/snort.xml
@@ -46,8 +46,8 @@
NoneCurrently there are no FAQ items provided.Snort
- 2.9.5.5
- Services:2.9.5.5 pkg v3.0.2
+ 2.9.5.6
+ Services:2.9.5.6 pkg v3.0.4/usr/local/pkg/snort/snort.incSnort
@@ -244,7 +244,7 @@
diff --git a/config/snort/snort_check_for_rule_updates.php b/config/snort/snort_check_for_rule_updates.php
index 0306c90d..9a69db1c 100755
--- a/config/snort/snort_check_for_rule_updates.php
+++ b/config/snort/snort_check_for_rule_updates.php
@@ -96,7 +96,7 @@ exec("/usr/local/bin/snort -V 2>&1 |/usr/bin/grep Version | /usr/bin/cut -c20-26
// Save the version with decimal delimiters for use in extracting the rules
$snort_version = $snortver[0];
if (empty($snort_version))
- $snort_version = "2.9.5.5";
+ $snort_version = "2.9.5.6";
// Create a collapsed version string for use in the tarball filename
$snortver[0] = str_replace(".", "", $snortver[0]);
diff --git a/config/snort/snort_migrate_config.php b/config/snort/snort_migrate_config.php
index 1a812b24..218237ab 100644
--- a/config/snort/snort_migrate_config.php
+++ b/config/snort/snort_migrate_config.php
@@ -330,7 +330,7 @@ unset($r);
// Write out the new configuration to disk if we changed anything
if ($updated_cfg) {
- $config['installedpackages']['snortglobal']['snort_config_ver'] = "3.0.2";
+ $config['installedpackages']['snortglobal']['snort_config_ver'] = "3.0.4";
log_error("[Snort] Saving configuration settings in new format...");
write_config();
log_error("[Snort] Settings successfully migrated to new configuration format...");
diff --git a/config/snort/snort_post_install.php b/config/snort/snort_post_install.php
index a3c8eced..945ddd04 100644
--- a/config/snort/snort_post_install.php
+++ b/config/snort/snort_post_install.php
@@ -1417,7 +1417,7 @@ if ($config['installedpackages']['snortglobal']['forcekeepsettings'] == 'on') {
}
/* Update Snort package version in configuration */
-$config['installedpackages']['snortglobal']['snort_config_ver'] = "3.0.2";
+$config['installedpackages']['snortglobal']['snort_config_ver'] = "3.0.4";
write_config();
/* Done with post-install, so clear flag */
diff --git a/pkg_config.10.xml b/pkg_config.10.xml
index 75bcedde..e519a088 100644
--- a/pkg_config.10.xml
+++ b/pkg_config.10.xml
@@ -393,7 +393,7 @@
http://www.snort.orgSnort is an open source network intrusion prevention and detection system (IDS/IPS). Combining the benefits of signature, protocol, and anomaly-based inspection.Security
- snort-2.9.5.5-##ARCH##.pbi
+ snort-2.9.5.6-##ARCH##.pbisecurity/snortsecurity/barnyard2
@@ -401,7 +401,11 @@
barnyard2_UNSET=ODBC PGSQL PRELUDE;barnyard2_SET=GRE IPV6 MPLS MYSQL;snort_SET=TARGETBASED PERFPROFILE DECODERPRE FLEXRESP3 GRE IPV6 MPLS NORMALIZER ZLIB;perl_SET=THREADS;WITH_THREADS=yes;WITH_IPV6=true;WITH_MPLS=true;WITH_GRE=true;WITH_TARGETBASED=true;WITH_PERFPROFILE=true;WITH_DECODERPRE=true;WITH_ZLIB=true;WITH_NORMALIZER=true;WITH_REACT=true;WITH_FLEXRESP3=true;WITHOUT_ODBC=true;WITHOUT_POSTGRESQL=true;WITHOUT_PRELUDE=true;NOPORTDOCS=truehttp://www.pfsense.com/packages/config/snort/snort.xml
+<<<<<<< Updated upstream
2.9.5.5 pkg v3.0.3
+=======
+ 2.9.5.6 pkg v3.0.4
+>>>>>>> Stashed changes
2.2Stable/snort.xml
diff --git a/pkg_config.8.xml b/pkg_config.8.xml
index b5505b8e..47709a5d 100644
--- a/pkg_config.8.xml
+++ b/pkg_config.8.xml
@@ -504,13 +504,13 @@
Securityhttp://files.pfsense.org/packages/8/All/mysql-client-5.5.34.tbz
- barnyard2-1.12.tbz
+ barnyard2-1.13.tbzlibnet11-1.1.6,1.tbzlibdnet-1.11_3.tbzlibpcap-1.4.0.tbzdaq-2.0.1.tbz
- snort-2.9.5.5.tbz
- snort-2.9.5.5-i386.pbi
+ snort-2.9.5.6.tbz
+ snort-2.9.5.6-i386.pbi/usr/ports/devel/pcre/usr/ports/net/daq/usr/ports/net/libnet
@@ -525,7 +525,11 @@
barnyard2_UNSET=ODBC PGSQL PRELUDE;barnyard2_SET=GRE IPV6 MPLS MYSQL;snort_SET=TARGETBASED PERFPROFILE DECODERPRE FLEXRESP3 GRE IPV6 MPLS NORMALIZER ZLIB;perl_SET=THREADS;WITH_THREADS=yes;WITH_IPV6=true;WITH_MPLS=true;WITH_GRE=true;WITH_TARGETBASED=true;WITH_PERFPROFILE=true;WITH_DECODERPRE=true;WITH_ZLIB=true;WITH_NORMALIZER=true;WITH_REACT=true;WITH_FLEXRESP3=true;WITHOUT_ODBC=true;WITHOUT_POSTGRESQL=true;WITHOUT_PRELUDE=true;NOPORTDOCS=truehttp://www.pfsense.com/packages/config/snort/snort.xml
+<<<<<<< Updated upstream
2.9.5.5 pkg v3.0.3
+=======
+ 2.9.5.6 pkg v3.0.4
+>>>>>>> Stashed changes
2.0Stable/snort.xml
diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64
index 9ab48dcb..6a9e6173 100644
--- a/pkg_config.8.xml.amd64
+++ b/pkg_config.8.xml.amd64
@@ -491,13 +491,13 @@
Securityhttp://files.pfsense.org/packages/amd64/8/All/mysql-client-5.5.34.tbz
- barnyard2-1.12.tbz
+ barnyard2-1.13.tbzlibnet11-1.1.6,1.tbzlibdnet-1.11_3.tbzlibpcap-1.4.0.tbzdaq-2.0.1.tbz
- snort-2.9.5.5.tbz
- snort-2.9.5.5-amd64.pbi
+ snort-2.9.5.6.tbz
+ snort-2.9.5.6-amd64.pbi/usr/ports/devel/pcre/usr/ports/net/daq/usr/ports/net/libnet
@@ -512,7 +512,11 @@
barnyard2_UNSET=ODBC PGSQL PRELUDE;barnyard2_SET=GRE IPV6 MPLS MYSQL;snort_SET=TARGETBASED PERFPROFILE DECODERPRE FLEXRESP3 GRE IPV6 MPLS NORMALIZER ZLIB;perl_SET=THREADS;WITH_THREADS=yes;WITH_IPV6=true;WITH_MPLS=true;WITH_GRE=true;WITH_TARGETBASED=true;WITH_PERFPROFILE=true;WITH_DECODERPRE=true;WITH_ZLIB=true;WITH_NORMALIZER=true;WITH_REACT=true;WITH_FLEXRESP3=true;WITHOUT_ODBC=true;WITHOUT_POSTGRESQL=true;WITHOUT_PRELUDE=true;NOPORTDOCS=truehttp://www.pfsense.com/packages/config/snort/snort.xml
+<<<<<<< Updated upstream
2.9.5.5 pkg v3.0.3
+=======
+ 2.9.5.6 pkg v3.0.4
+>>>>>>> Stashed changes
2.0Stable/snort.xml
--
cgit v1.2.3
From 6cde50b14bd3f75584f391500a4e337c5d45bcc3 Mon Sep 17 00:00:00 2001
From: bmeeks8
Date: Tue, 28 Jan 2014 16:24:16 -0500
Subject: Bump Snort package to 2.9.5.6 v3.0.4
---
pkg_config.10.xml | 4 ----
pkg_config.8.xml | 4 ----
pkg_config.8.xml.amd64 | 4 ----
3 files changed, 12 deletions(-)
diff --git a/pkg_config.10.xml b/pkg_config.10.xml
index e519a088..6fffdd20 100644
--- a/pkg_config.10.xml
+++ b/pkg_config.10.xml
@@ -401,11 +401,7 @@
barnyard2_UNSET=ODBC PGSQL PRELUDE;barnyard2_SET=GRE IPV6 MPLS MYSQL;snort_SET=TARGETBASED PERFPROFILE DECODERPRE FLEXRESP3 GRE IPV6 MPLS NORMALIZER ZLIB;perl_SET=THREADS;WITH_THREADS=yes;WITH_IPV6=true;WITH_MPLS=true;WITH_GRE=true;WITH_TARGETBASED=true;WITH_PERFPROFILE=true;WITH_DECODERPRE=true;WITH_ZLIB=true;WITH_NORMALIZER=true;WITH_REACT=true;WITH_FLEXRESP3=true;WITHOUT_ODBC=true;WITHOUT_POSTGRESQL=true;WITHOUT_PRELUDE=true;NOPORTDOCS=truehttp://www.pfsense.com/packages/config/snort/snort.xml
-<<<<<<< Updated upstream
- 2.9.5.5 pkg v3.0.3
-=======
2.9.5.6 pkg v3.0.4
->>>>>>> Stashed changes
2.2Stable/snort.xml
diff --git a/pkg_config.8.xml b/pkg_config.8.xml
index 47709a5d..e2d5998c 100644
--- a/pkg_config.8.xml
+++ b/pkg_config.8.xml
@@ -525,11 +525,7 @@
barnyard2_UNSET=ODBC PGSQL PRELUDE;barnyard2_SET=GRE IPV6 MPLS MYSQL;snort_SET=TARGETBASED PERFPROFILE DECODERPRE FLEXRESP3 GRE IPV6 MPLS NORMALIZER ZLIB;perl_SET=THREADS;WITH_THREADS=yes;WITH_IPV6=true;WITH_MPLS=true;WITH_GRE=true;WITH_TARGETBASED=true;WITH_PERFPROFILE=true;WITH_DECODERPRE=true;WITH_ZLIB=true;WITH_NORMALIZER=true;WITH_REACT=true;WITH_FLEXRESP3=true;WITHOUT_ODBC=true;WITHOUT_POSTGRESQL=true;WITHOUT_PRELUDE=true;NOPORTDOCS=truehttp://www.pfsense.com/packages/config/snort/snort.xml
-<<<<<<< Updated upstream
- 2.9.5.5 pkg v3.0.3
-=======
2.9.5.6 pkg v3.0.4
->>>>>>> Stashed changes
2.0Stable/snort.xml
diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64
index 6a9e6173..40e3ffce 100644
--- a/pkg_config.8.xml.amd64
+++ b/pkg_config.8.xml.amd64
@@ -512,11 +512,7 @@
barnyard2_UNSET=ODBC PGSQL PRELUDE;barnyard2_SET=GRE IPV6 MPLS MYSQL;snort_SET=TARGETBASED PERFPROFILE DECODERPRE FLEXRESP3 GRE IPV6 MPLS NORMALIZER ZLIB;perl_SET=THREADS;WITH_THREADS=yes;WITH_IPV6=true;WITH_MPLS=true;WITH_GRE=true;WITH_TARGETBASED=true;WITH_PERFPROFILE=true;WITH_DECODERPRE=true;WITH_ZLIB=true;WITH_NORMALIZER=true;WITH_REACT=true;WITH_FLEXRESP3=true;WITHOUT_ODBC=true;WITHOUT_POSTGRESQL=true;WITHOUT_PRELUDE=true;NOPORTDOCS=truehttp://www.pfsense.com/packages/config/snort/snort.xml
-<<<<<<< Updated upstream
- 2.9.5.5 pkg v3.0.3
-=======
2.9.5.6 pkg v3.0.4
->>>>>>> Stashed changes
2.0Stable/snort.xml
--
cgit v1.2.3
From 5689d3b8bda555037f94f9a219f8c5d6c4f99a10 Mon Sep 17 00:00:00 2001
From: bmeeks8
Date: Wed, 29 Jan 2014 12:29:35 -0500
Subject: Update tooltip text for rule enable/disable icon.
---
config/snort/snort_rules.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/config/snort/snort_rules.php b/config/snort/snort_rules.php
index 71fdbd16..86c0eba2 100755
--- a/config/snort/snort_rules.php
+++ b/config/snort/snort_rules.php
@@ -623,7 +623,7 @@ if ($savemsg) {
$textse = "";
$iconb = "icon_reject_d.gif";
$disable_cnt++;
- $title = gettext("Disabled by user. Click to toggle to enabled state");
+ $title = gettext("Disabled by user. Click to toggle to default state");
}
elseif (($v['disabled'] == 1) && (!isset($enablesid[$gid][$sid]))) {
$textss = "";
@@ -636,7 +636,7 @@ if ($savemsg) {
$textss = $textse = "";
$iconb = "icon_reject.gif";
$enable_cnt++;
- $title = gettext("Enabled by user. Click to toggle to disabled state");
+ $title = gettext("Enabled by user. Click to toggle to default state");
}
else {
$textss = $textse = "";
--
cgit v1.2.3
From a519779703195b8f16b86295ca047b01c8c8eebb Mon Sep 17 00:00:00 2001
From: mbfgit
Date: Mon, 3 Feb 2014 01:17:25 +0000
Subject: Update reverse zone for dhcp static map
Addresses Bug #3323, add PTR records for reverse zone.
---
config/bind/bind.inc | 27 ++++++++++++++++++++++++---
1 file changed, 24 insertions(+), 3 deletions(-)
diff --git a/config/bind/bind.inc b/config/bind/bind.inc
index ff3728fb..40d626db 100644
--- a/config/bind/bind.inc
+++ b/config/bind/bind.inc
@@ -438,12 +438,33 @@ EOD;
$zone_conf .= "$hostname \t IN $hosttype $hostvalue \t$hostdst\n";
}
- if (($zone[regdhcpstatic] == 'on') && is_array($config['dhcpd'])) {
- foreach ($config['dhcpd'] as $dhcpif => $dhcpifconf)
+ if (($zone[regdhcpstatic] == 'on') && is_array($config['dhcpd'])) {
+ foreach ($config['dhcpd'] as $dhcpif => $dhcpifconf)
if(is_array($dhcpifconf['staticmap']) && isset($dhcpifconf['enable']))
foreach ($dhcpifconf['staticmap'] as $host)
if ($host['ipaddr'] && $host['hostname']) {
- $zone_conf .= "{$host['hostname']}\tIN A\t{$host['ipaddr']}\n";
+ if($zonereverso == "on") {
+ $hostdomain = $dhcpifconf['domain'];
+ if(strlen($hostdomain) == 0) {
+ $hostdomain = $config['system']['domain'];
+ }
+ if(strlen($hostdomain) != 0) {
+ $hostdomain .= '.';
+ }
+ $zoneparts = array_reverse(explode('.',$zonename));
+ $addressparts = explode('.',$host['ipaddr']);
+ $addressstart = 0;
+ while($addressstart < count($zoneparts) && $addressstart < count($addressparts) && $zoneparts[$addressstart] == $addressparts[$addressstart]) {
+ $addressstart++;
+ }
+ $shortaddress='';
+ for($addresspointer = count($addressparts)-1; $addresspointer >= $addressstart; $addresspointer--) {
+ $shortaddress .= (strlen($shortaddress) > 0 ? '.' : '') . $addressparts[$addresspointer];
+ }
+ $zone_conf .= "{$shortaddress}\tIN PTR\t{$host['hostname']}.{$hostdomain}\n";
+ } else {
+ $zone_conf .= "{$host['hostname']}\tIN A\t{$host['ipaddr']}\n";
+ }
}
}
if ($zone['customzonerecords']!=""){
--
cgit v1.2.3
From e6510bf16633cd1198141fce80543a0bc983c133 Mon Sep 17 00:00:00 2001
From: "Danilo G. Baio (dbaio)"
Date: Wed, 5 Feb 2014 08:27:15 -0200
Subject: apcupsd - bump version
---
config/apcupsd/apcupsd.xml | 2 +-
pkg_config.10.xml | 2 +-
pkg_config.8.xml | 2 +-
pkg_config.8.xml.amd64 | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/config/apcupsd/apcupsd.xml b/config/apcupsd/apcupsd.xml
index ecd979f6..239046e4 100644
--- a/config/apcupsd/apcupsd.xml
+++ b/config/apcupsd/apcupsd.xml
@@ -40,7 +40,7 @@
ApcupsdServices: Apcupsd (General)Monitoring
- 0.1
+ 0.2/usr/local/pkg/apcupsd.incApcupsd has been created/modified.Apcupsd has been deleted.
diff --git a/pkg_config.10.xml b/pkg_config.10.xml
index 6dfd6f02..5bfa7d35 100644
--- a/pkg_config.10.xml
+++ b/pkg_config.10.xml
@@ -1644,7 +1644,7 @@
Set of programs for controlling APC UPS.Serviceshttp://www.pfsense.org/packages/config/apcupsd/apcupsd.xml
- apcupsd-3.14.10_1 pkg v0.1
+ apcupsd-3.14.10_1 pkg v0.2BETA2.2apcupsd.xml
diff --git a/pkg_config.8.xml b/pkg_config.8.xml
index 0e40dfb2..7f704180 100644
--- a/pkg_config.8.xml
+++ b/pkg_config.8.xml
@@ -2010,7 +2010,7 @@
Set of programs for controlling APC UPS.Serviceshttp://www.pfsense.org/packages/config/apcupsd/apcupsd.xml
- apcupsd-3.14.10_1 pkg v0.1
+ apcupsd-3.14.10_1 pkg v0.2BETA2.0apcupsd.xml
diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64
index 6454a58e..07754ff9 100644
--- a/pkg_config.8.xml.amd64
+++ b/pkg_config.8.xml.amd64
@@ -1997,7 +1997,7 @@
Set of programs for controlling APC UPS.Serviceshttp://www.pfsense.org/packages/config/apcupsd/apcupsd.xml
- apcupsd-3.14.10_1 pkg v0.1
+ apcupsd-3.14.10_1 pkg v0.2BETA2.0apcupsd.xml
--
cgit v1.2.3
From 3cac08dbc7eec3334cb8a638299c96fc6f014979 Mon Sep 17 00:00:00 2001
From: bmeeks8
Date: Thu, 6 Feb 2014 23:49:28 -0500
Subject: Fix typo in path to file.
---
config/snort/snort.priv.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config/snort/snort.priv.inc b/config/snort/snort.priv.inc
index 5e159747..795924ea 100644
--- a/config/snort/snort.priv.inc
+++ b/config/snort/snort.priv.inc
@@ -38,7 +38,7 @@ $priv_list['page-services-snort']['match'][] = "snort/snort_rulesets.php*";
$priv_list['page-services-snort']['match'][] = "snort/snort_select_alias.php*";
$priv_list['page-services-snort']['match'][] = "snort/snort_stream5_engine.php*";
$priv_list['page-services-snort']['match'][] = "pkg_edit.php?xml=snort_sync.xml*";
-$priv_list['page-services-snort']['match'][] = "pkg_edit.php?xml=sort/snort.xml*";
+$priv_list['page-services-snort']['match'][] = "pkg_edit.php?xml=snort/snort.xml*";
$priv_list['page-services-snort']['match'][] = "snort/snort_check_cron_misc.inc*";
$priv_list['page-services-snort']['match'][] = "snort/snort.inc*";
--
cgit v1.2.3
From c4ce3c7de5313e77cca2b29b656294208f02c86d Mon Sep 17 00:00:00 2001
From: bmeeks8
Date: Sun, 9 Feb 2014 15:50:41 -0500
Subject: Remove quotes around string variable -- shouldn't be there anyway.
---
config/snort/snort.inc | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/config/snort/snort.inc b/config/snort/snort.inc
index 777ae9d8..847a0dba 100755
--- a/config/snort/snort.inc
+++ b/config/snort/snort.inc
@@ -825,11 +825,11 @@ function snort_rm_blocked_install_cron($should_install) {
switch($should_install) {
case true:
$cron_item = array();
- $cron_item['minute'] = "$snort_rm_blocked_min";
- $cron_item['hour'] = "$snort_rm_blocked_hr";
- $cron_item['mday'] = "$snort_rm_blocked_mday";
- $cron_item['month'] = "$snort_rm_blocked_month";
- $cron_item['wday'] = "$snort_rm_blocked_wday";
+ $cron_item['minute'] = $snort_rm_blocked_min;
+ $cron_item['hour'] = $snort_rm_blocked_hr;
+ $cron_item['mday'] = $snort_rm_blocked_mday;
+ $cron_item['month'] = $snort_rm_blocked_month;
+ $cron_item['wday'] = $snort_rm_blocked_wday;
$cron_item['who'] = "root";
$cron_item['command'] = "/usr/bin/nice -n20 /usr/local/sbin/expiretable -t $snort_rm_blocked_expire snort2c";
@@ -927,11 +927,11 @@ function snort_rules_up_install_cron($should_install) {
switch($should_install) {
case true:
$cron_item = array();
- $cron_item['minute'] = "$snort_rules_up_min";
- $cron_item['hour'] = "$snort_rules_up_hr";
- $cron_item['mday'] = "$snort_rules_up_mday";
- $cron_item['month'] = "$snort_rules_up_month";
- $cron_item['wday'] = "$snort_rules_up_wday";
+ $cron_item['minute'] = $snort_rules_up_min;
+ $cron_item['hour'] = $snort_rules_up_hr;
+ $cron_item['mday'] = $snort_rules_up_mday;
+ $cron_item['month'] = $snort_rules_up_month;
+ $cron_item['wday'] = $snort_rules_up_wday;
$cron_item['who'] = "root";
$cron_item['command'] = "/usr/bin/nice -n20 /usr/local/bin/php -f /usr/local/pkg/snort/snort_check_for_rule_updates.php";
--
cgit v1.2.3
From 0bb5cb1d7b77b16b4c0ae9ab058ea2fc116dce58 Mon Sep 17 00:00:00 2001
From: "Danilo G. Baio (dbaio)"
Date: Wed, 12 Feb 2014 08:33:03 -0200
Subject: apcupsd - added device field
---
config/apcupsd/apcupsd.conf.php | 1 +
config/apcupsd/apcupsd.inc | 1 +
config/apcupsd/apcupsd.xml | 13 +++++++------
3 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/config/apcupsd/apcupsd.conf.php b/config/apcupsd/apcupsd.conf.php
index 6a19b915..7a0340cd 100644
--- a/config/apcupsd/apcupsd.conf.php
+++ b/config/apcupsd/apcupsd.conf.php
@@ -109,6 +109,7 @@ UPSCABLE {$upscable}
# default of 3052 will be used.
#
UPSTYPE {$upstype}
+{$device}
# POLLTIME
# Interval (in seconds) at which apcupsd polls the UPS for status. This
diff --git a/config/apcupsd/apcupsd.inc b/config/apcupsd/apcupsd.inc
index 08ddd17e..a2b8d2ff 100644
--- a/config/apcupsd/apcupsd.inc
+++ b/config/apcupsd/apcupsd.inc
@@ -139,6 +139,7 @@ function sync_package_apcupsd(){
$upsname=$apcupsd_config['upsname'];
$upscable=$apcupsd_config['upscable'];
$upstype=$apcupsd_config['upstype'];
+ $device=($apcupsd_config['device'] != ''? "DEVICE {$apcupsd_config['device']}" : "#DEVICE");
$polltime=($apcupsd_config['polltime'] != ''? $apcupsd_config['polltime'] : "60");
$onbatterydelay=($apcupsd_config['onbatterydelay'] != ''? $apcupsd_config['onbatterydelay'] : "6");
$batterylevel=($apcupsd_config['batterylevel'] != ''? $apcupsd_config['batterylevel'] : "5");
diff --git a/config/apcupsd/apcupsd.xml b/config/apcupsd/apcupsd.xml
index 239046e4..85148b2b 100644
--- a/config/apcupsd/apcupsd.xml
+++ b/config/apcupsd/apcupsd.xml
@@ -157,12 +157,6 @@ UPSTYPE DEVICE Description
catching; you usually want "APC". Port is usually
161. Community is usually "private".
-netsnmp hostname:port:vendor:community
- OBSOLETE
- Same as SNMP above but requires use of the
- net-snmp library. Unless you have a specific need
- for this old driver, you should use 'snmp' instead.
- dumb /dev/tty** Old serial character device for use with
simple-signaling UPSes.
@@ -182,6 +176,13 @@ UPSTYPE DEVICE Description 60true
+
+ Device
+ device
+
+ input
+ 60
+ Poll Timepolltime
--
cgit v1.2.3
From 4b06e8adc9bc8ddd25de359b0d6d130e853483b5 Mon Sep 17 00:00:00 2001
From: stilez
Date: Mon, 17 Feb 2014 22:47:06 +0000
Subject: Add PERMIT BOTH option, and minor enhancements
1) Add PERMIT ALL as a list type (allows whitelisting without alias->multiple manual rules)
2) Fix typo "beggining"
3) Improve SWITCH-CASE code flows in 2 places (avoid dup. code)
4) Improve explanatory text for deny/permit
Files modified:
"pfblocker.inc"
"pfblocker_lists.xml"
---
config/pf-blocker/pfblocker.inc | 36 ++++++++++++------------------------
1 file changed, 12 insertions(+), 24 deletions(-)
diff --git a/config/pf-blocker/pfblocker.inc b/config/pf-blocker/pfblocker.inc
index c40d742e..9740dce5 100755
--- a/config/pf-blocker/pfblocker.inc
+++ b/config/pf-blocker/pfblocker.inc
@@ -167,15 +167,6 @@ function sync_package_pfblocker($cron="") {
#Create rule if action permits
switch($continent_config['action']){
case "Deny_Both":
- $rule = $base_rule;
- $rule["type"] = $deny_action_inbound;
- $rule["descr"]= "$pfb_alias auto rule";
- $rule["source"]= array("address"=> $pfb_alias);
- $rule["destination"]=array("any"=>"");
- if ($pfblocker_config['enable_log']){
- $rule["log"]="";
- }
- $deny_inbound[]=$rule;
case "Deny_Outbound":
$rule = $base_rule;
$rule["type"] = $deny_action_outbound;
@@ -185,8 +176,9 @@ function sync_package_pfblocker($cron="") {
if ($pfblocker_config['enable_log']){
$rule["log"]="";
}
- $deny_outbound[]=$rule;
- break;
+ $deny_outbound[]=$rule;
+ if ($continent_config['action'] != "Deny_Both")
+ break;
case "Deny_Inbound":
$rule = $base_rule;
$rule["type"] = $deny_action_inbound;
@@ -198,6 +190,7 @@ function sync_package_pfblocker($cron="") {
}
$deny_inbound[]=$rule;
break;
+ case "Permit_Both":
case "Permit_Outbound":
$rule = $base_rule;
$rule["type"] = "pass";
@@ -208,7 +201,8 @@ function sync_package_pfblocker($cron="") {
$rule["log"]="";
}
$permit_outbound[]=$rule;
- break;
+ if ($continent_config['action'] != "Permit_Both")
+ break;
case "Permit_Inbound":
$rule = $base_rule;
$rule["type"] = "pass";
@@ -317,15 +311,6 @@ function sync_package_pfblocker($cron="") {
#Create rule if action permits
switch($list['action']){
case "Deny_Both":
- $rule = $base_rule;
- $rule["type"] = $deny_action_inbound;
- $rule["descr"]= "$alias auto rule";
- $rule["source"]= array("address"=> $alias);
- $rule["destination"]=array("any"=>"");
- if ($pfblocker_config['enable_log']){
- $rule["log"]="";
- }
- $deny_inbound[]=$rule;
case "Deny_Outbound":
$rule = $base_rule;
$rule["type"] = $deny_action_outbound;
@@ -335,8 +320,9 @@ function sync_package_pfblocker($cron="") {
if ($pfblocker_config['enable_log']){
$rule["log"]="";
}
- $deny_outbound[]=$rule;
- break;
+ $deny_outbound[]=$rule;
+ if ($list['action'] != "Deny_Both")
+ break;
case "Deny_Inbound":
$rule = $base_rule;
$rule["type"] = $deny_action_inbound;
@@ -348,6 +334,7 @@ function sync_package_pfblocker($cron="") {
}
$deny_inbound[]=$rule;
break;
+ case "Permit_Both":
case "Permit_Outbound":
$rule = $base_rule;
$rule["type"] = "pass";
@@ -358,7 +345,8 @@ function sync_package_pfblocker($cron="") {
$rule["log"]="";
}
$permit_outbound[]=$rule;
- break;
+ if ($list['action'] != "Permit_Both")
+ break;
case "Permit_Inbound":
$rule = $base_rule;
$rule["type"] = "pass";
--
cgit v1.2.3
From d01c1a51c6d984d5ea4a5c0e5859b0f3c07f5062 Mon Sep 17 00:00:00 2001
From: stilez
Date: Mon, 17 Feb 2014 22:58:02 +0000
Subject: Add PERMIT BOTH option, and minor enhancements
1) Add PERMIT ALL as a list type (allows whitelisting without alias->multiple manual rules)
2) Fix typo "beggining"
3) Improve SWITCH-CASE code flows in 2 places (avoid dup. code)
4) Improve explanatory text for deny/permit
Files modified:
"pfblocker.inc"
"pfblocker_lists.xml"
---
config/pf-blocker/pfblocker_lists.xml | 40 +++++++++++++++++++++++------------
1 file changed, 27 insertions(+), 13 deletions(-)
diff --git a/config/pf-blocker/pfblocker_lists.xml b/config/pf-blocker/pfblocker_lists.xml
index 4bde4b49..f1798d36 100755
--- a/config/pf-blocker/pfblocker_lists.xml
+++ b/config/pf-blocker/pfblocker_lists.xml
@@ -18,13 +18,16 @@
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
+
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
+
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
+
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
@@ -63,20 +66,24 @@
+
Top Spammers/pkg_edit.php?xml=pfblocker_topspammers.xml&id=0
-
+
+
Africa/pkg_edit.php?xml=pfblocker_Africa.xml&id=0
-
+
+
Asia/pkg_edit.php?xml=pfblocker_Asia.xml&id=0
-
+
+
Europe
@@ -109,6 +116,7 @@
description
+
Actionaction
@@ -176,15 +184,19 @@
List ActionDeny Inbound
Select action for network on lists you have selected.
- Note: 'Deny Both' - Will deny access on Both directions.
- 'Deny Inbound' - Will deny access from selected lists to your network.
- 'Deny Outbound' - Will deny access from your users to ip lists you selected to block.
- 'Permit Inbound' - Will allow access from selected lists to your network.
- 'Permit Outbound' - Will allow access from your users to ip lists you selected to block.
- 'Disabled' - Will just keep selection and do nothing to selected Lists.
- 'Alias Only' - Will create an alias with selected Lists to help custom rule assignments.
- While creating rules with this list, keep aliasname in the beggining of rule description and do not end description with 'rule'.
- custom rules with 'Aliasname something rule' description will be removed by package.]]>
+ 'Deny' Rules:
+ 'Deny' rules create high priority 'block' or 'reject' rules on the stated interfaces. They don't change the 'pass' rules on other interfaces. Typical uses of 'Deny' rules are:
+
Deny Both - blocks all traffic in both directions, if the source or destination IP is in the block list
+
Deny Inbound/Deny Outbound - blocks all traffic in one direction unless it is part of a session started by traffic sent in the other direction. Does not affect traffic in the other direction.
+
One way 'Deny' rules can be used to selectively block unsolicited incoming (new session) packets in one direction, while still allowing deliberate outgoing sessions to be created in the other direction.
+ 'Permit' Rules:
+ 'Permit' rules create high priority 'pass' rules on the stated interfaces. They are not the opposite of Deny rules, and don't create any 'blocking' effect anywhere. They have priority over all Deny rules. Typical uses of 'Permit' rules are:
+
To ensure that traffic to/from the listed IPs will always be allowed in the stated directions. They override almost all other Firewall rules on the stated interfaces.
+
To act as a whitelist for Deny rule exceptions, for example if a large IP range or pre-created blocklist blocks a few IPs that should be accessible.
+ 'Alias' and 'Disabled' Rules:
+
'Alias' rules create an alias for the list (and do nothing else). This enables a Pfblocker list to be used by name, in any firewall rule or Pfsense function, as desired.
+
'Disabled' rules are kept for future use, but nothing is done with them.
+ While creating rules with this list, keep aliasname in the beginning of rule description and do not end description with 'rule'. Custom rules with 'Aliasname something rule' description will be removed by package.]]>
actionselect
@@ -193,6 +205,7 @@
+
@@ -238,4 +251,5 @@
sync_package_pfblocker();
-
\ No newline at end of file
+
+
--
cgit v1.2.3
From 3e7fcc5bc0ff436c58b42ae3d07c58dbdc55f0c1 Mon Sep 17 00:00:00 2001
From: bmeeks8
Date: Mon, 17 Feb 2014 19:08:02 -0500
Subject: Fix problem with saving empty custom rules element.
---
config/snort/snort_rules.php | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/config/snort/snort_rules.php b/config/snort/snort_rules.php
index 86c0eba2..afc764fc 100755
--- a/config/snort/snort_rules.php
+++ b/config/snort/snort_rules.php
@@ -37,6 +37,7 @@ global $g, $rebuild_rules;
$snortdir = SNORTDIR;
$rules_map = array();
+$pconfig = array();
if (!is_array($config['installedpackages']['snortglobal']['rule']))
$config['installedpackages']['snortglobal']['rule'] = array();
@@ -53,8 +54,6 @@ if (is_null($id)) {
if (isset($id) && $a_rule[$id]) {
$pconfig['interface'] = $a_rule[$id]['interface'];
$pconfig['rulesets'] = $a_rule[$id]['rulesets'];
- if (!empty($a_rule[$id]['customrules']))
- $pconfig['customrules'] = base64_decode($a_rule[$id]['customrules']);
}
function truncate($string, $length) {
@@ -365,8 +364,11 @@ if ($_POST['clear']) {
exit;
}
-if ($_POST['customrules']) {
- $a_rule[$id]['customrules'] = base64_encode($_POST['customrules']);
+if ($_POST['submit']) {
+ if ($_POST['customrules'])
+ $a_rule[$id]['customrules'] = base64_encode($_POST['customrules']);
+ else
+ unset($a_rule[$id]['customrules']);
write_config();
$rebuild_rules = true;
snort_generate_conf($a_rule[$id]);
@@ -500,12 +502,12 @@ if ($savemsg) {
--
cgit v1.2.3
From f39947784f044a819d41916451336b5a827e033d Mon Sep 17 00:00:00 2001
From: bmeeks8
Date: Mon, 17 Feb 2014 22:45:16 -0500
Subject: Enable new PORT_PCAP options knob for barnyard2.
---
pkg_config.10.xml | 2 +-
pkg_config.8.xml | 2 +-
pkg_config.8.xml.amd64 | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/pkg_config.10.xml b/pkg_config.10.xml
index 6fffdd20..5346150e 100644
--- a/pkg_config.10.xml
+++ b/pkg_config.10.xml
@@ -399,7 +399,7 @@
security/barnyard2
- barnyard2_UNSET=ODBC PGSQL PRELUDE;barnyard2_SET=GRE IPV6 MPLS MYSQL;snort_SET=TARGETBASED PERFPROFILE DECODERPRE FLEXRESP3 GRE IPV6 MPLS NORMALIZER ZLIB;perl_SET=THREADS;WITH_THREADS=yes;WITH_IPV6=true;WITH_MPLS=true;WITH_GRE=true;WITH_TARGETBASED=true;WITH_PERFPROFILE=true;WITH_DECODERPRE=true;WITH_ZLIB=true;WITH_NORMALIZER=true;WITH_REACT=true;WITH_FLEXRESP3=true;WITHOUT_ODBC=true;WITHOUT_POSTGRESQL=true;WITHOUT_PRELUDE=true;NOPORTDOCS=true
+ barnyard2_UNSET=ODBC PGSQL PRELUDE;barnyard2_SET=GRE IPV6 MPLS MYSQL PORT_PCAP;snort_SET=TARGETBASED PERFPROFILE DECODERPRE FLEXRESP3 GRE IPV6 MPLS NORMALIZER ZLIB;perl_SET=THREADS;WITH_THREADS=yes;WITH_IPV6=true;WITH_MPLS=true;WITH_GRE=true;WITH_TARGETBASED=true;WITH_PERFPROFILE=true;WITH_DECODERPRE=true;WITH_ZLIB=true;WITH_NORMALIZER=true;WITH_REACT=true;WITH_FLEXRESP3=true;WITHOUT_ODBC=true;WITHOUT_POSTGRESQL=true;WITHOUT_PRELUDE=true;NOPORTDOCS=truehttp://www.pfsense.com/packages/config/snort/snort.xml2.9.5.6 pkg v3.0.42.2
diff --git a/pkg_config.8.xml b/pkg_config.8.xml
index e2d5998c..312dadb4 100644
--- a/pkg_config.8.xml
+++ b/pkg_config.8.xml
@@ -523,7 +523,7 @@
security/barnyard2
- barnyard2_UNSET=ODBC PGSQL PRELUDE;barnyard2_SET=GRE IPV6 MPLS MYSQL;snort_SET=TARGETBASED PERFPROFILE DECODERPRE FLEXRESP3 GRE IPV6 MPLS NORMALIZER ZLIB;perl_SET=THREADS;WITH_THREADS=yes;WITH_IPV6=true;WITH_MPLS=true;WITH_GRE=true;WITH_TARGETBASED=true;WITH_PERFPROFILE=true;WITH_DECODERPRE=true;WITH_ZLIB=true;WITH_NORMALIZER=true;WITH_REACT=true;WITH_FLEXRESP3=true;WITHOUT_ODBC=true;WITHOUT_POSTGRESQL=true;WITHOUT_PRELUDE=true;NOPORTDOCS=true
+ barnyard2_UNSET=ODBC PGSQL PRELUDE;barnyard2_SET=GRE IPV6 MPLS MYSQL PORT_PCAP;snort_SET=TARGETBASED PERFPROFILE DECODERPRE FLEXRESP3 GRE IPV6 MPLS NORMALIZER ZLIB;perl_SET=THREADS;WITH_THREADS=yes;WITH_IPV6=true;WITH_MPLS=true;WITH_GRE=true;WITH_TARGETBASED=true;WITH_PERFPROFILE=true;WITH_DECODERPRE=true;WITH_ZLIB=true;WITH_NORMALIZER=true;WITH_REACT=true;WITH_FLEXRESP3=true;WITHOUT_ODBC=true;WITHOUT_POSTGRESQL=true;WITHOUT_PRELUDE=true;NOPORTDOCS=truehttp://www.pfsense.com/packages/config/snort/snort.xml2.9.5.6 pkg v3.0.42.0
diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64
index 40e3ffce..07a71880 100644
--- a/pkg_config.8.xml.amd64
+++ b/pkg_config.8.xml.amd64
@@ -510,7 +510,7 @@
security/barnyard2
- barnyard2_UNSET=ODBC PGSQL PRELUDE;barnyard2_SET=GRE IPV6 MPLS MYSQL;snort_SET=TARGETBASED PERFPROFILE DECODERPRE FLEXRESP3 GRE IPV6 MPLS NORMALIZER ZLIB;perl_SET=THREADS;WITH_THREADS=yes;WITH_IPV6=true;WITH_MPLS=true;WITH_GRE=true;WITH_TARGETBASED=true;WITH_PERFPROFILE=true;WITH_DECODERPRE=true;WITH_ZLIB=true;WITH_NORMALIZER=true;WITH_REACT=true;WITH_FLEXRESP3=true;WITHOUT_ODBC=true;WITHOUT_POSTGRESQL=true;WITHOUT_PRELUDE=true;NOPORTDOCS=true
+ barnyard2_UNSET=ODBC PGSQL PRELUDE;barnyard2_SET=GRE IPV6 MPLS MYSQL PORT_PCAP;snort_SET=TARGETBASED PERFPROFILE DECODERPRE FLEXRESP3 GRE IPV6 MPLS NORMALIZER ZLIB;perl_SET=THREADS;WITH_THREADS=yes;WITH_IPV6=true;WITH_MPLS=true;WITH_GRE=true;WITH_TARGETBASED=true;WITH_PERFPROFILE=true;WITH_DECODERPRE=true;WITH_ZLIB=true;WITH_NORMALIZER=true;WITH_REACT=true;WITH_FLEXRESP3=true;WITHOUT_ODBC=true;WITHOUT_POSTGRESQL=true;WITHOUT_PRELUDE=true;NOPORTDOCS=truehttp://www.pfsense.com/packages/config/snort/snort.xml2.9.5.6 pkg v3.0.42.0
--
cgit v1.2.3
From 3b2e843e625ab989c6491694f1bd7a5e895d88cc Mon Sep 17 00:00:00 2001
From: PiBa-NL
Date: Tue, 18 Feb 2014 19:40:27 +0100
Subject: haproxy-devel, use same checks to show if acl's are used and for
writing the configuration file
---
config/haproxy-devel/haproxy.inc | 72 +++++++++++++++++-------------
config/haproxy-devel/haproxy_listeners.php | 4 --
2 files changed, 41 insertions(+), 35 deletions(-)
diff --git a/config/haproxy-devel/haproxy.inc b/config/haproxy-devel/haproxy.inc
index d039b55a..24be5363 100644
--- a/config/haproxy-devel/haproxy.inc
+++ b/config/haproxy-devel/haproxy.inc
@@ -898,10 +898,8 @@ function haproxy_writeconf($configpath) {
$default_backend = "";
$i = 0;
foreach ($bind['config'] as $frontend) {
- $a_acl=&$frontend['ha_acls']['item'];
- if(!is_array($a_acl))
- $a_acl=array();
-
+ $a_acl = &get_frontend_acls($frontend);
+
$poolname = $frontend['backend_serverpool'] . "_" . strtolower($frontend['type']);
// Create different pools if the svrport is set
@@ -913,31 +911,6 @@ function haproxy_writeconf($configpath) {
$a_pendingpl[$poolname]['name'] = $poolname;
$a_pendingpl[$poolname]['frontend'] = $frontend;
}
-
- if (strtolower($bind['type']) == "http" && $frontend['ssloffload']) {
- $aclname = "SNI_" . $poolname;
- if ($frontend['ssloffloadacl']){
- $cert = lookup_cert($frontend['ssloffloadcert']);
- $cert_cn = cert_get_cn($cert['crt']);
- $descr = haproxy_escape_acl_name($cert['descr']);
- $a_acl[] = array('name' => "{$aclname}_{$descr}",'expression' => 'host_matches', 'value' => $cert_cn);
- unset($cert);
- }
- if ($frontend['ssloffloadacladditional']){
- $certs = $frontend['ha_certificates']['item'];
- if (is_array($certs)){
- if (count($certs) > 0){
- foreach($certs as $certref){
- $cert = lookup_cert($certref['ssl_certificate']);
- $cert_cn = cert_get_cn($cert['crt']);
- $descr = haproxy_escape_acl_name($cert['descr']);
- $a_acl[] = array('name' => "{$aclname}_{$descr}",'expression' => 'host_matches', 'value' => $cert_cn);
- unset($cert);
- }
- }
- }
- }
- }
// Write this out once, and must be before any backend config text
if (($default_backend == "" || $frontend['secondary'] != 'yes') && count($a_acl) == 0 ) {
@@ -947,8 +920,8 @@ function haproxy_writeconf($configpath) {
// combine acl's with same name to allow for 'combined checks' to check for example hostname and fileextension together..
$a_acl_combine = array();
foreach ($a_acl as $entry) {
- $name = $entry['name'];
- $a_acl_combine[$name][] = $entry;
+ $name = $entry['ref']['name'];
+ $a_acl_combine[$name][] = $entry['ref'];
}
foreach ($a_acl_combine as $a_usebackend) {
@@ -1338,6 +1311,43 @@ function get_frontend_acls($frontend) {
$result[] = $acl_item;
}
}
+
+ $mainfrontend = get_primaryfrontend($frontend);
+ if (strtolower($mainfrontend['type']) == "http" && $mainfrontend['ssloffload']) {
+ $a_acl = &$frontend['ha_acls']['item'];
+ if(!is_array($a_acl))
+ $a_acl=array();
+
+ $poolname = $frontend['backend_serverpool'] . "_" . strtolower($frontend['type']);
+ $aclname = "SNI_" . $poolname;
+ if ($frontend['ssloffloadacl']){
+ $cert = lookup_cert($frontend['ssloffloadcert']);
+ $cert_cn = cert_get_cn($cert['crt']);
+ $descr = haproxy_escape_acl_name($cert['descr']);
+ unset($cert);
+ $acl_item = array();
+ $acl_item['descr'] = "Certificate ACL ".$cert_cn;
+ $acl_item['ref'] = array('name' => "{$aclname}_{$descr}",'expression' => 'host_matches', 'value' => $cert_cn);
+ $result[] = $acl_item;
+ }
+ if ($frontend['ssloffloadacladditional']){
+ $certs = $frontend['ha_certificates']['item'];
+ if (is_array($certs)){
+ if (count($certs) > 0){
+ foreach($certs as $certref){
+ $cert = lookup_cert($certref['ssl_certificate']);
+ $cert_cn = cert_get_cn($cert['crt']);
+ $descr = haproxy_escape_acl_name($cert['descr']);
+ unset($cert);
+ $acl_item = array();
+ $acl_item['descr'] = "Additional certificate ACLs: ".$cert_cn;
+ $acl_item['ref'] = array('name' => "{$aclname}_{$descr}",'expression' => 'host_matches', 'value' => $cert_cn);
+ $result[] = $acl_item;
+ }
+ }
+ }
+ }
+ }
return $result;
}
diff --git a/config/haproxy-devel/haproxy_listeners.php b/config/haproxy-devel/haproxy_listeners.php
index 2a1f12e6..ea289b1f 100644
--- a/config/haproxy-devel/haproxy_listeners.php
+++ b/config/haproxy-devel/haproxy_listeners.php
@@ -169,10 +169,6 @@ include("head.inc");
foreach ($acls as $acl) {
$isaclset .= "
" . $acl['descr'];
}
- if ($frontend['ssloffloadacl'])
- $isaclset .= "
" . "Certificate ACL";
- if ($frontend['ssloffloadacladditional'])
- $isaclset .= "
" . "Additional certificate ACLs";
if ($isaclset)
echo "";
--
cgit v1.2.3
From 02f1cef4b3a8a980e204b895590c7a4c8509aceb Mon Sep 17 00:00:00 2001
From: PiBa-NL
Date: Tue, 18 Feb 2014 20:21:05 +0100
Subject: haproxy-devel, add some extra 'help' text and correction on source
formating tabs
---
config/haproxy-devel/haproxy_global.php | 30 ++++++-------
config/haproxy-devel/haproxy_listeners_edit.php | 9 ++--
config/haproxy-devel/haproxy_pool_edit.php | 57 +++++++++++++++++++++----
3 files changed, 67 insertions(+), 29 deletions(-)
diff --git a/config/haproxy-devel/haproxy_global.php b/config/haproxy-devel/haproxy_global.php
index 8264558f..c9a25eee 100755
--- a/config/haproxy-devel/haproxy_global.php
+++ b/config/haproxy-devel/haproxy_global.php
@@ -161,20 +161,6 @@ function enable_change(enable_change) {
-
-
Recalculate certificate chain.
-
-
-
-
-
-
-
- This can be required after certificates have been created or imported. As pfSense 2.1.0 currently does not
- always keep track of these dependencies which might be required to create a proper certificate chain when using SSLoffloading.
-
-
-
General settings
@@ -357,7 +343,8 @@ function enable_change(enable_change) {
-
+ $textrowcount = max(substr_count($pconfig['advanced'],"\n"), 2) + 2; ?>
+
NOTE: paste text into this box that you would like to pass thru in the global settings area.
@@ -367,6 +354,19 @@ function enable_change(enable_change) {
+
+
Recalculate certificate chain.
+
+
+
+
+
+ (Other changes on this page will be lost)
+
+ This can be required after certificates have been created or imported. As pfSense 2.1.0 currently does not
+ always keep track of these dependencies which might be required to create a proper certificate chain when using SSLoffloading.
+
- maxlength="64" />
+ />
NOTE: Paste additional ssl options(without commas) to include on ssl listening options.
some options: force-sslv3, force-tlsv10 force-tlsv11 force-tlsv12 no-sslv3 no-tlsv10 no-tlsv11 no-tlsv12 no-tls-tickets
diff --git a/config/haproxy-devel/haproxy_pool_edit.php b/config/haproxy-devel/haproxy_pool_edit.php
index 9b64df87..86b325c1 100644
--- a/config/haproxy-devel/haproxy_pool_edit.php
+++ b/config/haproxy-devel/haproxy_pool_edit.php
@@ -308,6 +308,18 @@ foreach($simplefields as $field){
}
}
}
+ function toggleCSSdisplay(cssID)
+ {
+ var ss = document.styleSheets;
+ for (var i=0; i
Server list
+
+ Toggle serverlist help. ">
+
$counter=0;
$a_servers = $pconfig['a_servers'];
haproxy_htmllist("tableA_servers", $a_servers, $fields_servers);
?>
+
+
+ Mode:
Active: server will be used normally
+ Backup: server is only used in load balancing when all other non-backup servers are unavailable
+ Disabled: server is marked down in maintenance mode
+ Inactive: server will not be available for use
+
+ Name:
Used to as a name for the server in for example the stats EXAMPLE: MyWebServer
+
+ Address:
IP or hostname(only resolved on start-up.) EXAMPLE: 192.168.1.22 , fe80::1000:2000:3000:4000%em0 , WebServer1.localdomain
+
+ Port:
The port of the backend. EXAMPLE: 80 or 443
+
+ SSL:
Is the backend using SSL (commonly with port 443)
+
+ Weight:
A weight between 0 and 256, this setting can be used when multiple servers on different hardware need to be balanced with with a different part the traffic. A server with weight 0 wont get new traffic. Default if empty: 1
+
+ Cookie:
the value of the cookie used to identify a server (only when cookie-persistence is enabled below)
+
@@ -459,6 +496,7 @@ foreach($simplefields as $field){
Transparent ClientIP
+ WARNING Activating this option will load rules in IPFW and might interfere with CaptivePortal and possibly other services due to the way server return traffic must be 'captured' with a automatically created fwd rule. This also breaks directly accessing the (web)server on the ports configured above. Also a automatic sloppy pf rule is made to allow HAProxy to server traffic.
onclick='updatevisibility();' />
Use Client-IP to connect to backend servers.
@@ -479,7 +517,7 @@ foreach($simplefields as $field){
For proper workings this requires the reply's traffic to pass through pfSense by means of correct routing.
(uses the option "source 0.0.0.0 usesrc clientip")
- Note : When this is enabled for a single backend HAProxy will run as 'root', which reduces security.
+ Note : When this is enabled for a single backend HAProxy will run as 'root' instead of chrooting to a lower privileged user, this reduces security in case of a a bit.
@@ -494,7 +532,8 @@ foreach($simplefields as $field){
Backend pass thru
-
+ $textrowcount = max(substr_count($pconfig['advanced_backend'],"\n"), 2) + 2; ?>
+
NOTE: paste text into this box that you would like to pass thru. Applied to the backend section.
@@ -629,10 +668,10 @@ set by the 'retries' parameter.
-
+
Cookie persistence
-
-
+
+
Cookie Enabled
onclick='updatevisibility();' />
@@ -664,7 +703,7 @@ set by the 'retries' parameter.
-
+
Cookie Cachable
@@ -673,11 +712,11 @@ set by the 'retries' parameter.
-
+
Stick-table persistence
-
+
These options are used to make sure seperate requests from a single client go to the same backend. This can be required for servers that keep track of for example a shopping cart.
-
+
Stick tables
--
cgit v1.2.3
From 6c79f4d46a7f3ea42094e33e123001d6fbf0546b Mon Sep 17 00:00:00 2001
From: Ermal
Date: Tue, 18 Feb 2014 19:41:20 +0000
Subject: Add ladvd package from Ticket #3456. With modification to bring it to
current levels and pfsense urls.
---
config/ladvd/ladvd.inc | 104 +++++++++++++++++++++++++++++
config/ladvd/ladvd.xml | 149 ++++++++++++++++++++++++++++++++++++++++++
config/ladvd/status_ladvd.php | 118 +++++++++++++++++++++++++++++++++
3 files changed, 371 insertions(+)
create mode 100644 config/ladvd/ladvd.inc
create mode 100644 config/ladvd/ladvd.xml
create mode 100644 config/ladvd/status_ladvd.php
diff --git a/config/ladvd/ladvd.inc b/config/ladvd/ladvd.inc
new file mode 100644
index 00000000..acf277b3
--- /dev/null
+++ b/config/ladvd/ladvd.inc
@@ -0,0 +1,104 @@
+ "ladvd.sh",
+ "start" => "/usr/local/sbin/ladvd $cmdline",
+ "stop" => "/usr/bin/killall -9 ladvd"
+ )
+ );
+
+ restart_service("ladvd");
+ sleep(1);
+ conf_mount_ro();
+}
+
+?>
diff --git a/config/ladvd/ladvd.xml b/config/ladvd/ladvd.xml
new file mode 100644
index 00000000..d250f16c
--- /dev/null
+++ b/config/ladvd/ladvd.xml
@@ -0,0 +1,149 @@
+
+
+
+
+
+ Link Layer Discovery Protocol
+ LADVD
+ 1.0.2
+ Network Management
+ Services: LADVD
+ ladvd
+ /usr/local/pkg/ladvd.inc
+ /pkg_edit.php?xml=ladvd.xml&id=0
+
+ http://www.pfsense.com/packages/config/ladvd/ladvd.inc
+ /usr/local/pkg/
+ 0644
+
+
+ /usr/local/www/
+ 0755
+ http://www.pfsense.com/packages/config/ladvd/status_ladvd.php
+
+
+ LADVD
+ Modify LADVD settings.
+ Services
+ /pkg_edit.php?xml=ladvd.xml&id=0
+
+
+ LADVD Status
+
+ Status
+ /status_ladvd.php
+
+
+ ladvd
+ ladvd.sh
+ ladvd
+ Send and decode link layer advertisements
+
+
+
+ General
+ /pkg_edit.php?xml=ladvd.xml&id=0
+
+
+
+ Status
+ /status_ladvd.php
+
+
+
+
+ Enable ladvd
+ enable
+ Enable or disable ladvd
+ iface_array[],autoenable,silent,management,location,lldp,cdp,edp,ndp
+ checkbox
+
+
+ Interfaces
+ iface_array
+ lan
+ true
+ 3
+ interfaces_selection
+ Select the interfaces that LADVD will bind to. You can use the CTRL or COMMAND key to select multiple interfaces.
+
+
+ Auto-enable protocols
+ autoenable
+ Auto-enable protocols based on received packets (also enables receive mode).
+ checkbox
+
+
+ Silent
+ silent
+ Silent, don't transmit packets.
+ checkbox
+
+
+ Management interfaces
+ management
+ lan
+ interfaces_selection
+ The management interface for this host. Addresses on this interface are auto-detected (IPv4 and IPv6).
+
+
+ System Location
+ location
+ input
+ 30
+ Specify the physical location of the host.
+
+
+ Enable LLDP
+ lldp
+ Enable LLDP (Link Layer Discovery Protocol).
+ checkbox
+
+
+ Enable CDP
+ cdp
+ Enable CDP (Cisco Discovery Protocol).
+ checkbox
+
+
+ Enable EDP
+ edp
+ Enable EDP (Extreme Discovery Protocol).
+ checkbox
+
+
+ Enable NDP
+ ndp
+ Enable NDP (Nortel Discovery Protocol) formerly called SynOptics Network Management Protocol (SONMP).
+ checkbox
+
+
+ ladvd_resync_config();
+
diff --git a/config/ladvd/status_ladvd.php b/config/ladvd/status_ladvd.php
new file mode 100644
index 00000000..3333145a
--- /dev/null
+++ b/config/ladvd/status_ladvd.php
@@ -0,0 +1,118 @@
+This status page includes the following information:\n";
+ echo "