Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /////////////////////////////////////////////////////////////////////////////////////
- // IPTable log analyzer
- // Copyright (C) 2002 Gerald GARCIA
- //
- // 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 Plac<B2>e - Suite 330, Boston, MA 02111-1307, USA.
- //
- // This release put together by: junk@futurewest.ca
- // Contact original author : gege@gege.org
- /////////////////////////////////////////////////////////////////////////////////////
- // $Id: config.php.default,v 1.3 2007/02/23 22:44:52 tarbuck Exp $
- # Host of the MySQL database
- $db_host="localhost";
- # User of the MySQL database
- $db_user="iptablelog_user";
- # Password of the MySQL database
- $db_password="nottelling";
- # Name of the database
- $db_name="iptablelog";
- # Table format (ulog or native, native is default)
- # Note: ulog schema is not compatible with ignored ports
- $host_resolution_avail = 1;
- # URL Path to your installation
- $url_base="/iptablelog/";
- # File Path to your installation
- $file_base="/var/www/htdocs/iptablelog"; # i.e. "/var/www/html/iptablelog"
- #debug mode
- $debug=1;
- #The default number of record displayed
- $default_number=50;
- #The default chain displayed
- $default_chain="ALL";
- #The default date for packets (10000 means any)
- $default_date=10000;
- #The default ignored ports
- $default_ignored_ports= array();
- #############################
- # CACHE CONFIGURATION
- #############################
- #The cache directory (set it to "" means no cache)
- $cache_dir="/tmp/.iptables";
- #The cache delay (items younger than $cache_delay in second will not be regenerated)
- $cache_delay = 300;
- #############################
- # COLUMNS TO BE DISPLAYED
- #############################
- #Display netfilter host in listings (0->no - 1->yes)
- $display_netfilter_host_default=1;
- #Display netfilter interface in listings (0->no - 1->yes)
- $display_netfilter_interface_default=1;
- #Display netfilter source port in listings (0->no - 1->yes)
- $display_netfilter_srcprt_default=0;
- #Display netfilter destination in listings (0->no - 1->yes)
- $display_netfilter_destination_default=1;
- #Default number of domain components (with 3, a.b.c.d gives domain of c.d - with 4, domain is b.c.d)
- $domain_len_default = 3;
- #############################
- # MODULES TO BE DISPLAYED
- #############################
- #Modules visibility (0->no - 1->yes)
- $module_display_default["TopHosts"]=1;
- $module_display_default["TopProto"]=1;
- $module_display_default["TopPorts"]=1;
- $module_display_default["TopDomains"]=1;
- $module_display_default["DatabaseStats"]=1;
- #############################
- # CSS STYLES
- #############################
- $css_style_default="blue";
- $css_styles["green"]="iptables";
- $css_styles["blue"]="iptables_blue";
- # Newly added stuff
- # Just in case someone decides to write a pgsql plugin
- $db_style = "mysql";
- # get the requires out of the way here, so we don't have to
- # worry about it later
- require_once("$file_base/utils/db_$db_style.php");
- require_once("$file_base/utils/Messages.php");
- require_once("$file_base/utils/Misc.php");
- require_once("$file_base/modules/TopDomains.php");
- require_once("$file_base/modules/DatabaseStats.php");
- require_once("$file_base/modules/TopProto.php");
- require_once("$file_base/modules/TopPorts.php");
- require_once("$file_base/modules/TopHosts.php");
- require_once("$file_base/modules/PacketSelector.php");
- require_once("$file_base/utils/Layout.php");
- require_once("$file_base/utils/Context.php");
- # create a message class so other plugins can return info
- # to the user
- $messages = new Message;
- # connect to the database
- db_connect($db_host, $db_name, $db_user, $db_password);
- if (count($ignored_ports) != 0) {
- $ignored_list="and port_dest not in (";
- $first=1;
- foreach(array_keys($ignored_ports) as $ignored_port) {
- if ($first) {
- $ignored_list=$ignored_list.$ignored_port;
- $first=0;
- } else {
- $ignored_list=$ignored_list.",".$ignored_port;
- }
- }
- $ignored_list=$ignored_list.")";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement