From e4145897ff096831668ab3d02a190ff1dc81dffe Mon Sep 17 00:00:00 2001 From: Marcello Coutinho Date: Mon, 17 Oct 2011 19:58:17 -0200 Subject: zebedee tunneling package --- config/zebedee/zebedee.inc | 329 +++++++++++++++++++++++++++++++++ config/zebedee/zebedee.sh | 6 + config/zebedee/zebedee.xml | 298 +++++++++++++++++++++++++++++ config/zebedee/zebedee_del_key.php | 54 ++++++ config/zebedee/zebedee_get_key.php | 44 +++++ config/zebedee/zebedee_key_details.xml | 115 ++++++++++++ config/zebedee/zebedee_keys.php | 145 +++++++++++++++ config/zebedee/zebedee_log.php | 112 +++++++++++ config/zebedee/zebedee_sync.xml | 117 ++++++++++++ config/zebedee/zebedee_tunnels.xml | 127 +++++++++++++ config/zebedee/zebedee_view_config.php | 97 ++++++++++ pkg_config.8.xml | 15 ++ pkg_config.8.xml.amd64 | 15 ++ 13 files changed, 1474 insertions(+) create mode 100755 config/zebedee/zebedee.inc create mode 100755 config/zebedee/zebedee.sh create mode 100644 config/zebedee/zebedee.xml create mode 100644 config/zebedee/zebedee_del_key.php create mode 100644 config/zebedee/zebedee_get_key.php create mode 100644 config/zebedee/zebedee_key_details.xml create mode 100644 config/zebedee/zebedee_keys.php create mode 100644 config/zebedee/zebedee_log.php create mode 100644 config/zebedee/zebedee_sync.xml create mode 100755 config/zebedee/zebedee_tunnels.xml create mode 100644 config/zebedee/zebedee_view_config.php diff --git a/config/zebedee/zebedee.inc b/config/zebedee/zebedee.inc new file mode 100755 index 00000000..d66a269b --- /dev/null +++ b/config/zebedee/zebedee.inc @@ -0,0 +1,329 @@ + $v) + { + // especify only one port for this host + if($v['port']=="") $end=" " ; else $end = ":".$v['port'] ; + $tunnels .= "target ".$v['ipaddress'].$end."\n" ; + } + + +# Write tunnels and targets configuration file +$fd = fopen("/usr/local/etc/tunnels.zbd", "w"); +$cfg_file = <<> /usr/local/etc/zebedee/".$_REQUEST['id'].".priv") ; + $public_key = exec("/usr/local/bin/zebedee -P -f /usr/local/etc/zebedee/".$_REQUEST['id'].".priv") ; + $private_key = exec("cat /usr/local/etc/zebedee/".$_REQUEST['id'].".priv ") ; + } + else + { + $private_key = exec("cat /usr/local/etc/zebedee/".$_REQUEST['id'].".priv ") ; + $public_key = exec("/usr/local/bin/zebedee -P -f /usr/local/etc/zebedee/".$_REQUEST['id'].".priv") ; + } + + $private_key = substr($private_key,12,40) ; + $public_key = substr($public_key,0,40) ; + $config['installedpackages']['zebedeekeys']['config'][$_REQUEST['id']]['private_key'] = $private_key ; + $config['installedpackages']['zebedeekeys']['config'][$_REQUEST['id']]['public_key'] = $public_key ; + + write_config(); + + // write clients.id file + foreach ($config['installedpackages']['zebedeekeys']['config'] as $key) + { + $clients .= $key["public_key"]." ".$key["ident"]."\n" ; + } + + $fd = fopen("/usr/local/etc/clients.id", "w"); +$cfg_file = << $value) + { + if (empty($value)) + continue; + if($key == "greet_time" && !preg_match("/(\d+),(\d+)(s|m|h|w)/",$value)) + $input_errors[] = "Wrong greet time sintax."; + if($key == "message_size_limit" && !is_numeric($value)) + $input_errors[] = "Message size limit must be numeric."; + if($key == "process_limit" && !is_numeric($value)) + $input_errors[] = "Process limit must be numeric."; + if($key == "freq" && (!preg_match("/^\d+(h|m|d)$/",$value) || $value == 0)) + $input_errors[] = "A valid number with a time reference is required for the field 'Frequency'"; + if (substr($key, 0, 2) == "dc" && !is_hostname($value)) + $input_errors[] = "{$value} is not a valid host name."; + if (substr($key, 0, 6) == "domain" && is_numeric(substr($key, 6))) { + if (!is_domain($value)) + $input_errors[] = "{$value} is not a valid domain name."; + } else if (substr($key, 0, 12) == "mailserverip" && is_numeric(substr($key, 12))) { + if (empty($post['domain' . substr($key, 12)])) + $input_errors[] = "Domain for {$value} cannot be blank."; + if (!is_ipaddr($value) && !is_hostname($value)) + $input_errors[] = "{$value} is not a valid IP address or host name."; + } + } +} + +function zebedee_php_install_command() { + sync_package_zebedee(); +} + +function zebedee_php_deinstall_command() { + + + mwexec_bg("killall -9 zebedee"); + + sleep(1); + conf_mount_rw(); + unlink_if_exists("/usr/local/etc/rc.d/zebedee.sh"); + conf_mount_ro(); +} + +/* Uses XMLRPC to synchronize the changes to a remote node */ +function zebedee_sync_on_changes() { + global $config, $g; + log_error("[zebedee] zebedee xml_rpc is starting."); + $synconchanges = $config['installedpackages']['zebedeesync']['config'][0]['synconchanges']; + if(!$synconchanges) + return; + foreach ($config['installedpackages']['zebedeesync']['config'] as $rs ){ + foreach($rs['row'] as $sh){ + $sync_to_ip = $sh['ipaddress']; + $password = $sh['password']; + if($password && $sync_to_ip) + zebedee_do_xmlrpc_sync($sync_to_ip, $password); + } + } + log_error("[zebedee] postfix_xmlrpc_sync.php is ending."); +} + +/* Do the actual XMLRPC sync */ +function zebedee_do_xmlrpc_sync($sync_to_ip, $password) { + global $config, $g; + + if(!$password) + return; + + if(!$sync_to_ip) + return; + + $xmlrpc_sync_neighbor = $sync_to_ip; + if($config['system']['webgui']['protocol'] != "") { + $synchronizetoip = $config['system']['webgui']['protocol']; + $synchronizetoip .= "://"; + } + $port = $config['system']['webgui']['port']; + /* if port is empty lets rely on the protocol selection */ + if($port == "") { + if($config['system']['webgui']['protocol'] == "http") + $port = "80"; + else + $port = "443"; + } + $synchronizetoip .= $sync_to_ip; + + /* xml will hold the sections to sync */ + $xml = array(); + $xml['zebedee'] = $config['installedpackages']['zebedee']; + $xml['zebedeetunnels'] = $config['installedpackages']['zebedeetunnels']; + $xml['zebedeekeys'] = $config['installedpackages']['zebedeekeys']; + $xml['zebedeesync'] = $config['installedpackages']['zebedeesync']; + + /* assemble xmlrpc payload */ + $params = array( + XML_RPC_encode($password), + XML_RPC_encode($xml) + ); + + /* set a few variables needed for sync code borrowed from filter.inc */ + $url = $synchronizetoip; + log_error("Beginning Postfix XMLRPC sync to {$url}:{$port}."); + $method = 'pfsense.merge_installedpackages_section_xmlrpc'; + $msg = new XML_RPC_Message($method, $params); + $cli = new XML_RPC_Client('/xmlrpc.php', $url, $port); + $cli->setCredentials('admin', $password); + if($g['debug']) + $cli->setDebug(1); + /* send our XMLRPC message and timeout after 250 seconds */ + $resp = $cli->send($msg, "250"); + if(!$resp) { + $error = "A communications error occurred while attempting zebedee XMLRPC sync with {$url}:{$port}."; + log_error($error); + file_notice("sync_settings", $error, "Zebedee Settings Sync", ""); + } elseif($resp->faultCode()) { + $cli->setDebug(1); + $resp = $cli->send($msg, "250"); + $error = "An error code was received while attempting zebedee XMLRPC sync with {$url}:{$port} - Code " . $resp->faultCode() . ": " . $resp->faultString(); + log_error($error); + file_notice("sync_settings", $error, "Postfix Settings Sync", ""); + } else { + log_error("Zebedee XMLRPC sync successfully completed with {$url}:{$port}."); + } + + /* tell zebedee to reload our settings on the destionation sync host. */ + $method = 'pfsense.exec_php'; + $execcmd = "require_once('/usr/local/pkg/zebedee.inc');\n"; + $execcmd .= "sync_package_zebedee();"; + + /* assemble xmlrpc payload */ + $params = array( + XML_RPC_encode($password), + XML_RPC_encode($execcmd) + ); + + log_error("zebedee XMLRPC reload data {$url}:{$port}."); + $msg = new XML_RPC_Message($method, $params); + $cli = new XML_RPC_Client('/xmlrpc.php', $url, $port); + $cli->setCredentials('admin', $password); + $resp = $cli->send($msg, "250"); + if(!$resp) { + $error = "A communications error occurred while attempting zebedee XMLRPC sync with {$url}:{$port} (pfsense.exec_php)."; + log_error($error); + file_notice("sync_settings", $error, "zebedee Settings Sync", ""); + } elseif($resp->faultCode()) { + $cli->setDebug(1); + $resp = $cli->send($msg, "250"); + $error = "An error code was received while attempting zebedee XMLRPC sync with {$url}:{$port} - Code " . $resp->faultCode() . ": " . $resp->faultString(); + log_error($error); + file_notice("sync_settings", $error, "zebedee Settings Sync", ""); + } else { + log_error("zebedee XMLRPC reload data success with {$url}:{$port} (pfsense.exec_php)."); + } + +} + +?> diff --git a/config/zebedee/zebedee.sh b/config/zebedee/zebedee.sh new file mode 100755 index 00000000..b431ffec --- /dev/null +++ b/config/zebedee/zebedee.sh @@ -0,0 +1,6 @@ +#!/bin/sh +if [ ! -d "/usr/local/etc/zebedee" ]; then +mkdir /usr/local/etc/zebedee +fi +killall zebedee +/usr/local/bin/zebedee -t -f /usr/local/etc/server.zbd & diff --git a/config/zebedee/zebedee.xml b/config/zebedee/zebedee.xml new file mode 100644 index 00000000..b3554e62 --- /dev/null +++ b/config/zebedee/zebedee.xml @@ -0,0 +1,298 @@ + + + + + + + + Describe your package here + Describe your package requirements here + Currently there are no FAQ items provided. + zebedee + 0.1 + Zebedee Tunneling + /usr/local/pkg/zebedee.inc + + Zebedee + Configure Zebedee +
Services
+ pkg_edit.php?xml=zebedee.xml&id=0 +
+ + zebedee + zebedee.sh + master + + + http://www.pfsense.org/packages/config/zebedee/zebedee.inc + /usr/local/pkg/ + 0755 + + + http://www.pfsense.org/packages/config/zebedee/zebedee_tunnels.xml + /usr/local/pkg/ + 0755 + + + http://www.pfsense.org/packages/config/zebedee/zebedee_key_details.xml + /usr/local/pkg/ + 0755 + + + http://www.pfsense.org/packages/config/zebedee/zebedee_sync.xml + /usr/local/pkg/ + 0755 + + + http://www.pfsense.org/packages/config/zebedee/zebedee_del_key.php + /usr/local/www/ + 0755 + + + http://www.pfsense.org/packages/config/zebedee/zebedee_keys.php + /usr/local/www/ + 0755 + + + http://www.pfsense.org/packages/config/zebedee/zebedee_log.php + /usr/local/www/ + 0755 + + + http://www.pfsense.org/packages/config/zebedee/zebedee_view_config.php + /usr/local/www/ + 0755 + + + http://www.pfsense.org/packages/config/zebedee/zebedee.sh + /usr/local/etc/rc.d/ + 0755 + + + + Settings + /pkg_edit.php?xml=zebedee.xml&id=0 + + + + Tunnels + /pkg_edit.php?xml=zebedee_tunnels.xml&id=0 + + + Keys + /zebedee_keys.php + + + XMLRPC Sync + /pkg_edit.php?xml=zebedee_sync.xml&id=0 + + + View config files + /zebedee_view_config.php + + + View log files + /zebedee_log.php + + + + + Zebedee General Settings + listtopic + + + Enable Zebedee + enable_zebedee + checkbox + + + + Listen interface(s) + enabled_interface + + interfaces_selection + + WAN + + + External Address + external_address + input + 60 + + This specifies the external name are put in client.zbd file in field serverhost. Ex: 200.111.111.22 or zebedee.pfsense.org + + + + Verbosity + verbosity + select + + + + + + + This is an integer specifying the level of message logging with 0 being just error messages and 5 giving excruciating detail of the message traffic. The default (and generally most useful level) is 1. + + + + Detached + detached + select + + + + + + This is a boolean indicating whether the process should detach itself from the controlling terminal and run in the background (in UNIX terms, to run as a daemon). This is valid for both client and server and is true by default. + + + + Udp Mode + udpmode + select + + + + + + By default Zebedee handles connection-oriented TCP/IP traffic. If this keyword is set true Zebedee handles UDP/IP connectionless traffic instead. + + + + Ipmode + ipmode + select + + + + + + + Zebedee client or server can handle both TCP and UDP traffic simultaneously. This is controlled by the ipmode keyword. It can have a value of tcp, udp or both. + + + + Keygenlevel + keygenlevel + select + + + + + + + This is an integer between 0 and 2 inclusive that determines how strong the private key generation in Zebedee should be. The default is 2 (the strongest) and you should generally not change this unless connection set-up performance becomes unacceptable. + + + + Compression + compression + select + + + + + + Zebedee can support both zlib and, if enabled when it is built, bzip2 compression. This keyword specifies the type and level of compression to be used + + + + Compression Level + compression_level + select + + + + + + + + + + + + + + The level specifies the maximum compression level to used (9 is the maximum and 0 is no compression). The actual compression level used will be the minimum of the client and server values. For these purposes all bzip2 levels (except 0) are considered to be greater than all zlib levels so if either client or server does not support bzip2 the protocol degrades gracefully to using zlib. + + + + Keylength + keylength + input + 5 + + This is an integer specifying the maximum key length (in bits) for the Blowfish encryption. It should be a multiple of 4 between 4 and 576. The key length used will be the minimum of the client and server values + + + + Keylifetime + keylifetime + input + 5 + + If the value of this parameter is non-zero it causes the client to request the re-use of a previously established shared secret key for deriving session keys for subsequent connections. This means that on the first connection between a Zebedee client and server the full key exchange dialogue will take place to establish a shared secret key. On subsequent connections, until the key expires, the same secret key will be reused to generate a new session key. Once the key expires a new key exchange will automatically be performed when necessary. + + + + Maxbufsize + maxbufsize + input + 5 + + This specifies the size, in bytes, of the buffer Zebedee will use to read data from applications. The actual size of buffer used will be the minimum of the client and server values. + + + + + zebedee_php_install_command(); + + + zebedee_php_deinstall_command(); + + + zebedee_validate_input($_POST, &$input_errors); + + + sync_package_zebedee(); + +
diff --git a/config/zebedee/zebedee_del_key.php b/config/zebedee/zebedee_del_key.php new file mode 100644 index 00000000..ae9522b7 --- /dev/null +++ b/config/zebedee/zebedee_del_key.php @@ -0,0 +1,54 @@ + + Copyright (C) 2010 Marcello Coutinho + Copyright (C) 2010 Jorge Lustosa + + 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("guiconfig.inc"); + +$pfSversion = str_replace("\n", "", file_get_contents("/etc/version")); +if(strstr($pfSversion, "1.2")) + $one_two = true; + +$zebede_keys = $config['installedpackages']['zebedeekeys']['config'] ; + +// remove item +unset($zebede_keys[$_REQUEST['id']]) ; + +$config['installedpackages']['zebedeekeys']['config'] = $zebede_keys ; +write_config() ; + + +// redirect +header("Location: zebedee_keys.php"); + + +?> + + diff --git a/config/zebedee/zebedee_get_key.php b/config/zebedee/zebedee_get_key.php new file mode 100644 index 00000000..f0af0b8a --- /dev/null +++ b/config/zebedee/zebedee_get_key.php @@ -0,0 +1,44 @@ +" ; +$external = $config['installedpackages']['zebedee']['config'][0]['external_address'] ; +$chave = $config['installedpackages']['zebedeekeys']["config"][$id] ; + +//print_r($chave['row']) ; + + + +foreach ($chave['row'] as $k => $v) +{ + // especify only one port for this host +// if($v['port']=="") $end=" " ; else $end = ":".$v['port'] ; + $tunnels .= "tunnel ".$v['loc_port'].":".$v['ipaddress'].":".$v['rmt_port']."\r\n" ; +} + + +header('Content-Type: application/download'); +header('Content-Disposition: filename=client.txt'); + +$chave_result = << \ No newline at end of file diff --git a/config/zebedee/zebedee_key_details.xml b/config/zebedee/zebedee_key_details.xml new file mode 100644 index 00000000..98f3151c --- /dev/null +++ b/config/zebedee/zebedee_key_details.xml @@ -0,0 +1,115 @@ + + + + + + + Copyright (C) 2011 Marcello Coutinho + Copyright (C) 2011 Jorge Lustosa + + 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. + */ +/* ========================================================================== */ + ]]> + + Describe your package here + Describe your package requirements here + Currently there are no FAQ items provided. + zebedeekeys + 0.1 + Zebedee key + /usr/local/pkg/zebedee.inc + + + Keys + /zebedee_keys.php + + + + + listtopic + targets + Identificatin + + + + + Name + ident + input + 10 + true + + + + listtopic + targets + Targets + + + Remote Server + none + rowhelper + + + Local Port + loc_port + Password for remote server. + input + 5 + + + IP Address + ipaddress + IP Address of remote server + input + 20 + + + Remote Port + rmt_port + Destionation Port + input + 5 + + + + + + zebedee_key(); + + + zebedee_del_key(); + + + unset($_POST['temp']); + + \ No newline at end of file diff --git a/config/zebedee/zebedee_keys.php b/config/zebedee/zebedee_keys.php new file mode 100644 index 00000000..f762c7cc --- /dev/null +++ b/config/zebedee/zebedee_keys.php @@ -0,0 +1,145 @@ + + Copyright (C) 2010 Marcello Coutinho + Copyright (C) 2010 Jorge Lustosa + + 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("guiconfig.inc"); + +$pfSversion = str_replace("\n", "", file_get_contents("/etc/version")); +if(strstr($pfSversion, "1.2")) + $one_two = true; + +$pgtitle = "Zebedee Tunneling"; +include("head.inc"); + +error_reporting(0); +?> + + + + +

+ + + + +
+ +
+ + + + + + +
+ + + +" ; + //print_r($config['installedpackages']); +?> +
+
+ + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + +
" width="17" height="17" border="0">
+
+ + + + + + " width="17" height="17" border="0"> + + Download client.zbd file +
+ + + + + + + + +
" width="17" height="17" border="0">
+
+ + +
+
+
+
+ + + diff --git a/config/zebedee/zebedee_log.php b/config/zebedee/zebedee_log.php new file mode 100644 index 00000000..3e1ac98d --- /dev/null +++ b/config/zebedee/zebedee_log.php @@ -0,0 +1,112 @@ + + 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("guiconfig.inc"); + +if($_REQUEST['getactivity']) { + $varnishstatlogs = `tail -n 100 /var/log/zebedee.log`; + echo "

Zebedee Server logs as of " . date("D M j G:i:s T Y") . "

"; + echo $varnishstatlogs; + exit; +} + +$pfSversion = str_replace("\n", "", file_get_contents("/etc/version")); +if(strstr($pfSversion, "1.2")) + $one_two = true; + +$pgtitle = "Zebedee: Logs"; +include("head.inc"); + +?> + + + + + + +

+ + + + +
+ + + + + +
+ +
+
+ + + + +
+
+
+
One moment please, loading logs...
+
+
+
+
+
+ + + + diff --git a/config/zebedee/zebedee_sync.xml b/config/zebedee/zebedee_sync.xml new file mode 100644 index 00000000..e2649fc8 --- /dev/null +++ b/config/zebedee/zebedee_sync.xml @@ -0,0 +1,117 @@ + + + + + + + Copyright (C) 2011 Marcello Coutinho + Copyright (C) 2011 Jorge Lustosa + 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. + */ +/* ========================================================================== */ + ]]> + + Describe your package here + Describe your package requirements here + Currently there are no FAQ items provided. + zebedeesync + 1.1 + Zebedee: Manual Sync + /usr/local/pkg/zebedee.inc + + + Settings + /pkg_edit.php?xml=zebedee.xml&id=0 + + + Tunnels + /pkg_edit.php?xml=zebedee_tunnels.xml&id=0 + + + Keys + /zebedee_keys.php + + + XMLRPC Sync + /pkg_edit.php?xml=zebedee_sync.xml&id=0 + + + + View config files + /zebedee_view_config.php + + + View log files + /zebedee_log.php + + + installedpackages->package->zebedee + + + listtopic + temp + Enable Zebedee configuration sync + + + Automatically sync Zebedee configuration changes + synconchanges + pfSense will automatically sync changes to the hosts defined below. + checkbox + + + Remote Server + none + rowhelper + + + IP Address + ipaddress + IP Address of remote server + input + 20 + + + Password + password + Password for remote server. + password + 20 + + + + + + zebedee_sync_on_changes(); + + + unset($_POST['temp']); + + \ No newline at end of file diff --git a/config/zebedee/zebedee_tunnels.xml b/config/zebedee/zebedee_tunnels.xml new file mode 100755 index 00000000..419835be --- /dev/null +++ b/config/zebedee/zebedee_tunnels.xml @@ -0,0 +1,127 @@ + + + + + + + Copyright (C) 2011 Marcello Coutinho + Copyright (C) 2011 Jorge Lustosa + + 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. + */ +/* ========================================================================== */ + ]]> + + Describe your package here + Describe your package requirements here + Currently there are no FAQ items provided. + zebedeetunnels + 0.1 + Zebedee Tunneling + /usr/local/pkg/zebedee.inc + + + Settings + /pkg_edit.php?xml=zebedee.xml&id=0 + + + Tunnels + /pkg_edit.php?xml=zebedee_tunnels.xml&id=0 + + + + Keys + /zebedee_keys.php + + + XMLRPC Sync + /pkg_edit.php?xml=zebedee_sync.xml&id=0 + + + View config files + /zebedee_view_config.php + + + View log files + /zebedee_log.php + + + + + listtopic + targets + Targets + + + Remote Server + none + rowhelper + + + IP Address + ipaddress + IP Address of remote server + input + 20 + + + Port + port + Password for remote server. + input + 5 + + + + + listtopic + Redirect Ports + Redirect Ports + + + Redirects + redirect + textarea + 80 + 2 + + separated by comma. Ex 80,443,22 + + + + + + zebedee_tunnels(); + + + unset($_POST['temp']); + + \ No newline at end of file diff --git a/config/zebedee/zebedee_view_config.php b/config/zebedee/zebedee_view_config.php new file mode 100644 index 00000000..57cecc7e --- /dev/null +++ b/config/zebedee/zebedee_view_config.php @@ -0,0 +1,97 @@ + + 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("guiconfig.inc"); + +$pfSversion = str_replace("\n", "", file_get_contents("/etc/version")); +if(strstr($pfSversion, "1.2")) + $one_two = true; + +$pgtitle = "Zebedee: View Configuration"; +include("head.inc"); + +?> + + + + +

