From 5742e4c99f53f9dbbcc962e9f967a4c377c209b9 Mon Sep 17 00:00:00 2001
From: Marius Cramer <m.cramer@pixcept.de>
Date: Tue, 29 Jul 2014 02:46:41 -0400
Subject: [PATCH] Fixed: FS#3581 - Website unaccessible under some circumstances when using seo redirection *.domain to www.domain (only for apache2, nginx still to do)

---
 server/plugins-available/iptables_plugin.inc.php |   67 ++++++++++++++++++---------------
 1 files changed, 36 insertions(+), 31 deletions(-)

diff --git a/server/plugins-available/iptables_plugin.inc.php b/server/plugins-available/iptables_plugin.inc.php
index 2aba144..92083bb 100644
--- a/server/plugins-available/iptables_plugin.inc.php
+++ b/server/plugins-available/iptables_plugin.inc.php
@@ -2,40 +2,43 @@
 
 class iptables_plugin
 {
- var $plugin_name = 'iptables_plugin';
- var $class_name  = 'iptables_plugin';
+	var $plugin_name = 'iptables_plugin';
+	var $class_name  = 'iptables_plugin';
 
- function onInstall()
- {
-  global $conf;
+	function onInstall()
+	{
+		global $conf;
+		/*
   if($conf['iptables']['installed'] = true) return true;
   else return false;
- }
+  */
+		return false;
+	}
 
- function onLoad()
- {
-  global $app;
-  $app->plugins->registerEvent('iptables_insert',$this->plugin_name,'insert');
-  $app->plugins->registerEvent('iptables_update',$this->plugin_name,'update');
-  $app->plugins->registerEvent('iptables_delete',$this->plugin_name,'delete');
- }
+	function onLoad()
+	{
+		global $app;
+		$app->plugins->registerEvent('iptables_insert', $this->plugin_name, 'insert');
+		$app->plugins->registerEvent('iptables_update', $this->plugin_name, 'update');
+		$app->plugins->registerEvent('iptables_delete', $this->plugin_name, 'delete');
+	}
 
- function insert($event_name,$data)
- {
-  global $app, $conf;
-  $this->update($event_name,$data);
- }
+	function insert($event_name, $data)
+	{
+		global $app, $conf;
+		$this->update($event_name, $data);
+	}
 
- function update($event_name,$data)
- {
-  global $app, $conf;
-/*
+	function update($event_name, $data)
+	{
+		global $app, $conf;
+		/*
 ok, here is where we do some fun stuff.  First off we need to see the currently
 running iptables (sans the fail2ban) and compare with the database.  This is
 the method that is good for multi servers and keeping the firewall read only so
 a comromised box will not corrupt the master server.
 
-If the running iptables and the new iptables don't match, lets send a note to 
+If the running iptables and the new iptables don't match, lets send a note to
 the monitoring data to say that there is a difference.  Maybe we can have the
 iptables gui inteface check the data field for changes and post a warning and
 or the changes as disabled rules.  If an admin adds a rule on the comand line
@@ -67,12 +70,14 @@
 $data['new'] should have lots of fun stuff
 exec('iptables -I XYZ');
 */
- }
-	
- function delete($event_name,$data)
- {
-  global $app, $conf;
-  exec('iptables -D xyz');
- }
+	}
+
+	function delete($event_name, $data)
+	{
+		global $app, $conf;
+		exec('iptables -D xyz');
+	}
+
 }
-?>
\ No newline at end of file
+
+?>

--
Gitblit v1.9.1