+ + + + +
+ +
+ + + + + +
+ +
+
+ + + + +
+

/usr/local/etc/server.zbd

+ +

/usr/local/etc/tunnels.zbd

+ + +
+
+
+
+
+ + + diff --git a/pkg_config.8.xml b/pkg_config.8.xml index ce1a6504..82a9d2d2 100644 --- a/pkg_config.8.xml +++ b/pkg_config.8.xml @@ -1169,5 +1169,20 @@ http://www.pfsense.com/packages/config/mailreport/mailreport.xml mailreport.xml + + zebedee + + This allows traffic such as telnet, ftp and X to be protected from snooping as well as potentially gaining performance over low-bandwidth networks from compression.]]> + Services + 1.0 + BETA + www.winton.org.uk/zebedee/ + jorgelustosa@gmail.com marcellocoutinho@gmail.com + 2.0 + http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/ports/i386/packages-8.1-release/Latest/ + zebedee.tbz + http://www.pfsense.com/packages/config/zebedee/zebedee.xml + zebedee.xml + diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64 index f3aa21b3..f8798648 100644 --- a/pkg_config.8.xml.amd64 +++ b/pkg_config.8.xml.amd64 @@ -1158,5 +1158,20 @@ http://www.pfsense.com/packages/config/mailreport/mailreport.xml mailreport.xml + + zebedee + + This allows traffic such as telnet, ftp and X to be protected from snooping as well as potentially gaining performance over low-bandwidth networks from compression.]]> + Services + 1.0 + BETA + www.winton.org.uk/zebedee/ + jorgelustosa@gmail.com marcellocoutinho@gmail.com + 2.0 + http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/ports/amd64/packages-8.1-release/Latest/ + zebedee.tbz + http://www.pfsense.com/packages/config/zebedee/zebedee.xml + zebedee.xml + -- cgit v1.2.3