diff --git a/install/setrights.php b/install/setrights.php index 89e2077a3a2118cfc2789dc75971d2e200f55828..1124136baaee5ec95f7981bd050bd318094bfba8 100644 --- a/install/setrights.php +++ b/install/setrights.php @@ -1,135 +1,135 @@ ->This script tries to repair the client rights \n\n"; - -//** Include the library with the basic installer functions -require_once('lib/install.lib.php'); - -//** Include the library with the basic updater functions -require_once('lib/update.lib.php'); - -//** Include the base class of the installer class -require_once('lib/installer_base.lib.php'); - -//** Ensure that current working directory is install directory -$cur_dir = getcwd(); -if(realpath(dirname(__FILE__)) != $cur_dir) die("Please run installation/update from _inside_ the install directory!\n"); - -//** Get distribution identifier -$dist = get_distname(); - -include_once("/usr/local/ispconfig/server/lib/config.inc.php"); -$conf_old = $conf; -unset($conf); - -if($dist['id'] == '') die('Linux distribution or version not recognized.'); - -//** Include the distribution-specific installer class library and configuration -if(is_file('dist/lib/'.$dist['baseid'].'.lib.php')) include_once('dist/lib/'.$dist['baseid'].'.lib.php'); -include_once('dist/lib/'.$dist['id'].'.lib.php'); -include_once('dist/conf/'.$dist['id'].'.conf.php'); - -//** Get hostname -exec('hostname -f', $tmp_out); -$conf['hostname'] = $tmp_out[0]; -unset($tmp_out); - -//* Check if this is a master / slave setup -$conf['mysql']['master_slave_setup'] = 'n'; -if($conf["mysql"]["master_host"] != '' && $conf["mysql"]["host"] != $conf["mysql"]["master_host"]) { - $conf['mysql']['master_slave_setup'] = 'y'; -} - -/* - * Try to read the DB-admin settings - */ -$clientdb_host = ''; -$clientdb_user = ''; -$clientdb_password = ''; -include_once("/usr/local/ispconfig/server/lib/mysql_clientdb.conf"); -$conf["mysql"]["admin_user"] = $clientdb_user; -$conf["mysql"]["admin_password"] = $clientdb_password; -$clientdb_host = ''; -$clientdb_user = ''; -$clientdb_password = ''; - -//** There is a error if user for mysql admin_password if empty -if( empty($conf["mysql"]["admin_password"]) ) { - die("internal error - MYSQL-Root passord not known"); -} - -$inst = new installer(); - -//** Initialize the MySQL server connection -include_once('lib/mysql.lib.php'); - -//* initialize the database -$inst->db = new db(); - -/* - * The next line is a bit tricky! - * At the automated update we have no connection to the master-db (we don't need it, because - * there are only TWO points, where this is needed) - * 1) update the rights --> the autoupdater sets the rights of all clients when the server is - * autoupdated) - * 2) update the server-settings (is web installed, is mail installed) --> the autoupdates - * doesn't change any of this settings, so there ist no need to update this. - * This means, the autoupdater did not need any connection to the master-db (only to the local bd - * of the master-server). To avoid any problems, we set the master-db to the local one. - */ -$inst->dbmaster = $inst->db; - -/* - * If it is NOT a master-slave - Setup then we are at the Master-DB. So set all rights -*/ -if($conf['mysql']['master_slave_setup'] != 'y') { - $inst->grant_master_database_rights(true); -} - -echo "finished.\n"; - -?> +>This script tries to repair the client rights \n\n"; + +//** Include the library with the basic installer functions +require_once('lib/install.lib.php'); + +//** Include the library with the basic updater functions +require_once('lib/update.lib.php'); + +//** Include the base class of the installer class +require_once('lib/installer_base.lib.php'); + +//** Ensure that current working directory is install directory +$cur_dir = getcwd(); +if(realpath(dirname(__FILE__)) != $cur_dir) die("Please run installation/update from _inside_ the install directory!\n"); + +//** Get distribution identifier +$dist = get_distname(); + +include_once("/usr/local/ispconfig/server/lib/config.inc.php"); +$conf_old = $conf; +unset($conf); + +if($dist['id'] == '') die('Linux distribution or version not recognized.'); + +//** Include the distribution-specific installer class library and configuration +if(is_file('dist/lib/'.$dist['baseid'].'.lib.php')) include_once('dist/lib/'.$dist['baseid'].'.lib.php'); +include_once('dist/lib/'.$dist['id'].'.lib.php'); +include_once('dist/conf/'.$dist['id'].'.conf.php'); + +//** Get hostname +exec('hostname -f', $tmp_out); +$conf['hostname'] = $tmp_out[0]; +unset($tmp_out); + +//* Check if this is a master / slave setup +$conf['mysql']['master_slave_setup'] = 'n'; +if($conf["mysql"]["master_host"] != '' && $conf["mysql"]["host"] != $conf["mysql"]["master_host"]) { + $conf['mysql']['master_slave_setup'] = 'y'; +} + +/* + * Try to read the DB-admin settings + */ +$clientdb_host = ''; +$clientdb_user = ''; +$clientdb_password = ''; +include_once("/usr/local/ispconfig/server/lib/mysql_clientdb.conf"); +$conf["mysql"]["admin_user"] = $clientdb_user; +$conf["mysql"]["admin_password"] = $clientdb_password; +$clientdb_host = ''; +$clientdb_user = ''; +$clientdb_password = ''; + +//** There is a error if user for mysql admin_password if empty +if( empty($conf["mysql"]["admin_password"]) ) { + die("internal error - MYSQL-Root passord not known"); +} + +$inst = new installer(); + +//** Initialize the MySQL server connection +include_once('lib/mysql.lib.php'); + +//* initialize the database +$inst->db = new db(); + +/* + * The next line is a bit tricky! + * At the automated update we have no connection to the master-db (we don't need it, because + * there are only TWO points, where this is needed) + * 1) update the rights --> the autoupdater sets the rights of all clients when the server is + * autoupdated) + * 2) update the server-settings (is web installed, is mail installed) --> the autoupdates + * doesn't change any of this settings, so there ist no need to update this. + * This means, the autoupdater did not need any connection to the master-db (only to the local bd + * of the master-server). To avoid any problems, we set the master-db to the local one. + */ +$inst->dbmaster = $inst->db; + +/* + * If it is NOT a master-slave - Setup then we are at the Master-DB. So set all rights +*/ +if($conf['mysql']['master_slave_setup'] != 'y') { + $inst->grant_master_database_rights(true); +} + +echo "finished.\n"; + +?> diff --git a/install/sql/incremental/upd_0009.sql b/install/sql/incremental/upd_0009.sql index 9da60c1345b3cfa88c680a8ee7ce087dedd88df8..ba20b6baf80fe19efec30c2b559e23535ef0749b 100644 --- a/install/sql/incremental/upd_0009.sql +++ b/install/sql/incremental/upd_0009.sql @@ -1,66 +1,66 @@ -CREATE TABLE IF NOT EXISTS `proxy_reverse` ( - `rewrite_id` int(11) NOT NULL auto_increment, - `sys_userid` int(11) unsigned NOT NULL default '0', - `sys_groupid` int(11) unsigned NOT NULL default '0', - `sys_perm_user` varchar(5) default NULL, - `sys_perm_group` varchar(5) default NULL, - `sys_perm_other` varchar(5) default NULL, - `server_id` int(11) unsigned NOT NULL default '0', - `rewrite_url_src` varchar(100) NOT NULL, - `rewrite_url_dst` varchar(100) NOT NULL, - `active` enum('n','y') NOT NULL default 'y', - PRIMARY KEY (`rewrite_id`) -) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; - - -CREATE TABLE IF NOT EXISTS `firewall_filter` ( - `firewall_id` int(11) unsigned NOT NULL auto_increment, - `sys_userid` int(11) unsigned NOT NULL default '0', - `domain_id` int(11) NOT NULL, - `sys_groupid` int(11) unsigned NOT NULL default '0', - `sys_perm_user` varchar(5) default NULL, - `sys_perm_group` varchar(5) default NULL, - `sys_perm_other` varchar(5) default NULL, - `server_id` int(11) unsigned NOT NULL default '0', - `rule_name` varchar(100) default NULL, - `rule_id` int(11) default 1, - `src_ip` varchar(20) NOT NULL, - `src_netmask` varchar(20) NOT NULL, - `dst_ip` varchar(20) NOT NULL, - `dst_netmask` varchar(20) NOT NULL, - `src_from_port` varchar(10) NOT NULL, - `src_to_port` varchar(10) NOT NULL, - `dst_to_port` varchar(10) NOT NULL, - `dst_from_port` varchar(10) NOT NULL, - `protocol` varchar(10) default 'tcp', - `inbound_policy` enum('allow','deny','reject','limit') default 'allow', - `outbound_policy` enum('allow','deny','reject','limit') default 'allow', - `active` enum('n','y') NOT NULL default 'y', - `client_id` int(11) NOT NULL, - PRIMARY KEY (`firewall_id`) -) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `firewall_forward` ( - `firewall_id` int(11) unsigned NOT NULL auto_increment, - `sys_userid` int(11) unsigned NOT NULL default '0', - `domain_id` int(11) NOT NULL, - `sys_groupid` int(11) unsigned NOT NULL default '0', - `sys_perm_user` varchar(5) default NULL, - `sys_perm_group` varchar(5) default NULL, - `sys_perm_other` varchar(5) default NULL, - `server_id` int(11) unsigned NOT NULL default '0', - `application_name` varchar(100) default NULL, - `dst_ip` varchar(20) NOT NULL, - `src_from_port` varchar(10) NOT NULL, - `src_to_port` varchar(10) NOT NULL, - `dst_to_port` varchar(10) NOT NULL, - `dst_from_port` varchar(10) NOT NULL, - `protocol` int(3) default 0, - `active` enum('n','y') NOT NULL default 'y', - `client_id` int(11) NOT NULL, - PRIMARY KEY (`firewall_id`) -) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=utf8; - -alter table `server` add column `proxy_server` tinyint(1) not null after `vserver_server`; -alter table `server` add column `firewall_server` tinyint(1) not null after `proxy_server`; -alter table `web_domain` add column `nginx_directives` mediumtext not null after `apache_directives`; +CREATE TABLE IF NOT EXISTS `proxy_reverse` ( + `rewrite_id` int(11) NOT NULL auto_increment, + `sys_userid` int(11) unsigned NOT NULL default '0', + `sys_groupid` int(11) unsigned NOT NULL default '0', + `sys_perm_user` varchar(5) default NULL, + `sys_perm_group` varchar(5) default NULL, + `sys_perm_other` varchar(5) default NULL, + `server_id` int(11) unsigned NOT NULL default '0', + `rewrite_url_src` varchar(100) NOT NULL, + `rewrite_url_dst` varchar(100) NOT NULL, + `active` enum('n','y') NOT NULL default 'y', + PRIMARY KEY (`rewrite_id`) +) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; + + +CREATE TABLE IF NOT EXISTS `firewall_filter` ( + `firewall_id` int(11) unsigned NOT NULL auto_increment, + `sys_userid` int(11) unsigned NOT NULL default '0', + `domain_id` int(11) NOT NULL, + `sys_groupid` int(11) unsigned NOT NULL default '0', + `sys_perm_user` varchar(5) default NULL, + `sys_perm_group` varchar(5) default NULL, + `sys_perm_other` varchar(5) default NULL, + `server_id` int(11) unsigned NOT NULL default '0', + `rule_name` varchar(100) default NULL, + `rule_id` int(11) default 1, + `src_ip` varchar(20) NOT NULL, + `src_netmask` varchar(20) NOT NULL, + `dst_ip` varchar(20) NOT NULL, + `dst_netmask` varchar(20) NOT NULL, + `src_from_port` varchar(10) NOT NULL, + `src_to_port` varchar(10) NOT NULL, + `dst_to_port` varchar(10) NOT NULL, + `dst_from_port` varchar(10) NOT NULL, + `protocol` varchar(10) default 'tcp', + `inbound_policy` enum('allow','deny','reject','limit') default 'allow', + `outbound_policy` enum('allow','deny','reject','limit') default 'allow', + `active` enum('n','y') NOT NULL default 'y', + `client_id` int(11) NOT NULL, + PRIMARY KEY (`firewall_id`) +) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `firewall_forward` ( + `firewall_id` int(11) unsigned NOT NULL auto_increment, + `sys_userid` int(11) unsigned NOT NULL default '0', + `domain_id` int(11) NOT NULL, + `sys_groupid` int(11) unsigned NOT NULL default '0', + `sys_perm_user` varchar(5) default NULL, + `sys_perm_group` varchar(5) default NULL, + `sys_perm_other` varchar(5) default NULL, + `server_id` int(11) unsigned NOT NULL default '0', + `application_name` varchar(100) default NULL, + `dst_ip` varchar(20) NOT NULL, + `src_from_port` varchar(10) NOT NULL, + `src_to_port` varchar(10) NOT NULL, + `dst_to_port` varchar(10) NOT NULL, + `dst_from_port` varchar(10) NOT NULL, + `protocol` int(3) default 0, + `active` enum('n','y') NOT NULL default 'y', + `client_id` int(11) NOT NULL, + PRIMARY KEY (`firewall_id`) +) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=utf8; + +alter table `server` add column `proxy_server` tinyint(1) not null after `vserver_server`; +alter table `server` add column `firewall_server` tinyint(1) not null after `proxy_server`; +alter table `web_domain` add column `nginx_directives` mediumtext not null after `apache_directives`; diff --git a/install/tpl/nginx_cache.conf.master b/install/tpl/nginx_cache.conf.master index 1cd2863824e0952b84959fbe808b364f1d5f7506..bd51da61c69f7026b9a64c3ad17f15c4aea64f27 100644 --- a/install/tpl/nginx_cache.conf.master +++ b/install/tpl/nginx_cache.conf.master @@ -1,6 +1,6 @@ -proxy_temp_path /var/cache/nginx/temp; -proxy_cache_path /var/cache/nginx/cache levels=1:2 keys_zone=global:60m inactive=15m max_size=1G; -proxy_cache_valid 200 302 10m; -proxy_cache_valid 301 1h; -proxy_cache_valid 404 3m; -proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504; +proxy_temp_path /var/cache/nginx/temp; +proxy_cache_path /var/cache/nginx/cache levels=1:2 keys_zone=global:60m inactive=15m max_size=1G; +proxy_cache_valid 200 302 10m; +proxy_cache_valid 301 1h; +proxy_cache_valid 404 3m; +proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504; diff --git a/install/tpl/nginx_proxy.conf.master b/install/tpl/nginx_proxy.conf.master index d8711d04657cf411de96802a905f0e11df88ef53..bb19647021d29b6328699835d5cd507c50f5346e 100644 --- a/install/tpl/nginx_proxy.conf.master +++ b/install/tpl/nginx_proxy.conf.master @@ -1,34 +1,34 @@ -proxy_cache global; -proxy_redirect off; -proxy_set_header Host $host; -proxy_set_header X-Real-IP $remote_addr; -proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; -proxy_pass_header Set-Cookie; -client_max_body_size 10m; -client_body_buffer_size 128k; -proxy_connect_timeout 90; -proxy_send_timeout 90; -proxy_read_timeout 90; -proxy_buffers 32 4k; - -set $cache_key $scheme$host$uri$is_args$args$cookie_user; -proxy_cache_key $cache_key; -proxy_cache_valid 200 10h; -expires 3d; - -### force timeouts if one of backend is died ## -proxy_next_upstream error timeout invalid_header http_500 http_502 http_503; - -location = /status { - stub_status on; - allow 127.0.0.1; - allow 192.168.1.0; - deny all; -} - -location ~ /purge(/.*) { - allow 127.0.0.1; - allow 192.168.1.0; - deny all; - proxy_cache_purge global $cache_key; -} +proxy_cache global; +proxy_redirect off; +proxy_set_header Host $host; +proxy_set_header X-Real-IP $remote_addr; +proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +proxy_pass_header Set-Cookie; +client_max_body_size 10m; +client_body_buffer_size 128k; +proxy_connect_timeout 90; +proxy_send_timeout 90; +proxy_read_timeout 90; +proxy_buffers 32 4k; + +set $cache_key $scheme$host$uri$is_args$args$cookie_user; +proxy_cache_key $cache_key; +proxy_cache_valid 200 10h; +expires 3d; + +### force timeouts if one of backend is died ## +proxy_next_upstream error timeout invalid_header http_500 http_502 http_503; + +location = /status { + stub_status on; + allow 127.0.0.1; + allow 192.168.1.0; + deny all; +} + +location ~ /purge(/.*) { + allow 127.0.0.1; + allow 192.168.1.0; + deny all; + proxy_cache_purge global $cache_key; +} diff --git a/install/tpl/squid.conf.master b/install/tpl/squid.conf.master index 2ae00d24dd84864c2458c18d2b1ca1af815b6782..c168fd09534e505890fd33f1eb8e0da793171121 100644 --- a/install/tpl/squid.conf.master +++ b/install/tpl/squid.conf.master @@ -1,224 +1,224 @@ - -# This configuration file requires squid 2.5+. It is untested with squid 3.x. - -# BASIC CONFIGURATION -# ------------------------------------------------------------------------------ - -visible_hostname {server_name} - - - -# port on which to listen - -http_port {ip_address}:80 vhost defaultsite={server_name} - - -# set cache directory and size (1000 MB) - be sure to set the cache size to -# about 10% less than the physical space available to leave room for squid's -# swap files and other temp files -cache_dir ufs /var/spool/squid 100 16 256 -cache_mgr webmaster@{server_name} - - - - -# LOGS -# ------------------------------------------------------------------------------ -log_icp_queries off -cache_access_log /var/log/squid/access.log -cache_log /var/log/squid/cache.log -cache_store_log /var/log/squid/store.log -cache_effective_user nobody -cache_effective_group nogroup -# emulate_httpd_log off - - -# RESOURCES -# ------------------------------------------------------------------------------ -# amount of memory used for caching recently accessed objects - defaults to 8 MB -cache_mem 64 MB -maximum_object_size 10 MB # max cached object size -maximum_object_size_in_memory 300 KB # max cached-in-memory object size - - -# ACCESS CONTROL -# ------------------------------------------------------------------------------ - -# Basic ACLs -acl all src 0.0.0.0/0.0.0.0 -acl localhost src 127.0.0.1/32 -acl ssl_ports port 443 563 -acl safe_ports port 80 443 - -acl openvz_instances src 192.168.1.0/24 -acl squid_server src localhost -acl manager proto cache_object -acl connect method connect - - -# deny requests to unknown ports -http_access deny !safe_ports - -acl accelerated_protocols proto http https -acl accelerated_domains dstdomain url_regex -i "{config_dir}/domains.txt" -acl accelerated_ports myport 80 443 - -http_access allow accelerated_domains -http_access allow accelerated_ports -http_access allow accelerated_protocols - - -acl purge method PURGE -http_access allow squid_server purge -http_access allow openvz_instances purge -http_access deny purge - -# Reply access -http_reply_access allow all - -# Cache manager setup - cache manager can only connect from localhost -# only allow cache manager access from localhost -http_access allow manager localhost -http_access deny manager -# deny connect to other than ssl ports -http_access deny connect !ssl_ports - -# ICP access - anybody can access icp methods -icp_access allow localhost - -# And finally deny all other access to this proxy -http_access deny all - - -# CACHE PEERS -# ------------------------------------------------------------------------------ - -# CONFIGURE THE CACHE PEERS. FIRST PORT IS THE HTTP PORT, SECOND PORT -# IS THE ICP PORT. REMEMBER TO ENABLE 'icp-server' ON YOUR 'zope.conf' -# LISTENING ON THE ICP PORT YOU USE HERE. -# acl in_backendpool dstdomain backendpool -# cache_peer 127.0.0.1 parent 8080 9090 no-digest no-netdb-exchange -# cache_peer 192.168.0.3 parent 8081 9091 no-digest no-netdb-exchange - -# cache_peer_access 127.0.0.1 allow in_backendpool -# cache_peer_access 127.0.0.1 deny all - -# cache_peer_access 192.168.0.3 allow in_backendpool -# cache_peer_access 192.168.0.3 deny all - -# IF YOU NEED TO FORWARD REQUESTS TO HOSTS NOT IN THE POOL THIS IS -# WHERE YOU ALLOW THE TARGET DOMAINS -# acl local_servers dstdomain some.mysite.com other.mysite.com -always_direct allow all - -# THE FOLLOWING DIRECTIVE IS NEEDED TO MAKE 'backendpool' RESOLVE TO -# THE POOL OF CACHE PEERS. -# never_direct allow all -# icp_access allow all - -# PROXY ON, NEEDED TO MAKE CACHE PEERS INTERCOMMUNICATE -# httpd_accel_with_proxy on - - -# REDIRECTOR PROGRAM -# ------------------------------------------------------------------------------ - - -url_rewrite_program {config_dir}/iRedirector.py -url_rewrite_children 1 -url_rewrite_concurrency 20 -url_rewrite_host_header off - - -# SPECIFY WHAT REQUESTS SQUID SHOULD CACHE -# ------------------------------------------------------------------------------ - -# Control what squid caches. We want to have squid handle content that is not -# personalized and that does not require any kind of authorization. -# -# 1) Always cache static content in squid - -acl static_content urlpath_regex -i \.(jpg|jpeg|gif|png|tiff|tif|svg|swf|ico|css|js|vsd|doc|ppt|pps|xls|pdf|mp3|mp4|m4a|ogg|mov|avi|wmv|sxw|zip|gz|bz2|tgz|tar|rar|odc|odb|odf|odg|odi|odp|ods|odt|sxc|sxd|sxi|sxw|dmg|torrent|deb|msi|iso|rpm)$ -no_cache allow static_content - -# 2) (OPTIONAL) Prevent squid from caching an item that is the result of a POST - -acl post_requests method POST -no_cache deny post_requests - -# 3) (OPTIONAL) Prevent squid from caching items with items in the query string -# If this is uncommented, squid will treat a url with 2 different query strings -# as 2 different urls when caching. - -# XXX: where did this example go? - -# 4) Prevent squid from caching requests from authenticated users or conditional -# GETs with an If-None-Match header (since squid doesn't know about ETags) -# We use an external python method to check these conditions and pass in the -# value of the __ac cookie (two different ways to allow for different cookie -# delimiters), the HTTP Authorization header, and the If-None-Match header. -# -# Squid caches the results of the external python method, so for debugging, set -# the options ttl=0 negative_ttl=0 so you can see what is going on - -# external_acl_type is_cacheable_type children=20 ttl=0 negative_ttl=0 %{Cookie:__ac} %{Cookie:;__ac} %{Authorization} %{If-None-Match} /etc/squid/squidAcl.py - -#external_acl_type is_cacheable_type protocol=2.5 children=20 %{Cookie:__ac} %{Cookie:;__ac} %{Authorization} %{If-None-Match} /etc/squid/squidAcl.py -#acl is_cacheable external is_cacheable_type -#no_cache allow is_cacheable - - -collapsed_forwarding on -#refresh_stale_hit on - - -# Explicitly disallow squid from handling anything else -no_cache deny all - - -# SPECIFY EFFECTS OF A BROWSER REFRESH -# ------------------------------------------------------------------------------ - -# RELOAD_INTO_IMS CAUSES WEIRD SQUID BEHAVIOR - IT APPEARS TO CAUSE FILES WITH -# INAPPROPRIATE HEADERS TO END UP IN THE CACHE, AND AS A RESULT BROWSERS END -# UP MAKING LOTS OF EXTRA (CONDITIONAL) REQUESTS WHEN THEY WOULD OTHERWISE MAKE -# NO REQUESTS. DO NOT USE! - -# Tell squid how to handle expiration times for content with no explicit expiration -# Assume static content is fresh for at least an hour and at most a day -#refresh_pattern -i \.(jpg|jpeg|gif|png|tiff|tif|svg|swf|ico|css|js|vsd|doc|ppt|pps|xls|pdf|mp3|mp4|m4a|ogg|mov|avi|wmv|sxw|zip|gz|bz2|tar|rar|odc|odb|odf|odg|odi|odp|ods|odt|sxc|sxd|sxi|sxw|dmg|torrent|deb|msi|iso|rpm)$ 60 50% 1440 reload-into-ims -#refresh_pattern . 0 20% 1440 - -# Change force-refresh requests into conditional gets using if-modified-since -#reload_into_ims on - -# DEBUGGING -# ------------------------------------------------------------------------------ -# debug_options ALL,1 33,2 # use this for debugging acls - debug_options ALL,8 - - -# MISCELLANEOUS -# ------------------------------------------------------------------------------ -# have squid handle all requests with ranges -# range_offset_limit -1 - -# amount of time squid waits for existing requests to be serviced before shutting down -shutdown_lifetime 1 seconds - -# allow squid to process multiple requests simultaneously if client is pipelining -pipeline_prefetch on - -# allow white spaces to be included in URLs -uri_whitespace allow - - -# OTHER PARAMETERS THAT MAY BE OF INTEREST -# ------------------------------------------------------------------------------ - -# logfile_rotate 0 -# reload_into_ims off -#error_directory /usr/local/squid/share/errors/English - - - + +# This configuration file requires squid 2.5+. It is untested with squid 3.x. + +# BASIC CONFIGURATION +# ------------------------------------------------------------------------------ + +visible_hostname {server_name} + + + +# port on which to listen + +http_port {ip_address}:80 vhost defaultsite={server_name} + + +# set cache directory and size (1000 MB) - be sure to set the cache size to +# about 10% less than the physical space available to leave room for squid's +# swap files and other temp files +cache_dir ufs /var/spool/squid 100 16 256 +cache_mgr webmaster@{server_name} + + + + +# LOGS +# ------------------------------------------------------------------------------ +log_icp_queries off +cache_access_log /var/log/squid/access.log +cache_log /var/log/squid/cache.log +cache_store_log /var/log/squid/store.log +cache_effective_user nobody +cache_effective_group nogroup +# emulate_httpd_log off + + +# RESOURCES +# ------------------------------------------------------------------------------ +# amount of memory used for caching recently accessed objects - defaults to 8 MB +cache_mem 64 MB +maximum_object_size 10 MB # max cached object size +maximum_object_size_in_memory 300 KB # max cached-in-memory object size + + +# ACCESS CONTROL +# ------------------------------------------------------------------------------ + +# Basic ACLs +acl all src 0.0.0.0/0.0.0.0 +acl localhost src 127.0.0.1/32 +acl ssl_ports port 443 563 +acl safe_ports port 80 443 + +acl openvz_instances src 192.168.1.0/24 +acl squid_server src localhost +acl manager proto cache_object +acl connect method connect + + +# deny requests to unknown ports +http_access deny !safe_ports + +acl accelerated_protocols proto http https +acl accelerated_domains dstdomain url_regex -i "{config_dir}/domains.txt" +acl accelerated_ports myport 80 443 + +http_access allow accelerated_domains +http_access allow accelerated_ports +http_access allow accelerated_protocols + + +acl purge method PURGE +http_access allow squid_server purge +http_access allow openvz_instances purge +http_access deny purge + +# Reply access +http_reply_access allow all + +# Cache manager setup - cache manager can only connect from localhost +# only allow cache manager access from localhost +http_access allow manager localhost +http_access deny manager +# deny connect to other than ssl ports +http_access deny connect !ssl_ports + +# ICP access - anybody can access icp methods +icp_access allow localhost + +# And finally deny all other access to this proxy +http_access deny all + + +# CACHE PEERS +# ------------------------------------------------------------------------------ + +# CONFIGURE THE CACHE PEERS. FIRST PORT IS THE HTTP PORT, SECOND PORT +# IS THE ICP PORT. REMEMBER TO ENABLE 'icp-server' ON YOUR 'zope.conf' +# LISTENING ON THE ICP PORT YOU USE HERE. +# acl in_backendpool dstdomain backendpool +# cache_peer 127.0.0.1 parent 8080 9090 no-digest no-netdb-exchange +# cache_peer 192.168.0.3 parent 8081 9091 no-digest no-netdb-exchange + +# cache_peer_access 127.0.0.1 allow in_backendpool +# cache_peer_access 127.0.0.1 deny all + +# cache_peer_access 192.168.0.3 allow in_backendpool +# cache_peer_access 192.168.0.3 deny all + +# IF YOU NEED TO FORWARD REQUESTS TO HOSTS NOT IN THE POOL THIS IS +# WHERE YOU ALLOW THE TARGET DOMAINS +# acl local_servers dstdomain some.mysite.com other.mysite.com +always_direct allow all + +# THE FOLLOWING DIRECTIVE IS NEEDED TO MAKE 'backendpool' RESOLVE TO +# THE POOL OF CACHE PEERS. +# never_direct allow all +# icp_access allow all + +# PROXY ON, NEEDED TO MAKE CACHE PEERS INTERCOMMUNICATE +# httpd_accel_with_proxy on + + +# REDIRECTOR PROGRAM +# ------------------------------------------------------------------------------ + + +url_rewrite_program {config_dir}/iRedirector.py +url_rewrite_children 1 +url_rewrite_concurrency 20 +url_rewrite_host_header off + + +# SPECIFY WHAT REQUESTS SQUID SHOULD CACHE +# ------------------------------------------------------------------------------ + +# Control what squid caches. We want to have squid handle content that is not +# personalized and that does not require any kind of authorization. +# +# 1) Always cache static content in squid + +acl static_content urlpath_regex -i \.(jpg|jpeg|gif|png|tiff|tif|svg|swf|ico|css|js|vsd|doc|ppt|pps|xls|pdf|mp3|mp4|m4a|ogg|mov|avi|wmv|sxw|zip|gz|bz2|tgz|tar|rar|odc|odb|odf|odg|odi|odp|ods|odt|sxc|sxd|sxi|sxw|dmg|torrent|deb|msi|iso|rpm)$ +no_cache allow static_content + +# 2) (OPTIONAL) Prevent squid from caching an item that is the result of a POST + +acl post_requests method POST +no_cache deny post_requests + +# 3) (OPTIONAL) Prevent squid from caching items with items in the query string +# If this is uncommented, squid will treat a url with 2 different query strings +# as 2 different urls when caching. + +# XXX: where did this example go? + +# 4) Prevent squid from caching requests from authenticated users or conditional +# GETs with an If-None-Match header (since squid doesn't know about ETags) +# We use an external python method to check these conditions and pass in the +# value of the __ac cookie (two different ways to allow for different cookie +# delimiters), the HTTP Authorization header, and the If-None-Match header. +# +# Squid caches the results of the external python method, so for debugging, set +# the options ttl=0 negative_ttl=0 so you can see what is going on + +# external_acl_type is_cacheable_type children=20 ttl=0 negative_ttl=0 %{Cookie:__ac} %{Cookie:;__ac} %{Authorization} %{If-None-Match} /etc/squid/squidAcl.py + +#external_acl_type is_cacheable_type protocol=2.5 children=20 %{Cookie:__ac} %{Cookie:;__ac} %{Authorization} %{If-None-Match} /etc/squid/squidAcl.py +#acl is_cacheable external is_cacheable_type +#no_cache allow is_cacheable + + +collapsed_forwarding on +#refresh_stale_hit on + + +# Explicitly disallow squid from handling anything else +no_cache deny all + + +# SPECIFY EFFECTS OF A BROWSER REFRESH +# ------------------------------------------------------------------------------ + +# RELOAD_INTO_IMS CAUSES WEIRD SQUID BEHAVIOR - IT APPEARS TO CAUSE FILES WITH +# INAPPROPRIATE HEADERS TO END UP IN THE CACHE, AND AS A RESULT BROWSERS END +# UP MAKING LOTS OF EXTRA (CONDITIONAL) REQUESTS WHEN THEY WOULD OTHERWISE MAKE +# NO REQUESTS. DO NOT USE! + +# Tell squid how to handle expiration times for content with no explicit expiration +# Assume static content is fresh for at least an hour and at most a day +#refresh_pattern -i \.(jpg|jpeg|gif|png|tiff|tif|svg|swf|ico|css|js|vsd|doc|ppt|pps|xls|pdf|mp3|mp4|m4a|ogg|mov|avi|wmv|sxw|zip|gz|bz2|tar|rar|odc|odb|odf|odg|odi|odp|ods|odt|sxc|sxd|sxi|sxw|dmg|torrent|deb|msi|iso|rpm)$ 60 50% 1440 reload-into-ims +#refresh_pattern . 0 20% 1440 + +# Change force-refresh requests into conditional gets using if-modified-since +#reload_into_ims on + +# DEBUGGING +# ------------------------------------------------------------------------------ +# debug_options ALL,1 33,2 # use this for debugging acls + debug_options ALL,8 + + +# MISCELLANEOUS +# ------------------------------------------------------------------------------ +# have squid handle all requests with ranges +# range_offset_limit -1 + +# amount of time squid waits for existing requests to be serviced before shutting down +shutdown_lifetime 1 seconds + +# allow squid to process multiple requests simultaneously if client is pipelining +pipeline_prefetch on + +# allow white spaces to be included in URLs +uri_whitespace allow + + +# OTHER PARAMETERS THAT MAY BE OF INTEREST +# ------------------------------------------------------------------------------ + +# logfile_rotate 0 +# reload_into_ims off +#error_directory /usr/local/squid/share/errors/English + + + diff --git a/install/tpl/ufw.conf.master b/install/tpl/ufw.conf.master index 9dc02d36751105a96de10caa8987ae7856870225..caae14f713281b24609024c00d4ca989882d6c60 100644 --- a/install/tpl/ufw.conf.master +++ b/install/tpl/ufw.conf.master @@ -1,8 +1,8 @@ -# /etc/ufw/ufw.conf -# - -# set to yes to start on boot -ENABLED=yes - -# set to one of 'off', 'low', 'medium', 'high' -LOGLEVEL=low +# /etc/ufw/ufw.conf +# + +# set to yes to start on boot +ENABLED=yes + +# set to one of 'off', 'low', 'medium', 'high' +LOGLEVEL=low diff --git a/interface/lib/lang/fr.lng b/interface/lib/lang/fr.lng index c6de82fda5e34c420200acd91fbe33bec0434c6c..cdee4e727b2b3d7d84f5b1662cb024f8ba596f78 100644 --- a/interface/lib/lang/fr.lng +++ b/interface/lib/lang/fr.lng @@ -1,42 +1,42 @@ - - + + diff --git a/interface/web/admin/lib/lang/fr.lng b/interface/web/admin/lib/lang/fr.lng index 87c76200d69b74a9c1be9b665688a03d7b5f852a..0bdae1b4f5d838f20453862a093c70dd7a6741d6 100644 --- a/interface/web/admin/lib/lang/fr.lng +++ b/interface/web/admin/lib/lang/fr.lng @@ -1,44 +1,44 @@ - - + + diff --git a/interface/web/admin/lib/lang/fr_firewall.lng b/interface/web/admin/lib/lang/fr_firewall.lng index 745b8b1b0e4b5d8e60bca446d7e0c672ebbaa1ca..66a2ab8d8e6c5c1d9d249ae6a67ea26f4f6e1a12 100644 --- a/interface/web/admin/lib/lang/fr_firewall.lng +++ b/interface/web/admin/lib/lang/fr_firewall.lng @@ -1,12 +1,12 @@ - - + + diff --git a/interface/web/admin/lib/lang/fr_firewall_list.lng b/interface/web/admin/lib/lang/fr_firewall_list.lng index 73bf402d9bdc7b63e37955e47a67fefb010e37b6..9beb575656bb81a6fcb31c82fa40002c3dedfd8f 100644 --- a/interface/web/admin/lib/lang/fr_firewall_list.lng +++ b/interface/web/admin/lib/lang/fr_firewall_list.lng @@ -1,9 +1,9 @@ - - + + diff --git a/interface/web/admin/lib/lang/fr_groups.lng b/interface/web/admin/lib/lang/fr_groups.lng index b128631f45e8b3445bf9060318eb94be8040838a..b48ed561f0227d89f837366402f7bf174b0f8d0a 100644 --- a/interface/web/admin/lib/lang/fr_groups.lng +++ b/interface/web/admin/lib/lang/fr_groups.lng @@ -1,6 +1,6 @@ - - + + diff --git a/interface/web/admin/lib/lang/fr_groups_list.lng b/interface/web/admin/lib/lang/fr_groups_list.lng index 07d73592f854bde57aaee53b82970ab22e3160a2..7b8261045a04cd3a26d91de7f0c47c0d0777e85b 100644 --- a/interface/web/admin/lib/lang/fr_groups_list.lng +++ b/interface/web/admin/lib/lang/fr_groups_list.lng @@ -1,8 +1,8 @@ -ATTENTION: Ne pas éditer ou modifier de paramètre utilisateur ici. Utilisez les paramètres Client et Revendeur dans le module Client à la place. Modifier ou changer les informations ici peut conduire à la perte de données'; -?> - +ATTENTION: Ne pas éditer ou modifier de paramètre utilisateur ici. Utilisez les paramètres Client et Revendeur dans le module Client à la place. Modifier ou changer les informations ici peut conduire à la perte de données'; +?> + diff --git a/interface/web/admin/lib/lang/fr_language_add.lng b/interface/web/admin/lib/lang/fr_language_add.lng index 79cabb70a7e236fdbb2140cfac88178032e34353..51fa7c967da73f55e141d4d1a3c0e8204c4216be 100644 --- a/interface/web/admin/lib/lang/fr_language_add.lng +++ b/interface/web/admin/lib/lang/fr_language_add.lng @@ -1,9 +1,9 @@ - - + + diff --git a/interface/web/admin/lib/lang/fr_language_complete.lng b/interface/web/admin/lib/lang/fr_language_complete.lng index 12c4321197b77f80d158830bb23d226105e8f003..711607abbc762144e41d339f174792b0379eb1e2 100644 --- a/interface/web/admin/lib/lang/fr_language_complete.lng +++ b/interface/web/admin/lib/lang/fr_language_complete.lng @@ -1,8 +1,8 @@ -Ceci ajoute les élements manquants en anglais au fichier sélectionné.'; -?> - +Ceci ajoute les élements manquants en anglais au fichier sélectionné.'; +?> + diff --git a/interface/web/admin/lib/lang/fr_language_edit.lng b/interface/web/admin/lib/lang/fr_language_edit.lng index 1e1f3b27a8cfca4c91146f539ecce106af641a97..fe5f0c08bdad1ef0dcd3399a2b8c71d5e357e907 100644 --- a/interface/web/admin/lib/lang/fr_language_edit.lng +++ b/interface/web/admin/lib/lang/fr_language_edit.lng @@ -1,9 +1,9 @@ - - + + diff --git a/interface/web/admin/lib/lang/fr_language_export.lng b/interface/web/admin/lib/lang/fr_language_export.lng index ed304f0310f3d27adf65653a69e7cf3313f3f4d8..85edd5e316a883e29c195ad402fbf0aa4246486c 100644 --- a/interface/web/admin/lib/lang/fr_language_export.lng +++ b/interface/web/admin/lib/lang/fr_language_export.lng @@ -1,7 +1,7 @@ - - + + diff --git a/interface/web/admin/lib/lang/fr_language_import.lng b/interface/web/admin/lib/lang/fr_language_import.lng index 66ab22c32fe4d4880de4199b467878857e1a4b6d..20632476f9504b85fb76a29b2d745fd49bb4e719 100644 --- a/interface/web/admin/lib/lang/fr_language_import.lng +++ b/interface/web/admin/lib/lang/fr_language_import.lng @@ -1,9 +1,9 @@ - - + + diff --git a/interface/web/admin/lib/lang/fr_language_list.lng b/interface/web/admin/lib/lang/fr_language_list.lng index ad38bc1be4c06672c622c791a154e0e437b46f04..dab7271617f97ea781935f5e2e7cce3a494eee2a 100644 --- a/interface/web/admin/lib/lang/fr_language_list.lng +++ b/interface/web/admin/lib/lang/fr_language_list.lng @@ -1,8 +1,8 @@ - - + + diff --git a/interface/web/admin/lib/lang/fr_package_install.lng b/interface/web/admin/lib/lang/fr_package_install.lng index f5c3afa89cd9e1a1803798b7a9db063f2508eaef..60ed772b3eb68cf8e8af41886af911064e3aa099 100644 --- a/interface/web/admin/lib/lang/fr_package_install.lng +++ b/interface/web/admin/lib/lang/fr_package_install.lng @@ -1,8 +1,8 @@ - - + + diff --git a/interface/web/admin/lib/lang/fr_remote_action.lng b/interface/web/admin/lib/lang/fr_remote_action.lng index 4e21f9654d5897b2aadfdf7f57a2b23c1e4d9795..9a4c579a127a3cbf0702cefa7894971f2851907e 100644 --- a/interface/web/admin/lib/lang/fr_remote_action.lng +++ b/interface/web/admin/lib/lang/fr_remote_action.lng @@ -1,11 +1,11 @@ -
UTILISEZ A VOS RISQUES ET PERILS !'; -$wb['do_ispcupdate_caption'] = 'Mettre à jour ISPConfig 3 sur le serveur distant'; -$wb['do_ispcupdate_desc'] = 'Cette action met à jour ISPConfig3 sur le serveur sélectionné.

UTILISEZ A VOS RISQUES ET PERILS !'; -$wb['action_scheduled'] = 'L\'action est marquée pour exécution'; -$wb['select_all_server'] = 'Tout serveur'; -?> - +
UTILISEZ A VOS RISQUES ET PERILS !'; +$wb['do_ispcupdate_caption'] = 'Mettre à jour ISPConfig 3 sur le serveur distant'; +$wb['do_ispcupdate_desc'] = 'Cette action met à jour ISPConfig3 sur le serveur sélectionné.

UTILISEZ A VOS RISQUES ET PERILS !'; +$wb['action_scheduled'] = 'L\'action est marquée pour exécution'; +$wb['select_all_server'] = 'Tout serveur'; +?> + diff --git a/interface/web/admin/lib/lang/fr_remote_user.lng b/interface/web/admin/lib/lang/fr_remote_user.lng index 451d80049c33d5a3ab0d71569b2e167b9b8d01b6..ab77be4fdfe6da424e4056e54f7facbde138e357 100644 --- a/interface/web/admin/lib/lang/fr_remote_user.lng +++ b/interface/web/admin/lib/lang/fr_remote_user.lng @@ -1,43 +1,43 @@ - - + + diff --git a/interface/web/admin/lib/lang/fr_remote_user_list.lng b/interface/web/admin/lib/lang/fr_remote_user_list.lng index 6b5ada2f5b848b0aa1412fa76b6f7fe9ac8a6b02..808fa3994db4f64c7bf483ee1949cc48ae2f9753 100644 --- a/interface/web/admin/lib/lang/fr_remote_user_list.lng +++ b/interface/web/admin/lib/lang/fr_remote_user_list.lng @@ -1,8 +1,8 @@ - - + + diff --git a/interface/web/admin/lib/lang/fr_server.lng b/interface/web/admin/lib/lang/fr_server.lng index 5b8684a7c0c71ca4f9b999222c68de1ce17bafa0..4ba7b7ddeb93b6ef12b46770873483cc6d011f2d 100644 --- a/interface/web/admin/lib/lang/fr_server.lng +++ b/interface/web/admin/lib/lang/fr_server.lng @@ -1,14 +1,14 @@ - - + + diff --git a/interface/web/admin/lib/lang/fr_server_config.lng b/interface/web/admin/lib/lang/fr_server_config.lng index 4e32219f192ce2f4ceeaeb33093413ea9b6bc67a..3efec6a7cd36ff9d4254d7f78c35e0d92782238e 100644 --- a/interface/web/admin/lib/lang/fr_server_config.lng +++ b/interface/web/admin/lib/lang/fr_server_config.lng @@ -1,78 +1,78 @@ - - + + diff --git a/interface/web/admin/lib/lang/fr_server_config_list.lng b/interface/web/admin/lib/lang/fr_server_config_list.lng index 04278ff0559103b32550312638afe61e87916e65..c1c75e3ef52f9955cc6415d8c41f68c6653ca43d 100644 --- a/interface/web/admin/lib/lang/fr_server_config_list.lng +++ b/interface/web/admin/lib/lang/fr_server_config_list.lng @@ -1,5 +1,5 @@ - - + + diff --git a/interface/web/admin/lib/lang/fr_server_ip.lng b/interface/web/admin/lib/lang/fr_server_ip.lng index 9e3be01c3e67b1ed5ab0bf33875ccb2414e56870..a7b36db89ea8dc27e50482ebc981e379d1db7fed 100644 --- a/interface/web/admin/lib/lang/fr_server_ip.lng +++ b/interface/web/admin/lib/lang/fr_server_ip.lng @@ -1,8 +1,8 @@ - - + + diff --git a/interface/web/admin/lib/lang/fr_server_ip_list.lng b/interface/web/admin/lib/lang/fr_server_ip_list.lng index faca536a37229b46026e4c052c75e9d9c06eb42c..e75b76a3d35cde0fdcdea43675132820dcb71ccf 100644 --- a/interface/web/admin/lib/lang/fr_server_ip_list.lng +++ b/interface/web/admin/lib/lang/fr_server_ip_list.lng @@ -1,7 +1,7 @@ - - + + diff --git a/interface/web/admin/lib/lang/fr_server_list.lng b/interface/web/admin/lib/lang/fr_server_list.lng index b4e6569e934b3c0ef34b0a2a5383fb3e8e3f8d96..660d64c60bc3e51753904a73634234ab1edd0927 100644 --- a/interface/web/admin/lib/lang/fr_server_list.lng +++ b/interface/web/admin/lib/lang/fr_server_list.lng @@ -1,12 +1,12 @@ - - + + diff --git a/interface/web/admin/lib/lang/fr_software_package_install.lng b/interface/web/admin/lib/lang/fr_software_package_install.lng index aa31bc63d466250e01f50ab161d507b4cce3d016..9ebf62be34331153b21936772050785baf697005 100644 --- a/interface/web/admin/lib/lang/fr_software_package_install.lng +++ b/interface/web/admin/lib/lang/fr_software_package_install.lng @@ -1,7 +1,7 @@ - - + + diff --git a/interface/web/admin/lib/lang/fr_software_package_list.lng b/interface/web/admin/lib/lang/fr_software_package_list.lng index 379840a978e4d0974f7f908dbd07b9439fd8b9c8..6258e9d80258064526b2a9c68f8a8fde01d2e231 100644 --- a/interface/web/admin/lib/lang/fr_software_package_list.lng +++ b/interface/web/admin/lib/lang/fr_software_package_list.lng @@ -1,11 +1,11 @@ - - + + diff --git a/interface/web/admin/lib/lang/fr_software_repo.lng b/interface/web/admin/lib/lang/fr_software_repo.lng index b6722b2a1de984f1b8973e5f3412987c9db1768c..aaf6906142886cb841b659165d35e179e6c7d7aa 100644 --- a/interface/web/admin/lib/lang/fr_software_repo.lng +++ b/interface/web/admin/lib/lang/fr_software_repo.lng @@ -1,8 +1,8 @@ - - + + diff --git a/interface/web/admin/lib/lang/fr_software_repo_list.lng b/interface/web/admin/lib/lang/fr_software_repo_list.lng index 2e5029c1dab52db6e724093f886aeda52702f567..1b8d0ffc18778fd8d80efaa6a319e05ebfc78fb2 100644 --- a/interface/web/admin/lib/lang/fr_software_repo_list.lng +++ b/interface/web/admin/lib/lang/fr_software_repo_list.lng @@ -1,7 +1,7 @@ - - + + diff --git a/interface/web/admin/lib/lang/fr_software_update_list.lng b/interface/web/admin/lib/lang/fr_software_update_list.lng index 8399418b10ebfb65192fc6a9df3fa1fd5288f8f1..1170d50dfbfa5340c9b190850956435d28c5383f 100644 --- a/interface/web/admin/lib/lang/fr_software_update_list.lng +++ b/interface/web/admin/lib/lang/fr_software_update_list.lng @@ -1,9 +1,9 @@ - - + + diff --git a/interface/web/admin/lib/lang/fr_system_config.lng b/interface/web/admin/lib/lang/fr_system_config.lng index 1f26b4b5d4f974dec085ca26da5d73b16ea9fa68..63edba38b87583d8a767f149db54fd6c06efb808 100644 --- a/interface/web/admin/lib/lang/fr_system_config.lng +++ b/interface/web/admin/lib/lang/fr_system_config.lng @@ -1,24 +1,24 @@ - - + + diff --git a/interface/web/admin/lib/lang/fr_users.lng b/interface/web/admin/lib/lang/fr_users.lng index fd92c795f20be0763d7702b07308f806ed743b07..d9a41042d48ebbfcf2fbcdb75299092cd02e59bc 100644 --- a/interface/web/admin/lib/lang/fr_users.lng +++ b/interface/web/admin/lib/lang/fr_users.lng @@ -1,29 +1,29 @@ - - + + diff --git a/interface/web/admin/lib/lang/fr_users_list.lng b/interface/web/admin/lib/lang/fr_users_list.lng index 770270c341a6afc40247951e4d481ef1036a5340..e33efc6e8e08a380a37adaada60da66b91385402 100644 --- a/interface/web/admin/lib/lang/fr_users_list.lng +++ b/interface/web/admin/lib/lang/fr_users_list.lng @@ -1,10 +1,10 @@ -ATTENTION: Ne pas éditer ou modifier de paramètre utilisateur ici. Utilisez les paramètres Client et Revendeur dans le module Client à la place. Modifier ou changer les informations ici peut conduire à la perte de données'; -?> - +ATTENTION: Ne pas éditer ou modifier de paramètre utilisateur ici. Utilisez les paramètres Client et Revendeur dans le module Client à la place. Modifier ou changer les informations ici peut conduire à la perte de données'; +?> + diff --git a/interface/web/client/lib/lang/fr.lng b/interface/web/client/lib/lang/fr.lng index 8223d24a58c8b678228b68bee15a9c271e90a11a..a0075d8a7ec1ba5a2c704cf928c59c80701df759 100644 --- a/interface/web/client/lib/lang/fr.lng +++ b/interface/web/client/lib/lang/fr.lng @@ -1,14 +1,14 @@ - - + + diff --git a/interface/web/client/lib/lang/fr_client.lng b/interface/web/client/lib/lang/fr_client.lng index bc68dca65b990023a3e22ebae87d44d0287282da..f5c8fca96ed945a1d8976dad4406cb1260613d58 100644 --- a/interface/web/client/lib/lang/fr_client.lng +++ b/interface/web/client/lib/lang/fr_client.lng @@ -1,102 +1,102 @@ - - + + diff --git a/interface/web/client/lib/lang/fr_client_del.lng b/interface/web/client/lib/lang/fr_client_del.lng index 8a9d14f4db83d86c28035c52af7d55c6abd46828..8a8948542498bd274ed18840e74a7574d129f006 100644 --- a/interface/web/client/lib/lang/fr_client_del.lng +++ b/interface/web/client/lib/lang/fr_client_del.lng @@ -1,7 +1,7 @@ - - + + diff --git a/interface/web/client/lib/lang/fr_client_template.lng b/interface/web/client/lib/lang/fr_client_template.lng index c1274b770d325ce8210f887ea546308e7d36c90a..2d17b1f79fca0fba6dac0e61293849e4a5796c7d 100644 --- a/interface/web/client/lib/lang/fr_client_template.lng +++ b/interface/web/client/lib/lang/fr_client_template.lng @@ -1,64 +1,64 @@ - - + + diff --git a/interface/web/client/lib/lang/fr_client_template_list.lng b/interface/web/client/lib/lang/fr_client_template_list.lng index 776dbd0b577e39605cc9c81e1edb68b15eca1290..f6063e2d4108c9659dc86ac7415c40e0ebf96e4d 100644 --- a/interface/web/client/lib/lang/fr_client_template_list.lng +++ b/interface/web/client/lib/lang/fr_client_template_list.lng @@ -1,6 +1,6 @@ - - + + diff --git a/interface/web/client/lib/lang/fr_clients_list.lng b/interface/web/client/lib/lang/fr_clients_list.lng index a6787f34fb86d9f578e7f2b11209b82b258eff64..afbf646d2f4cead5be7ff6ff017957e5b38958a8 100644 --- a/interface/web/client/lib/lang/fr_clients_list.lng +++ b/interface/web/client/lib/lang/fr_clients_list.lng @@ -1,10 +1,10 @@ - - + + diff --git a/interface/web/client/lib/lang/fr_reseller.lng b/interface/web/client/lib/lang/fr_reseller.lng index 0be106adb02aed9484388083446ae54a7d08bfb6..5245e0f60abc10d47bfdf034d8a84d02b3c449e0 100644 --- a/interface/web/client/lib/lang/fr_reseller.lng +++ b/interface/web/client/lib/lang/fr_reseller.lng @@ -1,103 +1,103 @@ - - + + diff --git a/interface/web/client/lib/lang/fr_resellers_list.lng b/interface/web/client/lib/lang/fr_resellers_list.lng index a6787f34fb86d9f578e7f2b11209b82b258eff64..afbf646d2f4cead5be7ff6ff017957e5b38958a8 100644 --- a/interface/web/client/lib/lang/fr_resellers_list.lng +++ b/interface/web/client/lib/lang/fr_resellers_list.lng @@ -1,10 +1,10 @@ - - + + diff --git a/interface/web/dashboard/lib/lang/fr.lng b/interface/web/dashboard/lib/lang/fr.lng index 6bb32cf770afed9bd4748470c2eed038268a4094..305c525d3366c3ad73390c52db37ad5ff1f8a131 100644 --- a/interface/web/dashboard/lib/lang/fr.lng +++ b/interface/web/dashboard/lib/lang/fr.lng @@ -1,5 +1,5 @@ - - + + diff --git a/interface/web/dashboard/lib/lang/fr_dashlet_limits.lng b/interface/web/dashboard/lib/lang/fr_dashlet_limits.lng index 7a4f76b41441b543f64ba6415fc70d2ba5af9eff..2d3752730cdbb04a1645003c62ce2b3b564774ae 100644 --- a/interface/web/dashboard/lib/lang/fr_dashlet_limits.lng +++ b/interface/web/dashboard/lib/lang/fr_dashlet_limits.lng @@ -1,30 +1,30 @@ - - + + diff --git a/interface/web/dashboard/lib/lang/fr_dashlet_modules.lng b/interface/web/dashboard/lib/lang/fr_dashlet_modules.lng index 4eebdb76d9e38963b2034dc04bffe61ac9653719..c511af9f3cd64564675377b0a183452b049607a1 100644 --- a/interface/web/dashboard/lib/lang/fr_dashlet_modules.lng +++ b/interface/web/dashboard/lib/lang/fr_dashlet_modules.lng @@ -1,4 +1,4 @@ - - + + diff --git a/interface/web/designer/lib/lang/fr.lng b/interface/web/designer/lib/lang/fr.lng index 75c42c807a4b617b8fe9048defb206bc87ec8acf..29f4a51efebb370aeb04c5144a604ca2c04e02be 100644 --- a/interface/web/designer/lib/lang/fr.lng +++ b/interface/web/designer/lib/lang/fr.lng @@ -1,3 +1,3 @@ - - + + diff --git a/interface/web/designer/lib/lang/fr_form_edit.lng b/interface/web/designer/lib/lang/fr_form_edit.lng index 7b272a4b0d16fa40b516f19ed3b3080e43bc66f8..f02964708d732fea1714093cdf7562570ab10b71 100644 --- a/interface/web/designer/lib/lang/fr_form_edit.lng +++ b/interface/web/designer/lib/lang/fr_form_edit.lng @@ -1,25 +1,25 @@ - - + + diff --git a/interface/web/designer/lib/lang/fr_form_list.lng b/interface/web/designer/lib/lang/fr_form_list.lng index a386f5bf4ba978ce46bfc922519837559bcf8400..65497a5f1697f3453e0bab11166c2afb91a7a846 100644 --- a/interface/web/designer/lib/lang/fr_form_list.lng +++ b/interface/web/designer/lib/lang/fr_form_list.lng @@ -1,8 +1,8 @@ - - + + diff --git a/interface/web/designer/lib/lang/fr_form_show.lng b/interface/web/designer/lib/lang/fr_form_show.lng index 3a15faa3fb14ff6845626625728598700f49a4f9..236ae2c50a62564ba7c85b1eb6d61ecbfdafde22 100644 --- a/interface/web/designer/lib/lang/fr_form_show.lng +++ b/interface/web/designer/lib/lang/fr_form_show.lng @@ -1,19 +1,19 @@ - - + + diff --git a/interface/web/designer/lib/lang/fr_module_edit.lng b/interface/web/designer/lib/lang/fr_module_edit.lng index c5d1744837791b948042c0c45201c64b1e7d23b1..6de5b65774a0401d7ae9ec331d4389e7f2782f52 100644 --- a/interface/web/designer/lib/lang/fr_module_edit.lng +++ b/interface/web/designer/lib/lang/fr_module_edit.lng @@ -1,13 +1,13 @@ -Description

Nom du Module: Nom du répertoire du module. Seuls les nombres, lettres et underscores sont autorisés.
Titre du module: Sera affiché dans le menu de navigation (supérieur).
Fichier gabarit: Fichier'; -?> - +Description

Nom du Module: Nom du répertoire du module. Seuls les nombres, lettres et underscores sont autorisés.
Titre du module: Sera affiché dans le menu de navigation (supérieur).
Fichier gabarit: Fichier'; +?> + diff --git a/interface/web/designer/lib/lang/fr_module_list.lng b/interface/web/designer/lib/lang/fr_module_list.lng index 83093dbbf80f7863b5d2b97d2db59a826e3341d0..06ac927202bb0230efc931802074ad4d968b9e21 100644 --- a/interface/web/designer/lib/lang/fr_module_list.lng +++ b/interface/web/designer/lib/lang/fr_module_list.lng @@ -1,6 +1,6 @@ - - + + diff --git a/interface/web/designer/lib/lang/fr_module_nav_edit.lng b/interface/web/designer/lib/lang/fr_module_nav_edit.lng index affd745e451061fb5780e714a3c8a4c8c3ba76a7..8ff301813ae349332a599dc5c337458d097ff537 100644 --- a/interface/web/designer/lib/lang/fr_module_nav_edit.lng +++ b/interface/web/designer/lib/lang/fr_module_nav_edit.lng @@ -1,7 +1,7 @@ - - + + diff --git a/interface/web/designer/lib/lang/fr_module_nav_item_edit.lng b/interface/web/designer/lib/lang/fr_module_nav_item_edit.lng index 803d96c995bfd827bf1d0aff841993eb47fe7756..fafcfbc1ea1d06f4ecb356f45a3d06d17de28dc1 100644 --- a/interface/web/designer/lib/lang/fr_module_nav_item_edit.lng +++ b/interface/web/designer/lib/lang/fr_module_nav_item_edit.lng @@ -1,9 +1,9 @@ - - + + diff --git a/interface/web/designer/lib/lang/fr_module_show.lng b/interface/web/designer/lib/lang/fr_module_show.lng index b768f4939d087a52444310d2cef9522b0775cc17..857817aaae79b95216778c1d66f12a77e7b74ac3 100644 --- a/interface/web/designer/lib/lang/fr_module_show.lng +++ b/interface/web/designer/lib/lang/fr_module_show.lng @@ -1,17 +1,17 @@ - - + + diff --git a/interface/web/dns/lib/lang/fr.lng b/interface/web/dns/lib/lang/fr.lng index 6c2d923e4238cee218a17828f88772882545f4d5..af0a6df9cdbe2521a641474615b4e89ad65e97e0 100644 --- a/interface/web/dns/lib/lang/fr.lng +++ b/interface/web/dns/lib/lang/fr.lng @@ -1,21 +1,21 @@ - - + + diff --git a/interface/web/dns/lib/lang/fr_dns_a.lng b/interface/web/dns/lib/lang/fr_dns_a.lng index 207547f995df66cc38911792bd2ac0e05a3d9b58..929ccf5c5d602665a296fe399fe691cb3c8afca0 100644 --- a/interface/web/dns/lib/lang/fr_dns_a.lng +++ b/interface/web/dns/lib/lang/fr_dns_a.lng @@ -1,17 +1,17 @@ - - + + diff --git a/interface/web/dns/lib/lang/fr_dns_a_list.lng b/interface/web/dns/lib/lang/fr_dns_a_list.lng index f34205a7eab8f76dfcaf53e74debe9e3fb9eb629..8aec347f144edf34bc24823d0fbc0eac8ebae5ec 100644 --- a/interface/web/dns/lib/lang/fr_dns_a_list.lng +++ b/interface/web/dns/lib/lang/fr_dns_a_list.lng @@ -1,15 +1,15 @@ - - + + diff --git a/interface/web/dns/lib/lang/fr_dns_aaaa.lng b/interface/web/dns/lib/lang/fr_dns_aaaa.lng index 826c764030df45e9302bef321231f395d1094a7d..dcc1eee8f3ca4086a359ee386b41d4901bcd6ae5 100644 --- a/interface/web/dns/lib/lang/fr_dns_aaaa.lng +++ b/interface/web/dns/lib/lang/fr_dns_aaaa.lng @@ -1,16 +1,16 @@ - - + + diff --git a/interface/web/dns/lib/lang/fr_dns_alias.lng b/interface/web/dns/lib/lang/fr_dns_alias.lng index e9e5b5c822bfaec9a6127cb774912de476050d50..6208ee671a40f44242d33244876748d1e16bdb37 100644 --- a/interface/web/dns/lib/lang/fr_dns_alias.lng +++ b/interface/web/dns/lib/lang/fr_dns_alias.lng @@ -1,16 +1,16 @@ - - + + diff --git a/interface/web/dns/lib/lang/fr_dns_cname.lng b/interface/web/dns/lib/lang/fr_dns_cname.lng index de0b938e9247640280414b4b951599e1b72039ed..f9dda246a892df3bc2952a935c65d9e8a76c2008 100644 --- a/interface/web/dns/lib/lang/fr_dns_cname.lng +++ b/interface/web/dns/lib/lang/fr_dns_cname.lng @@ -1,17 +1,17 @@ - - + + diff --git a/interface/web/dns/lib/lang/fr_dns_hinfo.lng b/interface/web/dns/lib/lang/fr_dns_hinfo.lng index 6b974a739444c6aaa033464561691f3fb02db0a9..2134f85df81bd788def6c59d2c96f0e4f6dbe253 100644 --- a/interface/web/dns/lib/lang/fr_dns_hinfo.lng +++ b/interface/web/dns/lib/lang/fr_dns_hinfo.lng @@ -1,16 +1,16 @@ - - + + diff --git a/interface/web/dns/lib/lang/fr_dns_mx.lng b/interface/web/dns/lib/lang/fr_dns_mx.lng index 238ff1d65b40d814c4e5ed757bc04a3f142df2f1..27dd822bef694acac4d502c9bf18a1cf0ecc9a49 100644 --- a/interface/web/dns/lib/lang/fr_dns_mx.lng +++ b/interface/web/dns/lib/lang/fr_dns_mx.lng @@ -1,17 +1,17 @@ - - + + diff --git a/interface/web/dns/lib/lang/fr_dns_ns.lng b/interface/web/dns/lib/lang/fr_dns_ns.lng index 5cc49ce30774ac5174d97cc5122c5d0a15cf6aca..86bd0cf3f72ca6324f6b3413774a7f14056a23c3 100644 --- a/interface/web/dns/lib/lang/fr_dns_ns.lng +++ b/interface/web/dns/lib/lang/fr_dns_ns.lng @@ -1,16 +1,16 @@ - - + + diff --git a/interface/web/dns/lib/lang/fr_dns_ptr.lng b/interface/web/dns/lib/lang/fr_dns_ptr.lng index 79456182985acfcde244227b1d9be54b5326760e..9bd4e707e2665362027c06149cf2d72057502aa8 100644 --- a/interface/web/dns/lib/lang/fr_dns_ptr.lng +++ b/interface/web/dns/lib/lang/fr_dns_ptr.lng @@ -1,16 +1,16 @@ - - + + diff --git a/interface/web/dns/lib/lang/fr_dns_rp.lng b/interface/web/dns/lib/lang/fr_dns_rp.lng index 1d79fbaee0355078c0e5dcdd5e605f691fff3f7a..d6654df39de9b10cf303245855cc04f8199a7cac 100644 --- a/interface/web/dns/lib/lang/fr_dns_rp.lng +++ b/interface/web/dns/lib/lang/fr_dns_rp.lng @@ -1,16 +1,16 @@ - - + + diff --git a/interface/web/dns/lib/lang/fr_dns_slave.lng b/interface/web/dns/lib/lang/fr_dns_slave.lng index 2c8a96e07424506006f518a980660996d117ea18..afd91c9404ceb5985e432feadb44f7d78804bd27 100644 --- a/interface/web/dns/lib/lang/fr_dns_slave.lng +++ b/interface/web/dns/lib/lang/fr_dns_slave.lng @@ -1,15 +1,15 @@ -ces IPs (liste séparée par des virgules)'; -$wb['server_id_error_empty'] = 'Aucun serveur sélectionné'; -$wb['origin_error_empty'] = 'zone vide.'; -$wb['origin_error_unique'] = 'Il y a déjà un enregistrement pour cette zone.'; -$wb['origin_error_regex'] = 'La zone a un format invalide.'; -$wb['ns_error_regex'] = 'L\'enregistrement NS a un format invalide.'; -?> - +ces IPs (liste séparée par des virgules)'; +$wb['server_id_error_empty'] = 'Aucun serveur sélectionné'; +$wb['origin_error_empty'] = 'zone vide.'; +$wb['origin_error_unique'] = 'Il y a déjà un enregistrement pour cette zone.'; +$wb['origin_error_regex'] = 'La zone a un format invalide.'; +$wb['ns_error_regex'] = 'L\'enregistrement NS a un format invalide.'; +?> + diff --git a/interface/web/dns/lib/lang/fr_dns_slave_list.lng b/interface/web/dns/lib/lang/fr_dns_slave_list.lng index f375f01068610081a7567a518f8528aa1adcb869..86b0b5b9925ee1a596868c28a3221956d286dfc3 100644 --- a/interface/web/dns/lib/lang/fr_dns_slave_list.lng +++ b/interface/web/dns/lib/lang/fr_dns_slave_list.lng @@ -1,9 +1,9 @@ - - + + diff --git a/interface/web/dns/lib/lang/fr_dns_soa.lng b/interface/web/dns/lib/lang/fr_dns_soa.lng index 8824f946f20237964779c0541a5c25f034e947d8..9b65216bc722f5ae083510891955c4e97803adc8 100644 --- a/interface/web/dns/lib/lang/fr_dns_soa.lng +++ b/interface/web/dns/lib/lang/fr_dns_soa.lng @@ -1,27 +1,27 @@ -ces IP (liste séparée par des virgules)'; -$wb['active_txt'] = 'Actif'; -$wb['client_txt'] = 'Client'; -$wb['no_zone_perm'] = 'Vous n\'avez pas la permission d\'ajouter un enregistrement dans cette zone DNS.'; -$wb['server_id_error_empty'] = 'Aucun serveur sélectionné'; -$wb['origin_error_empty'] = 'Zone vide.'; -$wb['origin_error_unique'] = 'Il y a déja un enregistrement pour cette zone.'; -$wb['origin_error_regex'] = 'La zone est d\'un format invalide.'; -$wb['ns_error_regex'] = 'Le serveur de nom est d\'un format invalide.'; -$wb['mbox_error_empty'] = 'L\'adresse email est vide.'; -$wb['mbox_error_regex'] = 'L\'adresse email est d\'un format invalide.'; -$wb['limit_dns_zone_txt'] = 'Le nombre maximal de zones DNS pour votre compte est atteint.'; -$wb['also_notify_txt'] = 'Notifier aussi'; -$wb['update_acl_txt'] = 'Mettre à jour l\'ACL'; -?> - +ces IP (liste séparée par des virgules)'; +$wb['active_txt'] = 'Actif'; +$wb['client_txt'] = 'Client'; +$wb['no_zone_perm'] = 'Vous n\'avez pas la permission d\'ajouter un enregistrement dans cette zone DNS.'; +$wb['server_id_error_empty'] = 'Aucun serveur sélectionné'; +$wb['origin_error_empty'] = 'Zone vide.'; +$wb['origin_error_unique'] = 'Il y a déja un enregistrement pour cette zone.'; +$wb['origin_error_regex'] = 'La zone est d\'un format invalide.'; +$wb['ns_error_regex'] = 'Le serveur de nom est d\'un format invalide.'; +$wb['mbox_error_empty'] = 'L\'adresse email est vide.'; +$wb['mbox_error_regex'] = 'L\'adresse email est d\'un format invalide.'; +$wb['limit_dns_zone_txt'] = 'Le nombre maximal de zones DNS pour votre compte est atteint.'; +$wb['also_notify_txt'] = 'Notifier aussi'; +$wb['update_acl_txt'] = 'Mettre à jour l\'ACL'; +?> + diff --git a/interface/web/dns/lib/lang/fr_dns_soa_list.lng b/interface/web/dns/lib/lang/fr_dns_soa_list.lng index 1e39193e995b2420711b3ca470b01ec3c9cb48b4..7b69c8a7ecf06e2e94f2e1247730dfd120b9617d 100644 --- a/interface/web/dns/lib/lang/fr_dns_soa_list.lng +++ b/interface/web/dns/lib/lang/fr_dns_soa_list.lng @@ -1,11 +1,11 @@ - - + + diff --git a/interface/web/dns/lib/lang/fr_dns_srv.lng b/interface/web/dns/lib/lang/fr_dns_srv.lng index 2e649a3e9d327bb461a4f229564b1a6d5348e53a..dda4fbacb9264af278a2ce8418e0af51a056b55d 100644 --- a/interface/web/dns/lib/lang/fr_dns_srv.lng +++ b/interface/web/dns/lib/lang/fr_dns_srv.lng @@ -1,18 +1,18 @@ - - + + diff --git a/interface/web/dns/lib/lang/fr_dns_template.lng b/interface/web/dns/lib/lang/fr_dns_template.lng index 303f8a1fbd2b22327c0a6cb2662d1acb3d74384a..dffdae27f75a7fa8049641c0e61b8ec15e5ddea2 100644 --- a/interface/web/dns/lib/lang/fr_dns_template.lng +++ b/interface/web/dns/lib/lang/fr_dns_template.lng @@ -1,7 +1,7 @@ - - + + diff --git a/interface/web/dns/lib/lang/fr_dns_template_list.lng b/interface/web/dns/lib/lang/fr_dns_template_list.lng index b62aa8b8754b52b25d3b8613903e5420d9fec349..0a4b7ef60bd4c2c55968ed271ba45f46c3fe7007 100644 --- a/interface/web/dns/lib/lang/fr_dns_template_list.lng +++ b/interface/web/dns/lib/lang/fr_dns_template_list.lng @@ -1,7 +1,7 @@ - - + + diff --git a/interface/web/dns/lib/lang/fr_dns_txt.lng b/interface/web/dns/lib/lang/fr_dns_txt.lng index 15815454f555c7bbc785ddc314f9b6e24c6f969b..07ea85e80e811caa8fd259115f23ebafd11d5e34 100644 --- a/interface/web/dns/lib/lang/fr_dns_txt.lng +++ b/interface/web/dns/lib/lang/fr_dns_txt.lng @@ -1,16 +1,16 @@ - - + + diff --git a/interface/web/dns/lib/lang/fr_dns_wizard.lng b/interface/web/dns/lib/lang/fr_dns_wizard.lng index 7ef4411b8e73ba15ea1ba3530dddf05fd28f4dc7..00dd9839cb9c25a0523b2a6250585ede42ddafaa 100644 --- a/interface/web/dns/lib/lang/fr_dns_wizard.lng +++ b/interface/web/dns/lib/lang/fr_dns_wizard.lng @@ -1,30 +1,30 @@ - - + + diff --git a/interface/web/domain/lib/lang/fr.lng b/interface/web/domain/lib/lang/fr.lng index 8e769cc4183dcb06d52dfa3cf656ae104260fb76..bf171dbdd23200c8ecec3df5c2eb5cd59cbf4ea2 100644 --- a/interface/web/domain/lib/lang/fr.lng +++ b/interface/web/domain/lib/lang/fr.lng @@ -1,10 +1,10 @@ -'; -?> - +'; +?> + diff --git a/interface/web/domain/lib/lang/fr_domain.lng b/interface/web/domain/lib/lang/fr_domain.lng index d6e689e82340940898d340d8220577c5a750d219..5658a19a9dcdd9d8885b77276d1bb6fe8c3455c5 100644 --- a/interface/web/domain/lib/lang/fr_domain.lng +++ b/interface/web/domain/lib/lang/fr_domain.lng @@ -1,7 +1,7 @@ - - + + diff --git a/interface/web/domain/lib/lang/fr_domain_list.lng b/interface/web/domain/lib/lang/fr_domain_list.lng index a431f877ec8f1aee7b1ef55243df2132add99dce..f73cb556ea3da2d4017a979431e660ef0dd464af 100644 --- a/interface/web/domain/lib/lang/fr_domain_list.lng +++ b/interface/web/domain/lib/lang/fr_domain_list.lng @@ -1,6 +1,6 @@ - - + + diff --git a/interface/web/help/lib/lang/fr.lng b/interface/web/help/lib/lang/fr.lng index 25eec0abeb40721b82cb5735194d97213b28b775..3c08f2a2e1bcecf5dfb57f2f8e772e7d6af26e02 100644 --- a/interface/web/help/lib/lang/fr.lng +++ b/interface/web/help/lib/lang/fr.lng @@ -1,10 +1,10 @@ - - + + diff --git a/interface/web/help/lib/lang/fr_support_message.lng b/interface/web/help/lib/lang/fr_support_message.lng index 01b5b19dd04d7c405625c1744b806fbe1f48b46a..9d7eab1630a19ada1e9457d1fdc40e5f3a9cffc6 100644 --- a/interface/web/help/lib/lang/fr_support_message.lng +++ b/interface/web/help/lib/lang/fr_support_message.lng @@ -1,8 +1,8 @@ - - + + diff --git a/interface/web/help/lib/lang/fr_support_message_list.lng b/interface/web/help/lib/lang/fr_support_message_list.lng index 358b5e1ca121d9a6c2885362b9e75cc75b48e201..cfa4610865b93cc9488d3bf216f51d112b8ad1cd 100644 --- a/interface/web/help/lib/lang/fr_support_message_list.lng +++ b/interface/web/help/lib/lang/fr_support_message_list.lng @@ -1,7 +1,7 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr.lng b/interface/web/mail/lib/lang/fr.lng index 637ebca95db301d84567044b08230a388ae159f0..6a437b7f987f8930d75b99989f19a970f5f92eac 100644 --- a/interface/web/mail/lib/lang/fr.lng +++ b/interface/web/mail/lib/lang/fr.lng @@ -1,48 +1,48 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_mail_alias.lng b/interface/web/mail/lib/lang/fr_mail_alias.lng index 8a1a5eb9a3a77d0906bfe6a2d077050da48eb8cb..423d2ae2e5c1306a05a41c6a0617d50a6cc50880 100644 --- a/interface/web/mail/lib/lang/fr_mail_alias.lng +++ b/interface/web/mail/lib/lang/fr_mail_alias.lng @@ -1,12 +1,12 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_mail_alias_list.lng b/interface/web/mail/lib/lang/fr_mail_alias_list.lng index 0e28b1e9b648e83b4edc1e12f0533ab833bf0d7f..cb88394d2babfdc3c035a77996a96caf9f6a44d4 100644 --- a/interface/web/mail/lib/lang/fr_mail_alias_list.lng +++ b/interface/web/mail/lib/lang/fr_mail_alias_list.lng @@ -1,9 +1,9 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_mail_aliasdomain.lng b/interface/web/mail/lib/lang/fr_mail_aliasdomain.lng index 8855ee7940070e84a134464115dab94a3f00cf3d..c59aaa961885fc0c16ed71b0fb21c05adc26ec71 100644 --- a/interface/web/mail/lib/lang/fr_mail_aliasdomain.lng +++ b/interface/web/mail/lib/lang/fr_mail_aliasdomain.lng @@ -1,12 +1,12 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_mail_aliasdomain_list.lng b/interface/web/mail/lib/lang/fr_mail_aliasdomain_list.lng index 8f0999dc0351f49a58b3c0da1e102f9e74311fe3..e9615443eb739f524b21012b474090f491bf2020 100644 --- a/interface/web/mail/lib/lang/fr_mail_aliasdomain_list.lng +++ b/interface/web/mail/lib/lang/fr_mail_aliasdomain_list.lng @@ -1,8 +1,8 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_mail_blacklist.lng b/interface/web/mail/lib/lang/fr_mail_blacklist.lng index a2f1e13150e4e5f1f34c44435e7a5fd2f0b99b37..ba70338c7816efc40e65666dc0a2e94ecbcb0dfa 100644 --- a/interface/web/mail/lib/lang/fr_mail_blacklist.lng +++ b/interface/web/mail/lib/lang/fr_mail_blacklist.lng @@ -1,10 +1,10 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_mail_blacklist_list.lng b/interface/web/mail/lib/lang/fr_mail_blacklist_list.lng index b9158ec7ee32c23f02df327b816c046c6b3971b1..a2e698cac9a792e4dab7f0f8d61a565774aa8b02 100644 --- a/interface/web/mail/lib/lang/fr_mail_blacklist_list.lng +++ b/interface/web/mail/lib/lang/fr_mail_blacklist_list.lng @@ -1,11 +1,11 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_mail_content_filter.lng b/interface/web/mail/lib/lang/fr_mail_content_filter.lng index 0097ce15293cfe43dbf1c14a7acf0aabf8207884..2eadb4b111c247e63b0f28c88b5527bd21fd4bae 100644 --- a/interface/web/mail/lib/lang/fr_mail_content_filter.lng +++ b/interface/web/mail/lib/lang/fr_mail_content_filter.lng @@ -1,10 +1,10 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_mail_content_filter_list.lng b/interface/web/mail/lib/lang/fr_mail_content_filter_list.lng index 184401bdd78d4b84f548d0e5caa39ac0872b5d56..89774dff6018382bf292063e640e8c09e03fa72b 100644 --- a/interface/web/mail/lib/lang/fr_mail_content_filter_list.lng +++ b/interface/web/mail/lib/lang/fr_mail_content_filter_list.lng @@ -1,9 +1,9 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_mail_domain.lng b/interface/web/mail/lib/lang/fr_mail_domain.lng index dc77e9ca21cad394064ce58e16bbeca4035ada7b..5584326ff60634dd8402a76744fdfc8a195dcae0 100644 --- a/interface/web/mail/lib/lang/fr_mail_domain.lng +++ b/interface/web/mail/lib/lang/fr_mail_domain.lng @@ -1,14 +1,14 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_mail_domain_admin_list.lng b/interface/web/mail/lib/lang/fr_mail_domain_admin_list.lng index b3f1bec4f055b14408e61b008ace7e62aafca1b4..87ae9706a66f0ce17ffceb7b3144074ddcc8a51f 100644 --- a/interface/web/mail/lib/lang/fr_mail_domain_admin_list.lng +++ b/interface/web/mail/lib/lang/fr_mail_domain_admin_list.lng @@ -1,9 +1,9 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_mail_domain_catchall.lng b/interface/web/mail/lib/lang/fr_mail_domain_catchall.lng index 0f973bf11fb465967fa78a3efe7e670b51b21a33..fdc59c4a668753800deb49f0c7b1c9e8cb3b1cea 100644 --- a/interface/web/mail/lib/lang/fr_mail_domain_catchall.lng +++ b/interface/web/mail/lib/lang/fr_mail_domain_catchall.lng @@ -1,10 +1,10 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_mail_domain_catchall_list.lng b/interface/web/mail/lib/lang/fr_mail_domain_catchall_list.lng index 57281c689866514b12ca837f9489dcd67f41a488..41833df4004dcbe57295032b67a210fbb97139da 100644 --- a/interface/web/mail/lib/lang/fr_mail_domain_catchall_list.lng +++ b/interface/web/mail/lib/lang/fr_mail_domain_catchall_list.lng @@ -1,10 +1,10 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_mail_domain_list.lng b/interface/web/mail/lib/lang/fr_mail_domain_list.lng index 6419abb4919565c8f0dd06b1f03a0588934a72a5..f0897b58ee863818fe1e9ef8c05c9f2919a93c12 100644 --- a/interface/web/mail/lib/lang/fr_mail_domain_list.lng +++ b/interface/web/mail/lib/lang/fr_mail_domain_list.lng @@ -1,8 +1,8 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_mail_forward.lng b/interface/web/mail/lib/lang/fr_mail_forward.lng index 23270ccb46f79b0378afc83ed434a762b7d637b1..4672e693a2d515e9355de0c8f02e473564cebe96 100644 --- a/interface/web/mail/lib/lang/fr_mail_forward.lng +++ b/interface/web/mail/lib/lang/fr_mail_forward.lng @@ -1,8 +1,8 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_mail_forward_list.lng b/interface/web/mail/lib/lang/fr_mail_forward_list.lng index 60837201302b4d2ef04e64e7a2343c9a689eb683..c5373a89303769018aaa08c722d8641288a95e3a 100644 --- a/interface/web/mail/lib/lang/fr_mail_forward_list.lng +++ b/interface/web/mail/lib/lang/fr_mail_forward_list.lng @@ -1,9 +1,9 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_mail_get.lng b/interface/web/mail/lib/lang/fr_mail_get.lng index 8d69849fbd7cca3725c0c8485f1843a51dc2e7b9..33be0e99d2c405db71e561ce1b5b8a41d499c97a 100644 --- a/interface/web/mail/lib/lang/fr_mail_get.lng +++ b/interface/web/mail/lib/lang/fr_mail_get.lng @@ -1,17 +1,17 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_mail_get_list.lng b/interface/web/mail/lib/lang/fr_mail_get_list.lng index 590fc9c5c3476ede1f8ad41d76c2b4acc930189f..4f3be03bf5a8291d082ff1721f7bac5fecf0b3b8 100644 --- a/interface/web/mail/lib/lang/fr_mail_get_list.lng +++ b/interface/web/mail/lib/lang/fr_mail_get_list.lng @@ -1,10 +1,10 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_mail_relay_recipient.lng b/interface/web/mail/lib/lang/fr_mail_relay_recipient.lng index f714d76e69c1c6c468b5924910d33eb7bb21b903..9f01efbbbdb7a051d81e00215fe1a241a5379937 100644 --- a/interface/web/mail/lib/lang/fr_mail_relay_recipient.lng +++ b/interface/web/mail/lib/lang/fr_mail_relay_recipient.lng @@ -1,10 +1,10 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_mail_relay_recipient_list.lng b/interface/web/mail/lib/lang/fr_mail_relay_recipient_list.lng index 834d047ca1897f22188261d61faf45ac4830dfe1..96ee42dcb09f7d44d551d05db430a10c28841964 100644 --- a/interface/web/mail/lib/lang/fr_mail_relay_recipient_list.lng +++ b/interface/web/mail/lib/lang/fr_mail_relay_recipient_list.lng @@ -1,10 +1,10 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_mail_spamfilter.lng b/interface/web/mail/lib/lang/fr_mail_spamfilter.lng index 958435ffc60784f10c5e2e2deae3931e9bbf1f47..dc1c23716bf279c51d0e5805b017323824cd6c1a 100644 --- a/interface/web/mail/lib/lang/fr_mail_spamfilter.lng +++ b/interface/web/mail/lib/lang/fr_mail_spamfilter.lng @@ -1,18 +1,18 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_mail_spamfilter_list.lng b/interface/web/mail/lib/lang/fr_mail_spamfilter_list.lng index 33edceb88e61097af637621618402b05a10509db..217860b9804ef2892f9dd8857722f092db0e138d 100644 --- a/interface/web/mail/lib/lang/fr_mail_spamfilter_list.lng +++ b/interface/web/mail/lib/lang/fr_mail_spamfilter_list.lng @@ -1,9 +1,9 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_mail_transport.lng b/interface/web/mail/lib/lang/fr_mail_transport.lng index 2e8d588756efc52c87b3f6c6561aeeee9b395072..bfa35e6547c988c71c8877560227bf93a4044804 100644 --- a/interface/web/mail/lib/lang/fr_mail_transport.lng +++ b/interface/web/mail/lib/lang/fr_mail_transport.lng @@ -1,11 +1,11 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_mail_transport_list.lng b/interface/web/mail/lib/lang/fr_mail_transport_list.lng index 05eede3a1bb0a47b2746bceedd2beaad864a052d..5814d0b90f0dcf27eddf047b7649423c5bd9d954 100644 --- a/interface/web/mail/lib/lang/fr_mail_transport_list.lng +++ b/interface/web/mail/lib/lang/fr_mail_transport_list.lng @@ -1,10 +1,10 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_mail_user.lng b/interface/web/mail/lib/lang/fr_mail_user.lng index bb8831a80627df7a5b58c66cbcf3d3b30e390253..b2d3764274d07d5326f6e1974e3b10eb2862e757 100644 --- a/interface/web/mail/lib/lang/fr_mail_user.lng +++ b/interface/web/mail/lib/lang/fr_mail_user.lng @@ -1,43 +1,43 @@ - 1'; -$wb['move_junk_txt'] = 'Déplacer le spam vers le dossier pourris'; -$wb['name_txt'] = 'Nom véritable'; -$wb['name_optional_txt'] = '(Optionnel)'; -$wb['autoresponder_active'] = 'Activer l\'autorépondeur'; -$wb['cc_txt'] = 'Envoyer une copie à'; -$wb['cc_error_isemail'] = 'Le champ Envoyer une copie ne contient pas une adresse email valide'; -?> - + 1'; +$wb['move_junk_txt'] = 'Déplacer le spam vers le dossier pourris'; +$wb['name_txt'] = 'Nom véritable'; +$wb['name_optional_txt'] = '(Optionnel)'; +$wb['autoresponder_active'] = 'Activer l\'autorépondeur'; +$wb['cc_txt'] = 'Envoyer une copie à'; +$wb['cc_error_isemail'] = 'Le champ Envoyer une copie ne contient pas une adresse email valide'; +?> + diff --git a/interface/web/mail/lib/lang/fr_mail_user_filter.lng b/interface/web/mail/lib/lang/fr_mail_user_filter.lng index 4e4bb57cf44ecca079c93d13fa6e9d32c81a5b1a..0f512903c34090cd529129ffef6e72758540b6da 100644 --- a/interface/web/mail/lib/lang/fr_mail_user_filter.lng +++ b/interface/web/mail/lib/lang/fr_mail_user_filter.lng @@ -1,12 +1,12 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_mail_user_filter_list.lng b/interface/web/mail/lib/lang/fr_mail_user_filter_list.lng index dbe3ea93bfd9cc648818040229a2f3843639b7c2..237a2b80638e593a1c1c2e8340201d2b1c6d46d3 100644 --- a/interface/web/mail/lib/lang/fr_mail_user_filter_list.lng +++ b/interface/web/mail/lib/lang/fr_mail_user_filter_list.lng @@ -1,8 +1,8 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_mail_user_list.lng b/interface/web/mail/lib/lang/fr_mail_user_list.lng index 01241d3d0ea9114740ae1aebc5fad81804ea6994..58039d5ccc67c195ff3e84e7019130318664fd13 100644 --- a/interface/web/mail/lib/lang/fr_mail_user_list.lng +++ b/interface/web/mail/lib/lang/fr_mail_user_list.lng @@ -1,8 +1,8 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_mail_user_stats_list.lng b/interface/web/mail/lib/lang/fr_mail_user_stats_list.lng index 9a1f844ea03020dfa08b78fa4bba0290dc933bf4..195c6b81f8192ca956a49729128744f2450efe9a 100644 --- a/interface/web/mail/lib/lang/fr_mail_user_stats_list.lng +++ b/interface/web/mail/lib/lang/fr_mail_user_stats_list.lng @@ -1,9 +1,9 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_mail_whitelist.lng b/interface/web/mail/lib/lang/fr_mail_whitelist.lng index 00bab6f94a6cc52983cb7e31d05db44068b1df63..c3dbc6768f42dcc25bb9021cbfa74fb81419a3e5 100644 --- a/interface/web/mail/lib/lang/fr_mail_whitelist.lng +++ b/interface/web/mail/lib/lang/fr_mail_whitelist.lng @@ -1,10 +1,10 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_mail_whitelist_list.lng b/interface/web/mail/lib/lang/fr_mail_whitelist_list.lng index 20e49cf05ddb77d7a248ec22a864a66a406d6dd6..2be47e55641c64bf16f5b58dd878f08395be71d4 100644 --- a/interface/web/mail/lib/lang/fr_mail_whitelist_list.lng +++ b/interface/web/mail/lib/lang/fr_mail_whitelist_list.lng @@ -1,11 +1,11 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_spamfilter_blacklist.lng b/interface/web/mail/lib/lang/fr_spamfilter_blacklist.lng index 279db539aec2d62ce20228331b0a61ae03023a25..86f91d687676d0129431d557285e9ccce09d679b 100644 --- a/interface/web/mail/lib/lang/fr_spamfilter_blacklist.lng +++ b/interface/web/mail/lib/lang/fr_spamfilter_blacklist.lng @@ -1,10 +1,10 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_spamfilter_blacklist_list.lng b/interface/web/mail/lib/lang/fr_spamfilter_blacklist_list.lng index 14d086eaad12b9df65d7754a72b0b661a5244a2a..c915c814e024441d7cdeae5ebf468a429d4fbe2a 100644 --- a/interface/web/mail/lib/lang/fr_spamfilter_blacklist_list.lng +++ b/interface/web/mail/lib/lang/fr_spamfilter_blacklist_list.lng @@ -1,10 +1,10 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_spamfilter_config.lng b/interface/web/mail/lib/lang/fr_spamfilter_config.lng index bfdca70600b36d24c0dade85a6f3879ca140ee86..6cd09cde3deb8fc58f30a649fc0ea41402ad6b15 100644 --- a/interface/web/mail/lib/lang/fr_spamfilter_config.lng +++ b/interface/web/mail/lib/lang/fr_spamfilter_config.lng @@ -1,21 +1,21 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_spamfilter_config_list.lng b/interface/web/mail/lib/lang/fr_spamfilter_config_list.lng index 812ba85a45377c09044207df2db744d6b4afd133..03f09d139685dfb649d26314c1258d64112f4374 100644 --- a/interface/web/mail/lib/lang/fr_spamfilter_config_list.lng +++ b/interface/web/mail/lib/lang/fr_spamfilter_config_list.lng @@ -1,6 +1,6 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_spamfilter_policy.lng b/interface/web/mail/lib/lang/fr_spamfilter_policy.lng index bc0d939eca1b6d7d1dba1a6bf58b3bfdee4547b6..43224606091a3535e05c149a5e3f624b05f8bc01 100644 --- a/interface/web/mail/lib/lang/fr_spamfilter_policy.lng +++ b/interface/web/mail/lib/lang/fr_spamfilter_policy.lng @@ -1,39 +1,39 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_spamfilter_policy_list.lng b/interface/web/mail/lib/lang/fr_spamfilter_policy_list.lng index 27a1a20e2dc3653855753f5c0548228a125ae503..2269111b3047a812b0b098b78cd1022be7011bb7 100644 --- a/interface/web/mail/lib/lang/fr_spamfilter_policy_list.lng +++ b/interface/web/mail/lib/lang/fr_spamfilter_policy_list.lng @@ -1,10 +1,10 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_spamfilter_users.lng b/interface/web/mail/lib/lang/fr_spamfilter_users.lng index 93e92156bacf29af317ee79006d087fed5108fdb..9f29ef066434f7a900d61dd78c1232c097683291 100644 --- a/interface/web/mail/lib/lang/fr_spamfilter_users.lng +++ b/interface/web/mail/lib/lang/fr_spamfilter_users.lng @@ -1,9 +1,9 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_spamfilter_users_list.lng b/interface/web/mail/lib/lang/fr_spamfilter_users_list.lng index 82509ec75c6561bb0447b1708124070de7a394f8..81dc8d827e2bf674edbd0e2966bc12c35b85e204 100644 --- a/interface/web/mail/lib/lang/fr_spamfilter_users_list.lng +++ b/interface/web/mail/lib/lang/fr_spamfilter_users_list.lng @@ -1,11 +1,11 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_spamfilter_whitelist.lng b/interface/web/mail/lib/lang/fr_spamfilter_whitelist.lng index f318d823f15a0b0eb6479c8762fd9e6fb417bd6b..67b7efc43947be0a0eb2068fe16c3bcd2313a1f9 100644 --- a/interface/web/mail/lib/lang/fr_spamfilter_whitelist.lng +++ b/interface/web/mail/lib/lang/fr_spamfilter_whitelist.lng @@ -1,10 +1,10 @@ - - + + diff --git a/interface/web/mail/lib/lang/fr_spamfilter_whitelist_list.lng b/interface/web/mail/lib/lang/fr_spamfilter_whitelist_list.lng index 20a18f0de104bdf466c38560d73484141ea64d45..ea298b842b07fbe0b0aa919346acfef6c199860d 100644 --- a/interface/web/mail/lib/lang/fr_spamfilter_whitelist_list.lng +++ b/interface/web/mail/lib/lang/fr_spamfilter_whitelist_list.lng @@ -1,10 +1,10 @@ - - + + diff --git a/interface/web/monitor/lib/lang/fr.lng b/interface/web/monitor/lib/lang/fr.lng index 4c9d8124765429450ee2930e881c05f698461358..4974aade4b88ec6c956e3e292c14214fdb18ab83 100644 --- a/interface/web/monitor/lib/lang/fr.lng +++ b/interface/web/monitor/lib/lang/fr.lng @@ -1,146 +1,146 @@ -Nous n\'avaons pas trouvé ces logiciels sur votre serveur.

Ceci implique que nous ne pouvons pas encore prendre en charge votre RAID.'; -$wb['monitor_serverstate_beancounterok_txt'] = 'Le compteur ok'; -$wb['monitor_serverstate_beancounterinfo_txt'] = 'Il y a quelques échecs dans le compteur'; -$wb['monitor_serverstate_beancounterwarning_txt'] = 'Il y a des échecs dans le compteur'; -$wb['monitor_serverstate_beancountercritical_txt'] = 'Il y a beaucoup d\'échecs dans le compteur'; -$wb['monitor_serverstate_beancountererror_txt'] = 'Il y a trop d\'échecs dans le compteur'; -$wb['monitor_title_fail2ban_txt'] = 'Log Fail2Ban'; -$wb['monitor_title_beancounter_txt'] = 'Compteur OpenVz VE'; -$wb['monitor_beancounter_nosupport_txt'] = 'Ce serveur n\'est pas un VE OpenVz et n\'a pas d\'information de compteur'; -?> - +Nous n\'avaons pas trouvé ces logiciels sur votre serveur.

Ceci implique que nous ne pouvons pas encore prendre en charge votre RAID.'; +$wb['monitor_serverstate_beancounterok_txt'] = 'Le compteur ok'; +$wb['monitor_serverstate_beancounterinfo_txt'] = 'Il y a quelques échecs dans le compteur'; +$wb['monitor_serverstate_beancounterwarning_txt'] = 'Il y a des échecs dans le compteur'; +$wb['monitor_serverstate_beancountercritical_txt'] = 'Il y a beaucoup d\'échecs dans le compteur'; +$wb['monitor_serverstate_beancountererror_txt'] = 'Il y a trop d\'échecs dans le compteur'; +$wb['monitor_title_fail2ban_txt'] = 'Log Fail2Ban'; +$wb['monitor_title_beancounter_txt'] = 'Compteur OpenVz VE'; +$wb['monitor_beancounter_nosupport_txt'] = 'Ce serveur n\'est pas un VE OpenVz et n\'a pas d\'information de compteur'; +?> + diff --git a/interface/web/monitor/lib/lang/fr_datalog_list.lng b/interface/web/monitor/lib/lang/fr_datalog_list.lng index e30a334bbb86479509f271891fadd6f7418fe945..111b6d12f0eed9b0ca1e9e678e29e4c622624f17 100644 --- a/interface/web/monitor/lib/lang/fr_datalog_list.lng +++ b/interface/web/monitor/lib/lang/fr_datalog_list.lng @@ -1,9 +1,9 @@ - - + + diff --git a/interface/web/monitor/lib/lang/fr_syslog_list.lng b/interface/web/monitor/lib/lang/fr_syslog_list.lng index 166e7cd959ee9aa3170cd0e07b55e510223ff943..9ca1f5939ac9e4d560706704906cb996e5577764 100644 --- a/interface/web/monitor/lib/lang/fr_syslog_list.lng +++ b/interface/web/monitor/lib/lang/fr_syslog_list.lng @@ -1,8 +1,8 @@ - - + + diff --git a/interface/web/remote/monitor.php b/interface/web/remote/monitor.php index c7a69f61ed62ecbf23b168a0512636c91ff95b4c..2f35105d4201e5e40597a691e87238f7de570403 100644 --- a/interface/web/remote/monitor.php +++ b/interface/web/remote/monitor.php @@ -1,126 +1,126 @@ -error('This function is disabled in demo mode.'); - -header('Content-Type: application/json; charset=utf-8'); -header('Access-Control-Allow-Origin: *'); -header('Access-Control-Allow-Headers: X-Requested-With'); -header('Cache-Control: no-cache, must-revalidate'); // HTTP/1.1 -header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past - -$type = addslashes($_GET['type']); -$token = addslashes($_GET['token']); -$server_id = intval($_GET['server']); - -$app->uses('getconf'); -$interface_config = $app->getconf->get_global_config('misc'); -$secret = $interface_config['monitor_key']; - -$out = array(); - -if($token == '' or $secret == '' or $token != $secret) { - $out['state'] = 'syserror'; - $out['data'] = 'Password empty or incorrect.'; - $out['time'] = date('Y-m-d H:i'); -} else { - if($type == 'serverlist') { - $sql = 'SELECT server_id, server_name FROM server WHERE 1 ORDER BY server_id'; - $records = $app->db->queryAllRecords($sql); - $out['state'] = 'ok'; - $out['data'] = $records; - $out['time'] = date('Y-m-d H:i',$rec['created']); - } else { - $rec = $app->db->queryOneRecord("SELECT * FROM monitor_data WHERE type = '$type' AND server_id = $server_id"); - if(is_array($rec)) { - $out['state'] = $rec['state']; - $out['data'] = unserialize(stripslashes($rec['data'])); - if(is_array($out['data']) && sizeof($out['data']) > 0){ - foreach($out['data'] as $key => $val){ - if(!$val) $out['data'][$key] = " "; - } - } - $out['time'] = date('Y-m-d H:i',$rec['created']); - } else { - $out['state'] = 'syserror'; - $out['data'] = 'No monitor record found.'; - $out['time'] = date('Y-m-d H:i'); - } - $sql = 'SELECT server_id, server_name FROM server WHERE 1 ORDER BY server_id'; - $records = $app->db->queryAllRecords($sql); - $out['serverlist'] = $records; - } -} -$out['type'] = $type; - -function __json_encode($data) { - if( is_array($data) || is_object($data) ) { - $islist = is_array($data) && ( empty($data) || array_keys($data) === range(0,count($data)-1) ); - - if( $islist ) { - $json = '[' . implode(',', array_map('__json_encode', $data) ) . ']'; - } else { - $items = Array(); - foreach( $data as $key => $value ) { - $items[] = __json_encode("$key") . ':' . __json_encode($value); - } - $json = '{' . implode(',', $items) . '}'; - } - } elseif( is_string($data) ) { - # Escape non-printable or Non-ASCII characters. - # I also put the \\ character first, as suggested in comments on the 'addcslashes' page. - $string = '"' . addcslashes($data, "\\\"\n\r\t/" . chr(8) . chr(12)) . '"'; - $json = ''; - $len = strlen($string); - # Convert UTF-8 to Hexadecimal Codepoints. - for( $i = 0; $i < $len; $i++ ) { - - $char = $string[$i]; - $c1 = ord($char); - - # Single byte; - if( $c1 <128 ) { - $json .= ($c1 > 31) ? $char : sprintf("\\u%04x", $c1); - continue; - } - - # Double byte - $c2 = ord($string[++$i]); - if ( ($c1 & 32) === 0 ) { - $json .= sprintf("\\u%04x", ($c1 - 192) * 64 + $c2 - 128); - continue; - } - - # Triple - $c3 = ord($string[++$i]); - if( ($c1 & 16) === 0 ) { - $json .= sprintf("\\u%04x", (($c1 - 224) <<12) + (($c2 - 128) << 6) + ($c3 - 128)); - continue; - } - - # Quadruple - $c4 = ord($string[++$i]); - if( ($c1 & 8 ) === 0 ) { - $u = (($c1 & 15) << 2) + (($c2>>4) & 3) - 1; - - $w1 = (54<<10) + ($u<<6) + (($c2 & 15) << 2) + (($c3>>4) & 3); - $w2 = (55<<10) + (($c3 & 15)<<6) + ($c4-128); - $json .= sprintf("\\u%04x\\u%04x", $w1, $w2); - } - } - } else { - # int, floats, bools, null - $json = strtolower(var_export( $data, true )); - } - return $json; -} - -if(function_exists('json_encode')) { // PHP >= 5.2 - echo json_encode($out); -} else { // PHP < 5.2 - echo __json_encode($out); -} -exit; +error('This function is disabled in demo mode.'); + +header('Content-Type: application/json; charset=utf-8'); +header('Access-Control-Allow-Origin: *'); +header('Access-Control-Allow-Headers: X-Requested-With'); +header('Cache-Control: no-cache, must-revalidate'); // HTTP/1.1 +header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past + +$type = addslashes($_GET['type']); +$token = addslashes($_GET['token']); +$server_id = intval($_GET['server']); + +$app->uses('getconf'); +$interface_config = $app->getconf->get_global_config('misc'); +$secret = $interface_config['monitor_key']; + +$out = array(); + +if($token == '' or $secret == '' or $token != $secret) { + $out['state'] = 'syserror'; + $out['data'] = 'Password empty or incorrect.'; + $out['time'] = date('Y-m-d H:i'); +} else { + if($type == 'serverlist') { + $sql = 'SELECT server_id, server_name FROM server WHERE 1 ORDER BY server_id'; + $records = $app->db->queryAllRecords($sql); + $out['state'] = 'ok'; + $out['data'] = $records; + $out['time'] = date('Y-m-d H:i',$rec['created']); + } else { + $rec = $app->db->queryOneRecord("SELECT * FROM monitor_data WHERE type = '$type' AND server_id = $server_id"); + if(is_array($rec)) { + $out['state'] = $rec['state']; + $out['data'] = unserialize(stripslashes($rec['data'])); + if(is_array($out['data']) && sizeof($out['data']) > 0){ + foreach($out['data'] as $key => $val){ + if(!$val) $out['data'][$key] = " "; + } + } + $out['time'] = date('Y-m-d H:i',$rec['created']); + } else { + $out['state'] = 'syserror'; + $out['data'] = 'No monitor record found.'; + $out['time'] = date('Y-m-d H:i'); + } + $sql = 'SELECT server_id, server_name FROM server WHERE 1 ORDER BY server_id'; + $records = $app->db->queryAllRecords($sql); + $out['serverlist'] = $records; + } +} +$out['type'] = $type; + +function __json_encode($data) { + if( is_array($data) || is_object($data) ) { + $islist = is_array($data) && ( empty($data) || array_keys($data) === range(0,count($data)-1) ); + + if( $islist ) { + $json = '[' . implode(',', array_map('__json_encode', $data) ) . ']'; + } else { + $items = Array(); + foreach( $data as $key => $value ) { + $items[] = __json_encode("$key") . ':' . __json_encode($value); + } + $json = '{' . implode(',', $items) . '}'; + } + } elseif( is_string($data) ) { + # Escape non-printable or Non-ASCII characters. + # I also put the \\ character first, as suggested in comments on the 'addcslashes' page. + $string = '"' . addcslashes($data, "\\\"\n\r\t/" . chr(8) . chr(12)) . '"'; + $json = ''; + $len = strlen($string); + # Convert UTF-8 to Hexadecimal Codepoints. + for( $i = 0; $i < $len; $i++ ) { + + $char = $string[$i]; + $c1 = ord($char); + + # Single byte; + if( $c1 <128 ) { + $json .= ($c1 > 31) ? $char : sprintf("\\u%04x", $c1); + continue; + } + + # Double byte + $c2 = ord($string[++$i]); + if ( ($c1 & 32) === 0 ) { + $json .= sprintf("\\u%04x", ($c1 - 192) * 64 + $c2 - 128); + continue; + } + + # Triple + $c3 = ord($string[++$i]); + if( ($c1 & 16) === 0 ) { + $json .= sprintf("\\u%04x", (($c1 - 224) <<12) + (($c2 - 128) << 6) + ($c3 - 128)); + continue; + } + + # Quadruple + $c4 = ord($string[++$i]); + if( ($c1 & 8 ) === 0 ) { + $u = (($c1 & 15) << 2) + (($c2>>4) & 3) - 1; + + $w1 = (54<<10) + ($u<<6) + (($c2 & 15) << 2) + (($c3>>4) & 3); + $w2 = (55<<10) + (($c3 & 15)<<6) + ($c4-128); + $json .= sprintf("\\u%04x\\u%04x", $w1, $w2); + } + } + } else { + # int, floats, bools, null + $json = strtolower(var_export( $data, true )); + } + return $json; +} + +if(function_exists('json_encode')) { // PHP >= 5.2 + echo json_encode($out); +} else { // PHP < 5.2 + echo __json_encode($out); +} +exit; ?> \ No newline at end of file diff --git a/interface/web/sites/lib/lang/fr.lng b/interface/web/sites/lib/lang/fr.lng index 6757337dc24efb006ac56f548eb2e10a3d92c6a5..082750a3fbdb87a7b38f98b89663fc26a8fef548 100644 --- a/interface/web/sites/lib/lang/fr.lng +++ b/interface/web/sites/lib/lang/fr.lng @@ -1,26 +1,26 @@ - - + + diff --git a/interface/web/sites/lib/lang/fr_cron.lng b/interface/web/sites/lib/lang/fr_cron.lng index 4c3ba5c21125a7e306c5e95fd179c2a855f92e56..d15b2dfadb811f99482a9e0a3db8e4b1030479fa 100644 --- a/interface/web/sites/lib/lang/fr_cron.lng +++ b/interface/web/sites/lib/lang/fr_cron.lng @@ -1,22 +1,22 @@ - - + + diff --git a/interface/web/sites/lib/lang/fr_cron_list.lng b/interface/web/sites/lib/lang/fr_cron_list.lng index ad652c62ddbd068a3620edad24f9a55e6e7d9d92..78faabf4d7e86cca8de6ea8aa8d7fc6572b938e5 100644 --- a/interface/web/sites/lib/lang/fr_cron_list.lng +++ b/interface/web/sites/lib/lang/fr_cron_list.lng @@ -1,13 +1,13 @@ - - + + diff --git a/interface/web/sites/lib/lang/fr_database.lng b/interface/web/sites/lib/lang/fr_database.lng index f29ea4a2031a41dfaf7d3a645b4af3aa2f343cad..3bcd0b144413d0ab10119c0835773362ed283d0a 100644 --- a/interface/web/sites/lib/lang/fr_database.lng +++ b/interface/web/sites/lib/lang/fr_database.lng @@ -1,26 +1,26 @@ - - + + diff --git a/interface/web/sites/lib/lang/fr_database_admin_list.lng b/interface/web/sites/lib/lang/fr_database_admin_list.lng index 28a6f9f8679f983dff1b44f276b93db4c0b3ed17..cca33739fa169ac4f49360589d052e16047ada85 100644 --- a/interface/web/sites/lib/lang/fr_database_admin_list.lng +++ b/interface/web/sites/lib/lang/fr_database_admin_list.lng @@ -1,11 +1,11 @@ - - + + diff --git a/interface/web/sites/lib/lang/fr_database_list.lng b/interface/web/sites/lib/lang/fr_database_list.lng index 2a875dd1ca3541905f52a624b30919542e9e1f75..6ceba6ec8bd890bd804f80d0988131dc6bfb296c 100644 --- a/interface/web/sites/lib/lang/fr_database_list.lng +++ b/interface/web/sites/lib/lang/fr_database_list.lng @@ -1,10 +1,10 @@ - - + + diff --git a/interface/web/sites/lib/lang/fr_ftp_user.lng b/interface/web/sites/lib/lang/fr_ftp_user.lng index 1921d8e690e43674e4e981a367324b0ac1a0a123..0ade08ea8b6906af9ae2d3a2c97f2a7713232d20 100644 --- a/interface/web/sites/lib/lang/fr_ftp_user.lng +++ b/interface/web/sites/lib/lang/fr_ftp_user.lng @@ -1,29 +1,29 @@ - 0'; -?> - + 0'; +?> + diff --git a/interface/web/sites/lib/lang/fr_ftp_user_list.lng b/interface/web/sites/lib/lang/fr_ftp_user_list.lng index 8cf91cfd27d5c3affaca3f5c6be4763adb1ba116..468201de000ab624762ae6ed5c0454b64ce2efdb 100644 --- a/interface/web/sites/lib/lang/fr_ftp_user_list.lng +++ b/interface/web/sites/lib/lang/fr_ftp_user_list.lng @@ -1,9 +1,9 @@ - - + + diff --git a/interface/web/sites/lib/lang/fr_shell_user.lng b/interface/web/sites/lib/lang/fr_shell_user.lng index 65efda42ebc62daf48a6db81569d13e39fadc152..753d1378bda89a64fb50357c9839a60970901dd5 100644 --- a/interface/web/sites/lib/lang/fr_shell_user.lng +++ b/interface/web/sites/lib/lang/fr_shell_user.lng @@ -1,23 +1,23 @@ - - + + diff --git a/interface/web/sites/lib/lang/fr_shell_user_list.lng b/interface/web/sites/lib/lang/fr_shell_user_list.lng index 888ec5f93685cb8961702716bb3715704b768151..a5cc29a40404ce0bdc0970306452b222ee1a882b 100644 --- a/interface/web/sites/lib/lang/fr_shell_user_list.lng +++ b/interface/web/sites/lib/lang/fr_shell_user_list.lng @@ -1,9 +1,9 @@ - - + + diff --git a/interface/web/sites/lib/lang/fr_user_quota_stats_list.lng b/interface/web/sites/lib/lang/fr_user_quota_stats_list.lng index d8f3a3214938a1caf3c086b1afb4e276ecc18ea0..106b3e9aff0e1c79144c15a0fa5364c3db095ba3 100644 --- a/interface/web/sites/lib/lang/fr_user_quota_stats_list.lng +++ b/interface/web/sites/lib/lang/fr_user_quota_stats_list.lng @@ -1,9 +1,9 @@ - - + + diff --git a/interface/web/sites/lib/lang/fr_web_aliasdomain_list.lng b/interface/web/sites/lib/lang/fr_web_aliasdomain_list.lng index a7bd62e89fedd49b37ecb3abcd98fe8c73e534fd..50d3bd28980eb6632d350e61e2e642398ed8b7aa 100644 --- a/interface/web/sites/lib/lang/fr_web_aliasdomain_list.lng +++ b/interface/web/sites/lib/lang/fr_web_aliasdomain_list.lng @@ -1,12 +1,12 @@ - - + + diff --git a/interface/web/sites/lib/lang/fr_web_domain.lng b/interface/web/sites/lib/lang/fr_web_domain.lng index 850c2f9220020a35d6df27db8316898a6e417fa8..152dbec504aa3e3171eb27690b6c515beaa26a4d 100644 --- a/interface/web/sites/lib/lang/fr_web_domain.lng +++ b/interface/web/sites/lib/lang/fr_web_domain.lng @@ -1,71 +1,71 @@ - 0'; -$wb['traffic_quota_error_regex'] = 'Quota de trafic: entrez -1 pour illimité ou un nombre > 0'; -?> - + 0'; +$wb['traffic_quota_error_regex'] = 'Quota de trafic: entrez -1 pour illimité ou un nombre > 0'; +?> + diff --git a/interface/web/sites/lib/lang/fr_web_domain_admin_list.lng b/interface/web/sites/lib/lang/fr_web_domain_admin_list.lng index 413c364964ea8996a29453f47331c66d5f6d63ba..bb8f1a1a0f01caaf2737f236165b5010f4978f19 100644 --- a/interface/web/sites/lib/lang/fr_web_domain_admin_list.lng +++ b/interface/web/sites/lib/lang/fr_web_domain_admin_list.lng @@ -1,10 +1,10 @@ - - + + diff --git a/interface/web/sites/lib/lang/fr_web_domain_list.lng b/interface/web/sites/lib/lang/fr_web_domain_list.lng index 306c6d1dc92573571bb1cf11e97db9d4d899c3e6..f59495cc53a9b1173f789acfb3082d7529f35ae8 100644 --- a/interface/web/sites/lib/lang/fr_web_domain_list.lng +++ b/interface/web/sites/lib/lang/fr_web_domain_list.lng @@ -1,9 +1,9 @@ - - + + diff --git a/interface/web/sites/lib/lang/fr_web_sites_stats_list.lng b/interface/web/sites/lib/lang/fr_web_sites_stats_list.lng index 39f98eef37d6ec5141ffd7872b42ba3dcf58c3e5..4c91b7d3358f0757f5a9b10526fbebeec3d16721 100644 --- a/interface/web/sites/lib/lang/fr_web_sites_stats_list.lng +++ b/interface/web/sites/lib/lang/fr_web_sites_stats_list.lng @@ -1,9 +1,9 @@ - - + + diff --git a/interface/web/sites/lib/lang/fr_web_subdomain.lng b/interface/web/sites/lib/lang/fr_web_subdomain.lng index 93e038c93d26c489bb222628b1da34a35c3a09b0..7264aec77417104ed1047ac9af0c2f7363898855 100644 --- a/interface/web/sites/lib/lang/fr_web_subdomain.lng +++ b/interface/web/sites/lib/lang/fr_web_subdomain.lng @@ -1,41 +1,41 @@ - - + + diff --git a/interface/web/sites/lib/lang/fr_web_subdomain_list.lng b/interface/web/sites/lib/lang/fr_web_subdomain_list.lng index c8230d4a9ee71c777124b51436d2bf8aceb96d20..592464c1566647ef6106d93e0f9a0d269f034625 100644 --- a/interface/web/sites/lib/lang/fr_web_subdomain_list.lng +++ b/interface/web/sites/lib/lang/fr_web_subdomain_list.lng @@ -1,9 +1,9 @@ - - + + diff --git a/interface/web/sites/lib/lang/fr_webdav_user.lng b/interface/web/sites/lib/lang/fr_webdav_user.lng index 0eb333227cc0b0852c012ad0a1514c166a65dc6d..01008281ce3849cd7bf2831c36a7c8a5e263b6f8 100644 --- a/interface/web/sites/lib/lang/fr_webdav_user.lng +++ b/interface/web/sites/lib/lang/fr_webdav_user.lng @@ -1,16 +1,16 @@ - - + + diff --git a/interface/web/sites/lib/lang/fr_webdav_user_list.lng b/interface/web/sites/lib/lang/fr_webdav_user_list.lng index 4ceedd7fc6ad347dc1222c68574f7c01fe8f4bf2..88bb7fa860959c039f5957b2083fb18ed02fd5c5 100644 --- a/interface/web/sites/lib/lang/fr_webdav_user_list.lng +++ b/interface/web/sites/lib/lang/fr_webdav_user_list.lng @@ -1,9 +1,9 @@ - - + + diff --git a/interface/web/strengthmeter/lib/lang/fr_strengthmeter.lng b/interface/web/strengthmeter/lib/lang/fr_strengthmeter.lng index f64de79ae1b2abddb93b7b52ad70781d5fc8e9f2..91804fc5cc2b69c1bdd08be56f4565074a7ceedb 100644 --- a/interface/web/strengthmeter/lib/lang/fr_strengthmeter.lng +++ b/interface/web/strengthmeter/lib/lang/fr_strengthmeter.lng @@ -1,9 +1,9 @@ - - + + diff --git a/interface/web/tools/lib/lang/fr.lng b/interface/web/tools/lib/lang/fr.lng index 56d46fd5e2adbf4cde580ea3ab59d7611aeb546e..aad8916292a305775f8aa2c9f993455be9272298 100644 --- a/interface/web/tools/lib/lang/fr.lng +++ b/interface/web/tools/lib/lang/fr.lng @@ -1,7 +1,7 @@ - - + + diff --git a/interface/web/tools/lib/lang/fr_usersettings.lng b/interface/web/tools/lib/lang/fr_usersettings.lng index a84cdc7e30a9314b24c2a7ea1c737c5e1b52ecf5..b37da7c9e891dbe22cf799af5f6e141d658e8970 100644 --- a/interface/web/tools/lib/lang/fr_usersettings.lng +++ b/interface/web/tools/lib/lang/fr_usersettings.lng @@ -1,9 +1,9 @@ - - + + diff --git a/server/conf/nginx_rewrites.conf.master b/server/conf/nginx_rewrites.conf.master index b5d2ad55ab70f2964fc50fe9f9097a3f9593448c..c9080a7e30aaadce04eefa7372e1bc7e79447de1 100644 --- a/server/conf/nginx_rewrites.conf.master +++ b/server/conf/nginx_rewrites.conf.master @@ -1,9 +1,9 @@ -server { - listen 80 default_server; - listen 443 default_server; - server_name _; - include /etc/nginx/proxy.conf; - - rewrite ^{tmpl_var name="rewrite_url_src"} {tmpl_var name="rewrite_url_dst"}; - -} +server { + listen 80 default_server; + listen 443 default_server; + server_name _; + include /etc/nginx/proxy.conf; + + rewrite ^{tmpl_var name="rewrite_url_src"} {tmpl_var name="rewrite_url_dst"}; + +} diff --git a/server/conf/nginx_vhost.conf.master b/server/conf/nginx_vhost.conf.master index 83ed251b579696c358be0661b48f320396a9cab1..40df895090e7c53cfc80b7c2ac195aa3571bafdf 100644 --- a/server/conf/nginx_vhost.conf.master +++ b/server/conf/nginx_vhost.conf.master @@ -1,69 +1,69 @@ -server { - listen 80; - server_name ; - - access_log /var/log/ispconfig/nginx//access.log; - error_log /var/log/ispconfig/nginx//error.log; - - include /etc/nginx/proxy.conf; - - location / { - proxy_pass http://:80; - } - - location ~* \.(jpg|png|gif|jpeg|css|js|mp3|wav|swf|mov|doc|pdf|xls|ppt|docx|pptx|xlsx)$ { - # Cache static-looking files for 120 minutes, setting a 10 day expiry time in the HTTP header, - # whether logged in or not (may be too heavy-handed). - proxy_cache_valid 200 120m; - expires 864000; - proxy_pass http://:80; - } - - - - - - - -} - - - -########################################################### -# SSL Vhost -########################################################### -server { - listen 443; - server_name ; - - access_log /var/log/ispconfig/nginx//access.log - error_log /var/log/ispconfig/nginx//error.log - - ### SSL cert files ### - ssl_certificate /ssl/.crt - ssl_certificate_key /ssl/.crt - - - ssl_client_certificate /ssl/.bundle - - - ### Add SSL specific settings here ### - keepalive_timeout 60; - - ### Limiting Ciphers ######################## - # Uncomment as per your setup - #ssl_ciphers HIGH:!ADH; - #ssl_perfer_server_ciphers on; - #ssl_protocols SSLv3; - ############################################## - - include /etc/nginx/proxy.conf; - - ### Most PHP, Python, Rails, Java App can use this header ### - proxy_set_header X-Forwarded-Proto https; - - location / { - proxy_pass https://:443; - } -} - +server { + listen 80; + server_name ; + + access_log /var/log/ispconfig/nginx//access.log; + error_log /var/log/ispconfig/nginx//error.log; + + include /etc/nginx/proxy.conf; + + location / { + proxy_pass http://:80; + } + + location ~* \.(jpg|png|gif|jpeg|css|js|mp3|wav|swf|mov|doc|pdf|xls|ppt|docx|pptx|xlsx)$ { + # Cache static-looking files for 120 minutes, setting a 10 day expiry time in the HTTP header, + # whether logged in or not (may be too heavy-handed). + proxy_cache_valid 200 120m; + expires 864000; + proxy_pass http://:80; + } + + + + + + + +} + + + +########################################################### +# SSL Vhost +########################################################### +server { + listen 443; + server_name ; + + access_log /var/log/ispconfig/nginx//access.log + error_log /var/log/ispconfig/nginx//error.log + + ### SSL cert files ### + ssl_certificate /ssl/.crt + ssl_certificate_key /ssl/.crt + + + ssl_client_certificate /ssl/.bundle + + + ### Add SSL specific settings here ### + keepalive_timeout 60; + + ### Limiting Ciphers ######################## + # Uncomment as per your setup + #ssl_ciphers HIGH:!ADH; + #ssl_perfer_server_ciphers on; + #ssl_protocols SSLv3; + ############################################## + + include /etc/nginx/proxy.conf; + + ### Most PHP, Python, Rails, Java App can use this header ### + proxy_set_header X-Forwarded-Proto https; + + location / { + proxy_pass https://:443; + } +} + diff --git a/server/conf/squidRewriteRules.py.master b/server/conf/squidRewriteRules.py.master index 6005bb3b23049905ccaf9ab4e920bf55e4c5f680..a8a241b9b4215a13076fb0db1bad5ae76280877e 100644 --- a/server/conf/squidRewriteRules.py.master +++ b/server/conf/squidRewriteRules.py.master @@ -1,196 +1,196 @@ -""" -/********************************************************************** -FILE : $RCSfile: squidRewriteRules.py,v $ -PURPOSE : Rule set for icoya redirector -NOTES : -AUTHOR : Simon Eisenmann -COPYRIGHT: (c) 2003,2004 by struktur AG -DATE : 28JAN2003 -REVISION : $Revision: 1.12 $ -VERSION : $Id: squidRewriteRules.py,v 1.12 2004/08/06 08:16:19 longsleep Exp $ (Author: $Author: longsleep $) - -struktur AG Phone: +49 711 8966560 -Junghansstr. 5 Fax: +49 711 89665610 -70469 Stuttgart email: info@struktur.de -GERMANY - -http://www.struktur.de -http://www.strukturag.com - -**********************************************************************/ - - Reloadable module allows arbitrary url transformations. - - - Automatic reload of the rules - +++++++++++++++++++++++++++++++++++ - - NOTE: use the reload after parameter to auto reload this module - after x requests. Use -1 to disable auto reload - - - Logging - +++++++++++++++++++++++++++++++++++ - - NOTE: set debug to 1 to enable logging - define the logfile in the logfile variable (enter full path) - - -""" -import re, sys - -try: - import py -except ImportError: - pass - -""" -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -begin of configuration -""" - -# log mode (set to 1 to enable logging) -debug = 0 - -# logfile for debugging (only required when debug == 1) -logfile = "/etc/squid/redirector_class.log" - -# set this to -1 to get best performance (no reload) -reload_after = -1 - -# define sitemap matching regex mapping - -# MODIFY THIS REWRITE RULE AS NEEDED FOR YOUR SITE - -rewrites = ( - -### HTTP SSL/encrypted webmail rewrite ### You can use this as an example for your ssl virtualhosted website - - - (r'{tmpl_var name="rewrite_url_src"}', r'{tmpl_var name="rewrite_url_dest"}\1', 'P,L'), - - - - - - -) - - - -""" -end of configuration -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -""" - -compiled_rewrites = None - -def log(s): - """ Logging facility. - """ - try: - f = open(logfile, "a") - except IOError: - print >> sys.stderr, s - return - f.write('%s\n' % s) - f.flush() - f.close() - -def init(): - global compiled_rewrites - - compiled_rewrites = [] - for rewrite in rewrites: - regexp = re.compile(rewrite[0]) - template = rewrite[1] - flags = {} - for flag in rewrite[2].split(','): - parts = flag.split('=') - flag = parts[0] - option = None - if flag == 'R': - if len(parts) > 1: - option = "%s:" % parts[1] - else: - option = '302:' - flags[flag] = option - compiled = (regexp, template, flags) - if debug: - log('compiled: %s' % str((regexp.pattern, template, flags))) - compiled_rewrites.append(compiled) - compiled_rewrites = tuple(compiled_rewrites) - -def rewrite(url, src_address=''): - """ just rewrites urls. - """ - - if debug: - log("args: %s" % str((url, src_address))) - - newurl = None - for regexp, template, flags in compiled_rewrites: - m = regexp.match(url) - if m is not None and template != '-': - if debug: - log("match.groups ('%s'): %s" % (regexp.pattern, str(m.groups()))) - url = newurl = "%s%s" % (flags.get('R', ''), m.expand(template)) - if debug: - log('newurl: %s' % newurl) - if 'L' in flags: - break - - if newurl is not None: - if debug: - log('finalurl: %s' % newurl) - return newurl - - # redirect to something we can match by a squid acl - # this special non existing domain should be denied - # by squid with a http_reply_access line - return "http://denypool/denyme" - -def test_foobar_redirection(): - assert rewrite('http://foobar.com/foo/bar') == '302:http://www.foobar.com/foo/bar' - assert rewrite('http://foobar.de/foo/bar') == '302:http://www.foobar.com/foo/bar' - assert rewrite('http://www.foobar.de/foo/bar') == '302:http://www.foobar.com/foo/bar' - assert rewrite('http://foobar-portal.de/foo/bar') == '302:http://www.foobar.com/foo/bar' - assert rewrite('http://www.foobar-portal.de/foo/bar') == '302:http://www.foobar.com/foo/bar' - assert rewrite('http://foobar-portal-europe.de/foo/bar') == '302:http://www.foobar.com/foo/bar' - assert rewrite('http://www.foobar-portal-europe.de/foo/bar') == '302:http://www.foobar.com/foo/bar' - # shouldn't redirect, just rewrite - assert not rewrite('http://www.foobar.com/foo/bar').startswith('302:') - -def test_foobarbacon_redirection(): - assert rewrite('http://foobar-bacon.com/foo/bar') == '302:http://www.foobar-bacon.com/foo/bar' - assert rewrite('http://foobar-bacon.de/foo/bar') == '302:http://www.foobar-bacon.com/foo/bar' - assert rewrite('http://www.foobar-bacon.de/foo/bar') == '302:http://www.foobar-bacon.com/foo/bar' - assert rewrite('http://foobar-bacon-europe.de/foo/bar') == '302:http://www.foobar-bacon.com/foo/bar' - assert rewrite('http://www.foobar-bacon-europe.de/foo/bar') == '302:http://www.foobar-bacon.com/foo/bar' - assert rewrite('http://foobar-bacon-europe.com/foo/bar') == '302:http://www.foobar-bacon.com/foo/bar' - assert rewrite('http://www.foobar-bacon-europe.com/foo/bar') == '302:http://www.foobar-bacon.com/foo/bar' - assert rewrite('http://foobar-bacon.net/foo/bar') == '302:http://www.foobar-bacon.com/foo/bar' - assert rewrite('http://www.foobar-bacon.net/foo/bar') == '302:http://www.foobar-bacon.com/foo/bar' - # shouldn't redirect, just rewrite - assert not rewrite('http://www.foobar-bacon.com/foo/bar').startswith('302:') - -def test_virtual_hosting(): - assert rewrite('http://www.foobar.com/foo/bar') == 'http://backendpool/VirtualHostBase/http/www.foobar.com/foobarportal/VirtualHostRoot/foo/bar' - assert rewrite('http://www.foobar.com:8088/foo/bar') == 'http://backendpool/VirtualHostBase/http/www.foobar.com:8088/foobarportal/VirtualHostRoot/foo/bar' - assert rewrite('http://www.foobar-bacon.com/foo/bar') == 'http://backendpool/VirtualHostBase/http/www.foobar-bacon.com/foobarbacon/VirtualHostRoot/foo/bar' - assert rewrite('http://www.foobar-bacon.com:8088/foo/bar') == 'http://backendpool/VirtualHostBase/http/www.foobar-bacon.com:8088/foobarbacon/VirtualHostRoot/foo/bar' - -def test_zmi(): - assert rewrite('http://www.foobar.com/--zmi--/foo/bar') == 'http://backendpool/VirtualHostBase/http/www.foobar.com/VirtualHostRoot/_vh_--zmi--/foo/bar' - assert rewrite('http://www.foobar.com:8088/--zmi--/foo/bar') == 'http://backendpool/VirtualHostBase/http/www.foobar.com:8088/VirtualHostRoot/_vh_--zmi--/foo/bar' - -def test_repos(): - assert rewrite('http://www.foobar.com/--repos--/foo/bar') == 'http://localhost/--repos--/foo/bar' - assert rewrite('http://www.foobar.com:8088/--repos--/foo/bar') == 'http://localhost/--repos--/foo/bar' - -if debug: - log("reloading user redirector module") -init() -if debug: - log("reloaded user redirector module") - +""" +/********************************************************************** +FILE : $RCSfile: squidRewriteRules.py,v $ +PURPOSE : Rule set for icoya redirector +NOTES : +AUTHOR : Simon Eisenmann +COPYRIGHT: (c) 2003,2004 by struktur AG +DATE : 28JAN2003 +REVISION : $Revision: 1.12 $ +VERSION : $Id: squidRewriteRules.py,v 1.12 2004/08/06 08:16:19 longsleep Exp $ (Author: $Author: longsleep $) + +struktur AG Phone: +49 711 8966560 +Junghansstr. 5 Fax: +49 711 89665610 +70469 Stuttgart email: info@struktur.de +GERMANY + +http://www.struktur.de +http://www.strukturag.com + +**********************************************************************/ + + Reloadable module allows arbitrary url transformations. + + + Automatic reload of the rules + +++++++++++++++++++++++++++++++++++ + + NOTE: use the reload after parameter to auto reload this module + after x requests. Use -1 to disable auto reload + + + Logging + +++++++++++++++++++++++++++++++++++ + + NOTE: set debug to 1 to enable logging + define the logfile in the logfile variable (enter full path) + + +""" +import re, sys + +try: + import py +except ImportError: + pass + +""" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +begin of configuration +""" + +# log mode (set to 1 to enable logging) +debug = 0 + +# logfile for debugging (only required when debug == 1) +logfile = "/etc/squid/redirector_class.log" + +# set this to -1 to get best performance (no reload) +reload_after = -1 + +# define sitemap matching regex mapping + +# MODIFY THIS REWRITE RULE AS NEEDED FOR YOUR SITE + +rewrites = ( + +### HTTP SSL/encrypted webmail rewrite ### You can use this as an example for your ssl virtualhosted website + + + (r'{tmpl_var name="rewrite_url_src"}', r'{tmpl_var name="rewrite_url_dest"}\1', 'P,L'), + + + + + + +) + + + +""" +end of configuration ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +""" + +compiled_rewrites = None + +def log(s): + """ Logging facility. + """ + try: + f = open(logfile, "a") + except IOError: + print >> sys.stderr, s + return + f.write('%s\n' % s) + f.flush() + f.close() + +def init(): + global compiled_rewrites + + compiled_rewrites = [] + for rewrite in rewrites: + regexp = re.compile(rewrite[0]) + template = rewrite[1] + flags = {} + for flag in rewrite[2].split(','): + parts = flag.split('=') + flag = parts[0] + option = None + if flag == 'R': + if len(parts) > 1: + option = "%s:" % parts[1] + else: + option = '302:' + flags[flag] = option + compiled = (regexp, template, flags) + if debug: + log('compiled: %s' % str((regexp.pattern, template, flags))) + compiled_rewrites.append(compiled) + compiled_rewrites = tuple(compiled_rewrites) + +def rewrite(url, src_address=''): + """ just rewrites urls. + """ + + if debug: + log("args: %s" % str((url, src_address))) + + newurl = None + for regexp, template, flags in compiled_rewrites: + m = regexp.match(url) + if m is not None and template != '-': + if debug: + log("match.groups ('%s'): %s" % (regexp.pattern, str(m.groups()))) + url = newurl = "%s%s" % (flags.get('R', ''), m.expand(template)) + if debug: + log('newurl: %s' % newurl) + if 'L' in flags: + break + + if newurl is not None: + if debug: + log('finalurl: %s' % newurl) + return newurl + + # redirect to something we can match by a squid acl + # this special non existing domain should be denied + # by squid with a http_reply_access line + return "http://denypool/denyme" + +def test_foobar_redirection(): + assert rewrite('http://foobar.com/foo/bar') == '302:http://www.foobar.com/foo/bar' + assert rewrite('http://foobar.de/foo/bar') == '302:http://www.foobar.com/foo/bar' + assert rewrite('http://www.foobar.de/foo/bar') == '302:http://www.foobar.com/foo/bar' + assert rewrite('http://foobar-portal.de/foo/bar') == '302:http://www.foobar.com/foo/bar' + assert rewrite('http://www.foobar-portal.de/foo/bar') == '302:http://www.foobar.com/foo/bar' + assert rewrite('http://foobar-portal-europe.de/foo/bar') == '302:http://www.foobar.com/foo/bar' + assert rewrite('http://www.foobar-portal-europe.de/foo/bar') == '302:http://www.foobar.com/foo/bar' + # shouldn't redirect, just rewrite + assert not rewrite('http://www.foobar.com/foo/bar').startswith('302:') + +def test_foobarbacon_redirection(): + assert rewrite('http://foobar-bacon.com/foo/bar') == '302:http://www.foobar-bacon.com/foo/bar' + assert rewrite('http://foobar-bacon.de/foo/bar') == '302:http://www.foobar-bacon.com/foo/bar' + assert rewrite('http://www.foobar-bacon.de/foo/bar') == '302:http://www.foobar-bacon.com/foo/bar' + assert rewrite('http://foobar-bacon-europe.de/foo/bar') == '302:http://www.foobar-bacon.com/foo/bar' + assert rewrite('http://www.foobar-bacon-europe.de/foo/bar') == '302:http://www.foobar-bacon.com/foo/bar' + assert rewrite('http://foobar-bacon-europe.com/foo/bar') == '302:http://www.foobar-bacon.com/foo/bar' + assert rewrite('http://www.foobar-bacon-europe.com/foo/bar') == '302:http://www.foobar-bacon.com/foo/bar' + assert rewrite('http://foobar-bacon.net/foo/bar') == '302:http://www.foobar-bacon.com/foo/bar' + assert rewrite('http://www.foobar-bacon.net/foo/bar') == '302:http://www.foobar-bacon.com/foo/bar' + # shouldn't redirect, just rewrite + assert not rewrite('http://www.foobar-bacon.com/foo/bar').startswith('302:') + +def test_virtual_hosting(): + assert rewrite('http://www.foobar.com/foo/bar') == 'http://backendpool/VirtualHostBase/http/www.foobar.com/foobarportal/VirtualHostRoot/foo/bar' + assert rewrite('http://www.foobar.com:8088/foo/bar') == 'http://backendpool/VirtualHostBase/http/www.foobar.com:8088/foobarportal/VirtualHostRoot/foo/bar' + assert rewrite('http://www.foobar-bacon.com/foo/bar') == 'http://backendpool/VirtualHostBase/http/www.foobar-bacon.com/foobarbacon/VirtualHostRoot/foo/bar' + assert rewrite('http://www.foobar-bacon.com:8088/foo/bar') == 'http://backendpool/VirtualHostBase/http/www.foobar-bacon.com:8088/foobarbacon/VirtualHostRoot/foo/bar' + +def test_zmi(): + assert rewrite('http://www.foobar.com/--zmi--/foo/bar') == 'http://backendpool/VirtualHostBase/http/www.foobar.com/VirtualHostRoot/_vh_--zmi--/foo/bar' + assert rewrite('http://www.foobar.com:8088/--zmi--/foo/bar') == 'http://backendpool/VirtualHostBase/http/www.foobar.com:8088/VirtualHostRoot/_vh_--zmi--/foo/bar' + +def test_repos(): + assert rewrite('http://www.foobar.com/--repos--/foo/bar') == 'http://localhost/--repos--/foo/bar' + assert rewrite('http://www.foobar.com:8088/--repos--/foo/bar') == 'http://localhost/--repos--/foo/bar' + +if debug: + log("reloading user redirector module") +init() +if debug: + log("reloaded user redirector module") + diff --git a/server/conf/ufw.before.rules.master b/server/conf/ufw.before.rules.master index ab451718edec929f0837d8250902a4d4e9fcb988..613e5250d8fc2d8a1f42a1c271465366bde25abd 100644 --- a/server/conf/ufw.before.rules.master +++ b/server/conf/ufw.before.rules.master @@ -1,78 +1,78 @@ -# -# rules.before -# -# Rules that should be run before the ufw command line added rules. Custom -# rules should be added to one of these chains: -# ufw-before-input -# ufw-before-output -# ufw-before-forward -# - -# Don't delete these required lines, otherwise there will be errors -*filter -:ufw-before-input - [0:0] -:ufw-before-output - [0:0] -:ufw-before-forward - [0:0] -:ufw-not-local - [0:0] -# End required lines - - -# allow all on loopback --A ufw-before-input -i lo -j ACCEPT --A ufw-before-output -o lo -j ACCEPT - -# connection tracking rules --A ufw-before-input -m state --state RELATED,ESTABLISHED -j ACCEPT - -# drop INVALID packets (logs these in loglevel medium and higher) --A ufw-before-input -m state --state INVALID -j ufw-logging-deny --A ufw-before-input -m state --state INVALID -j DROP - -# connection tracking for outbound --A ufw-before-output -p tcp -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT --A ufw-before-output -p udp -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT - -# ok icmp codes --A ufw-before-input -p icmp --icmp-type destination-unreachable -j ACCEPT --A ufw-before-input -p icmp --icmp-type source-quench -j ACCEPT --A ufw-before-input -p icmp --icmp-type time-exceeded -j ACCEPT --A ufw-before-input -p icmp --icmp-type parameter-problem -j ACCEPT --A ufw-before-input -p icmp --icmp-type echo-request -j ACCEPT - -# allow dhcp client to work --A ufw-before-input -p udp --sport 67 --dport 68 -j ACCEPT - -# -# ufw-not-local -# --A ufw-before-input -j ufw-not-local - -# if LOCAL, RETURN --A ufw-not-local -m addrtype --dst-type LOCAL -j RETURN - -# if MULTICAST, RETURN --A ufw-not-local -m addrtype --dst-type MULTICAST -j RETURN - -# if BROADCAST, RETURN --A ufw-not-local -m addrtype --dst-type BROADCAST -j RETURN - -# all other non-local packets are dropped --A ufw-not-local -m limit --limit 3/min --limit-burst 10 -j ufw-logging-deny --A ufw-not-local -j DROP - -# allow MULTICAST, be sure the MULTICAST line above is uncommented --A ufw-before-input -s 224.0.0.0/4 -j ACCEPT --A ufw-before-input -d 224.0.0.0/4 -j ACCEPT - -COMMIT - -# nat Table rules -*nat -:POSTROUTING ACCEPT [0:0] - --A POSTROUTING -s 192.168.5.2/24 -o eth0 -j SNAT --to 192.168.5.105 - --A PREROUTING -p tcp -d 192.168.5.105 --dport 80 -i eth0 -j DNAT --to-destination 192.168.5.200:80 - -# don't delete the 'COMMIT' line or these rules won't be processed -COMMIT +# +# rules.before +# +# Rules that should be run before the ufw command line added rules. Custom +# rules should be added to one of these chains: +# ufw-before-input +# ufw-before-output +# ufw-before-forward +# + +# Don't delete these required lines, otherwise there will be errors +*filter +:ufw-before-input - [0:0] +:ufw-before-output - [0:0] +:ufw-before-forward - [0:0] +:ufw-not-local - [0:0] +# End required lines + + +# allow all on loopback +-A ufw-before-input -i lo -j ACCEPT +-A ufw-before-output -o lo -j ACCEPT + +# connection tracking rules +-A ufw-before-input -m state --state RELATED,ESTABLISHED -j ACCEPT + +# drop INVALID packets (logs these in loglevel medium and higher) +-A ufw-before-input -m state --state INVALID -j ufw-logging-deny +-A ufw-before-input -m state --state INVALID -j DROP + +# connection tracking for outbound +-A ufw-before-output -p tcp -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT +-A ufw-before-output -p udp -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT + +# ok icmp codes +-A ufw-before-input -p icmp --icmp-type destination-unreachable -j ACCEPT +-A ufw-before-input -p icmp --icmp-type source-quench -j ACCEPT +-A ufw-before-input -p icmp --icmp-type time-exceeded -j ACCEPT +-A ufw-before-input -p icmp --icmp-type parameter-problem -j ACCEPT +-A ufw-before-input -p icmp --icmp-type echo-request -j ACCEPT + +# allow dhcp client to work +-A ufw-before-input -p udp --sport 67 --dport 68 -j ACCEPT + +# +# ufw-not-local +# +-A ufw-before-input -j ufw-not-local + +# if LOCAL, RETURN +-A ufw-not-local -m addrtype --dst-type LOCAL -j RETURN + +# if MULTICAST, RETURN +-A ufw-not-local -m addrtype --dst-type MULTICAST -j RETURN + +# if BROADCAST, RETURN +-A ufw-not-local -m addrtype --dst-type BROADCAST -j RETURN + +# all other non-local packets are dropped +-A ufw-not-local -m limit --limit 3/min --limit-burst 10 -j ufw-logging-deny +-A ufw-not-local -j DROP + +# allow MULTICAST, be sure the MULTICAST line above is uncommented +-A ufw-before-input -s 224.0.0.0/4 -j ACCEPT +-A ufw-before-input -d 224.0.0.0/4 -j ACCEPT + +COMMIT + +# nat Table rules +*nat +:POSTROUTING ACCEPT [0:0] + +-A POSTROUTING -s 192.168.5.2/24 -o eth0 -j SNAT --to 192.168.5.105 + +-A PREROUTING -p tcp -d 192.168.5.105 --dport 80 -i eth0 -j DNAT --to-destination 192.168.5.200:80 + +# don't delete the 'COMMIT' line or these rules won't be processed +COMMIT diff --git a/server/conf/ufw.conf.master b/server/conf/ufw.conf.master index 7870d63ef353a13b6f9530e94e73eb464a0359d6..a3710d7bf37cfd6fe70d2727ad43409c72fd3f5c 100644 --- a/server/conf/ufw.conf.master +++ b/server/conf/ufw.conf.master @@ -1,8 +1,8 @@ -# /etc/ufw/ufw.conf -# - -# set to yes to start on boot -ENABLED={tmpl_var name='enable'} - -# set to one of 'off', 'low', 'medium', 'high' -LOGLEVEL={tmpl_var name='log_level'} +# /etc/ufw/ufw.conf +# + +# set to yes to start on boot +ENABLED={tmpl_var name='enable'} + +# set to one of 'off', 'low', 'medium', 'high' +LOGLEVEL={tmpl_var name='log_level'} diff --git a/server/conf/ufw.default.master b/server/conf/ufw.default.master index 6a205006de097e23403cac5b1f5d4b50749539c4..2deb421ac397837baf706c6c63f4b29a1edbbd4f 100644 --- a/server/conf/ufw.default.master +++ b/server/conf/ufw.default.master @@ -1,39 +1,39 @@ -# /etc/default/ufw -# - -# set to yes to apply rules to support IPv6 (no means only IPv6 on loopback -# accepted). You will need to 'disable' and then 'enable' the firewall for -# the changes to take affect. -IPV6={tmpl_var name='ipv6'} - -# set the default input policy to ACCEPT, DROP or REJECT. Please note that if -# you change this you will most likely want to adjust your rules -DEFAULT_INPUT_POLICY="{tmpl_var name='default_input_policy'}" - -# set the default output policy to ACCEPT, DROP, or REJECT. Please note that -# if you change this you will most likely want to adjust your rules -DEFAULT_OUTPUT_POLICY="{tmpl_var name='default_output_policy'}T" - -# set the default forward policy to ACCEPT, DROP or REJECT. Please note that -# if you change this you will most likely want to adjust your rules -DEFAULT_FORWARD_POLICY="{tmpl_var name='default_forward_policy'}" - -# set the default application policy to ACCEPT, DROP, REJECT or SKIP. Please -# note that setting this to ACCEPT may be a security risk. See 'man ufw' for -# details -DEFAULT_APPLICATION_POLICY="{tmpl_var name='default_application_policy'}" - -# By default, ufw only touches its own chains. Set this to 'yes' to have ufw -# manage the built-in chains too. Warning: setting this to 'yes' will break -# non-ufw managed firewall rules -MANAGE_BUILTINS={tmpl_var name='manage_builtins'} - -# -# IPT backend -# -# only enable if using iptables backend -IPT_SYSCTL=/etc/ufw/sysctl.conf - -# extra connection tracking modules to load -IPT_MODULES="nf_conntrack_ftp nf_nat_ftp nf_conntrack_irc nf_nat_irc" - +# /etc/default/ufw +# + +# set to yes to apply rules to support IPv6 (no means only IPv6 on loopback +# accepted). You will need to 'disable' and then 'enable' the firewall for +# the changes to take affect. +IPV6={tmpl_var name='ipv6'} + +# set the default input policy to ACCEPT, DROP or REJECT. Please note that if +# you change this you will most likely want to adjust your rules +DEFAULT_INPUT_POLICY="{tmpl_var name='default_input_policy'}" + +# set the default output policy to ACCEPT, DROP, or REJECT. Please note that +# if you change this you will most likely want to adjust your rules +DEFAULT_OUTPUT_POLICY="{tmpl_var name='default_output_policy'}T" + +# set the default forward policy to ACCEPT, DROP or REJECT. Please note that +# if you change this you will most likely want to adjust your rules +DEFAULT_FORWARD_POLICY="{tmpl_var name='default_forward_policy'}" + +# set the default application policy to ACCEPT, DROP, REJECT or SKIP. Please +# note that setting this to ACCEPT may be a security risk. See 'man ufw' for +# details +DEFAULT_APPLICATION_POLICY="{tmpl_var name='default_application_policy'}" + +# By default, ufw only touches its own chains. Set this to 'yes' to have ufw +# manage the built-in chains too. Warning: setting this to 'yes' will break +# non-ufw managed firewall rules +MANAGE_BUILTINS={tmpl_var name='manage_builtins'} + +# +# IPT backend +# +# only enable if using iptables backend +IPT_SYSCTL=/etc/ufw/sysctl.conf + +# extra connection tracking modules to load +IPT_MODULES="nf_conntrack_ftp nf_nat_ftp nf_conntrack_irc nf_nat_irc" + diff --git a/server/mods-available/remoteaction_core_module.inc.php b/server/mods-available/remoteaction_core_module.inc.php index b112e8c54a5c45dddcc8b1ca49daf433d0fe80ef..6bf3ad39879f8ae5e6b1679f71035e87562e127b 100644 --- a/server/mods-available/remoteaction_core_module.inc.php +++ b/server/mods-available/remoteaction_core_module.inc.php @@ -1,207 +1,207 @@ -_execActions(); - } - - /* - This function is called when a change in one of the registered tables is detected. - The function then raises the events for the plugins. - */ - function process($tablename, $action, $data) { - // not needed - } // end function - - private function _actionDone($id, $state) { - /* - * First set the state - */ - global $app; - $sql = "UPDATE sys_remoteaction " . - "SET action_state = '" . $app->dbmaster->quote($state) . "' " . - "WHERE action_id = " . intval($id); - $app->dbmaster->query($sql); - - /* - * Then save the maxid for the next time... - */ - $fp = fopen(dirname(__FILE__) . "/../lib/remote_action.inc.php", 'wb'); - $content = '"; - fwrite($fp, $content); - fclose($fp); - } - - - /** - * This method searches for scheduled actions and exec then - */ - private function _execActions() { - global $app; - global $conf; - - /* the id of the server as int */ - $server_id = intval($conf["server_id"]); - - /* - * First we (till and i, oliver) thought, it was enough to write - * "select from where action_status = 'pending'" and then execute this actions. - * But it is not! - * If a hacker can hack into a server, she can change the valus of action_status - * and so re-exec a action, executed some days bevore. So she can (for example) - * stop a service, a admin stopped some days before! To avoid this, we ignore - * the status (it is only for the interface to show) and use our own maxid - */ - include_once (dirname(__FILE__) . "/../lib/remote_action.inc.php"); - - /* - * Get all actions this server should execute - */ - $sql = "SELECT action_id, action_type, action_param " . - "FROM sys_remoteaction " . - "WHERE server_id = " . $server_id . " ". - " AND action_id > " . intval($maxid_remote_action) . " ". - "ORDER BY action_id"; - $actions = $app->dbmaster->queryAllRecords($sql); - - /* - * process all actions - */ - if(is_array($actions)) { - foreach ($actions as $action) { - if ($action['action_type'] == 'os_update') { - /* do the update */ - $this->_doOsUpdate($action); - /* this action takes so much time, - * we stop executing the actions not to waste more time */ - return; - } - if ($action['action_type'] == 'ispc_update') { - /* do the update */ - $this->_doIspCUpdate($action); - /* this action takes so much time, - * we stop executing the actions not to waste more time */ - return; - } - } - } - } - - private function _doOsUpdate($action) { - /* - * Do the update - */ - exec("aptitude update"); - exec("aptitude safe-upgrade -y"); - - //TODO : change this when distribution information has been integrated into server record - if(file_exists('/etc/gentoo-release')) { - exec("glsa-check -f --nocolor affected"); - } - else { - exec("aptitude update"); - exec("aptitude safe-upgrade -y"); - } - - /* - * All well done! - */ - $this->_actionDone($action['action_id'], 'ok'); - } - - private function _doIspCUpdate($action) { - - // Ensure that this code is not executed twice as this would cause a loop in case of a failure - $this->_actionDone($action['action_id'], 'ok'); - - /* - * Get the version-number of the newest version - */ - $new_version = @file_get_contents('http://www.ispconfig.org/downloads/ispconfig3_version.txt'); - $new_version = trim($new_version); - - /* - * Do the update - */ - - /* jump into the temporary dir */ - $oldDir = getcwd(); - chdir("/tmp"); - - /* delete the old files (if there are any...) */ - exec("rm /tmp/ISPConfig-" . $new_version . ".tar.gz"); - exec("rm /tmp/ispconfig3_install -R"); - - /* get the newest version */ - exec("wget http://www.ispconfig.org/downloads/ISPConfig-" . $new_version . ".tar.gz"); - - /* extract the files */ - exec("tar xvfz ISPConfig-" . $new_version . ".tar.gz"); - - /* - * Initialize the automated update - * (the update is then done next start of server.sh - */ - chdir("/tmp/ispconfig3_install/install"); - exec("touch autoupdate"); - - /* - * do some clean-up - */ - exec("rm /tmp/ISPConfig-" . $new_version . ".tar.gz"); - - /* - * go back to the "old path" - */ - chdir($oldDir); - - /* - * All well done! - */ - //$this->_actionDone($action['action_id'], 'ok'); - } -} +_execActions(); + } + + /* + This function is called when a change in one of the registered tables is detected. + The function then raises the events for the plugins. + */ + function process($tablename, $action, $data) { + // not needed + } // end function + + private function _actionDone($id, $state) { + /* + * First set the state + */ + global $app; + $sql = "UPDATE sys_remoteaction " . + "SET action_state = '" . $app->dbmaster->quote($state) . "' " . + "WHERE action_id = " . intval($id); + $app->dbmaster->query($sql); + + /* + * Then save the maxid for the next time... + */ + $fp = fopen(dirname(__FILE__) . "/../lib/remote_action.inc.php", 'wb'); + $content = '"; + fwrite($fp, $content); + fclose($fp); + } + + + /** + * This method searches for scheduled actions and exec then + */ + private function _execActions() { + global $app; + global $conf; + + /* the id of the server as int */ + $server_id = intval($conf["server_id"]); + + /* + * First we (till and i, oliver) thought, it was enough to write + * "select from where action_status = 'pending'" and then execute this actions. + * But it is not! + * If a hacker can hack into a server, she can change the valus of action_status + * and so re-exec a action, executed some days bevore. So she can (for example) + * stop a service, a admin stopped some days before! To avoid this, we ignore + * the status (it is only for the interface to show) and use our own maxid + */ + include_once (dirname(__FILE__) . "/../lib/remote_action.inc.php"); + + /* + * Get all actions this server should execute + */ + $sql = "SELECT action_id, action_type, action_param " . + "FROM sys_remoteaction " . + "WHERE server_id = " . $server_id . " ". + " AND action_id > " . intval($maxid_remote_action) . " ". + "ORDER BY action_id"; + $actions = $app->dbmaster->queryAllRecords($sql); + + /* + * process all actions + */ + if(is_array($actions)) { + foreach ($actions as $action) { + if ($action['action_type'] == 'os_update') { + /* do the update */ + $this->_doOsUpdate($action); + /* this action takes so much time, + * we stop executing the actions not to waste more time */ + return; + } + if ($action['action_type'] == 'ispc_update') { + /* do the update */ + $this->_doIspCUpdate($action); + /* this action takes so much time, + * we stop executing the actions not to waste more time */ + return; + } + } + } + } + + private function _doOsUpdate($action) { + /* + * Do the update + */ + exec("aptitude update"); + exec("aptitude safe-upgrade -y"); + + //TODO : change this when distribution information has been integrated into server record + if(file_exists('/etc/gentoo-release')) { + exec("glsa-check -f --nocolor affected"); + } + else { + exec("aptitude update"); + exec("aptitude safe-upgrade -y"); + } + + /* + * All well done! + */ + $this->_actionDone($action['action_id'], 'ok'); + } + + private function _doIspCUpdate($action) { + + // Ensure that this code is not executed twice as this would cause a loop in case of a failure + $this->_actionDone($action['action_id'], 'ok'); + + /* + * Get the version-number of the newest version + */ + $new_version = @file_get_contents('http://www.ispconfig.org/downloads/ispconfig3_version.txt'); + $new_version = trim($new_version); + + /* + * Do the update + */ + + /* jump into the temporary dir */ + $oldDir = getcwd(); + chdir("/tmp"); + + /* delete the old files (if there are any...) */ + exec("rm /tmp/ISPConfig-" . $new_version . ".tar.gz"); + exec("rm /tmp/ispconfig3_install -R"); + + /* get the newest version */ + exec("wget http://www.ispconfig.org/downloads/ISPConfig-" . $new_version . ".tar.gz"); + + /* extract the files */ + exec("tar xvfz ISPConfig-" . $new_version . ".tar.gz"); + + /* + * Initialize the automated update + * (the update is then done next start of server.sh + */ + chdir("/tmp/ispconfig3_install/install"); + exec("touch autoupdate"); + + /* + * do some clean-up + */ + exec("rm /tmp/ISPConfig-" . $new_version . ".tar.gz"); + + /* + * go back to the "old path" + */ + chdir($oldDir); + + /* + * All well done! + */ + //$this->_actionDone($action['action_id'], 'ok'); + } +} ?> \ No newline at end of file diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index a200dafca9f11d95cfa7ff7822d9caffa3ac5abd..7016ad1bdeaeb7eb7241f3ea7f89c3319a39e8c6 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -1,368 +1,368 @@ -plugins->registerEvent('web_domain_insert',$this->plugin_name,'ssl'); - $app->plugins->registerEvent('web_domain_update',$this->plugin_name,'ssl'); - $app->plugins->registerEvent('web_domain_delete',$this->plugin_name,'ssl'); - - $app->plugins->registerEvent('web_domain_insert',$this->plugin_name,'insert'); - $app->plugins->registerEvent('web_domain_update',$this->plugin_name,'update'); - $app->plugins->registerEvent('web_domain_delete',$this->plugin_name,'delete'); - - // $app->plugins->registerEvent('proxy_reverse_insert',$this->plugin_name,'rewrite_insert'); - // $app->plugins->registerEvent('proxy_reverse_update',$this->plugin_name,'rewrite_update'); - // $app->plugins->registerEvent('proxy_reverse_delete',$this->plugin_name,'rewrite_delete'); - - - - } - - - function insert($event_name,$data) { - global $app, $conf; - - // just run the update function - $this->update($event_name,$data); - } - - - function update($event_name,$data) { - global $app, $conf; - - if($this->action != 'insert') $this->action = 'update'; - - if($data['new']['type'] != 'vhost' && $data['new']['parent_domain_id'] > 0) { - - $old_parent_domain_id = intval($data['old']['parent_domain_id']); - $new_parent_domain_id = intval($data['new']['parent_domain_id']); - - // If the parent_domain_id has been chenged, we will have to update the old site as well. - if($this->action == 'update' && $data['new']['parent_domain_id'] != $data['old']['parent_domain_id']) { - $tmp = $app->dbmaster->queryOneRecord('SELECT * FROM web_domain WHERE domain_id = '.$old_parent_domain_id." AND active = 'y'"); - $data['new'] = $tmp; - $data['old'] = $tmp; - $this->action = 'update'; - $this->update($event_name,$data); - } - - // This is not a vhost, so we need to update the parent record instead. - $tmp = $app->dbmaster->queryOneRecord('SELECT * FROM web_domain WHERE domain_id = '.$new_parent_domain_id." AND active = 'y'"); - $data['new'] = $tmp; - $data['old'] = $tmp; - $this->action = 'update'; - } - - - - - // load the server configuration options - $app->uses('getconf'); - $nginx_config = $app->getconf->get_server_config($conf['server_id'], 'nginx'); - - // Create group and user, if not exist - $app->uses('system'); - - //* Create the vhost config file - $app->load('tpl'); - - $tpl = new tpl(); - $tpl->newTemplate('nginx_vhost.conf.master'); - - $vhost_data = $data['new']; - $vhost_data['config_dir'] = $config['nginx']['config_dir']; - - $vhost_data['ssl_domain'] = $data['new']['ssl_domain']; - // Check if a SSL cert exists - $ssl_dir = $config['nginx']['config_dir'].'/ssl'; - $domain = $data['new']['ssl_domain']; - $key_file = $ssl_dir.'/'.$domain.'.key'; - $crt_file = $ssl_dir.'/'.$domain.'.crt'; - $bundle_file = $ssl_dir.'/'.$domain.'.bundle'; - - $vhost_data['nginx_directives'] = preg_replace("/\[IP\]/", $vhost_data['ip_address'], $vhost_data['nginx_directives']); - - - if($data['new']['ssl'] == 'y' && @is_file($crt_file) && @is_file($key_file)) { - $vhost_data['ssl_enabled'] = 1; - $app->log('Enable SSL for: '.$domain,LOGLEVEL_DEBUG); - } else { - $vhost_data['ssl_enabled'] = 0; - $app->log('Disable SSL for: '.$domain,LOGLEVEL_DEBUG); - } - - if(@is_file($bundle_file)) $vhost_data['has_bundle_cert'] = 1; - - - $tpl->setVar($vhost_data); - - - - // get alias domains (co-domains and subdomains) - $aliases = $app->dbmaster->queryAllRecords('SELECT * FROM web_domain WHERE parent_domain_id = '.$data['new']['domain_id']." AND active = 'y'"); - $server_alias = array(); - switch($data['new']['subdomain']) { - case 'www': - $server_alias[] .= 'www.'.$data['new']['domain'].' '; - break; - case '*': - $server_alias[] .= '*.'.$data['new']['domain'].' '; - break; - } - if(is_array($aliases)) { - foreach($aliases as $alias) { - switch($alias['subdomain']) { - case 'www': - $server_alias[] .= 'www.'.$alias['domain'].' '.$alias['domain'].' '; - break; - case '*': - $server_alias[] .= '*.'.$alias['domain'].' '.$alias['domain'].' '; - break; - default: - $server_alias[] .= $alias['domain'].' '; - break; - } - $app->log('Add server alias: '.$alias['domain'],LOGLEVEL_DEBUG); - - } - } - - //* If we have some alias records - if(count($server_alias) > 0) { - $server_alias_str = ''; - $n = 0; - - // begin a new ServerAlias line after 30 alias domains - foreach($server_alias as $tmp_alias) { - if($n % 30 == 0) $server_alias_str .= " "; - $server_alias_str .= $tmp_alias; - } - unset($tmp_alias); - - $tpl->setVar('alias',trim($server_alias_str)); - } else { - $tpl->setVar('alias',''); - } - - - $vhost_file = escapeshellcmd($nginx_config['vhost_conf_dir'].'/'.$data['new']['domain'].'.vhost'); - //* Make a backup copy of vhost file - copy($vhost_file,$vhost_file.'~'); - - //* Write vhost file - file_put_contents($vhost_file,$tpl->grab()); - $app->log('Writing the vhost file: '.$vhost_file,LOGLEVEL_DEBUG); - unset($tpl); - - - // Set the symlink to enable the vhost - $vhost_symlink = escapeshellcmd($nginx_config['vhost_conf_enabled_dir'].'/'.$data['new']['domain'].'.vhost'); - if($data['new']['active'] == 'y' && !is_link($vhost_symlink)) { - symlink($vhost_file,$vhost_symlink); - $app->log('Creating symlink: '.$vhost_symlink.'->'.$vhost_file,LOGLEVEL_DEBUG); - } - - // Remove the symlink, if site is inactive - if($data['new']['active'] == 'n' && is_link($vhost_symlink)) { - unlink($vhost_symlink); - $app->log('Removing symlink: '.$vhost_symlink.'->'.$vhost_file,LOGLEVEL_DEBUG); - } - - if(!is_dir('/var/log/ispconfig/nginx/'.$data['new']['domain'])) exec('mkdir -p /var/log/ispconfig/nginx/'.$data['new']['domain']); - - // remove old symlink and vhost file, if domain name of the site has changed - if($this->action == 'update' && $data['old']['domain'] != '' && $data['new']['domain'] != $data['old']['domain']) { - $vhost_symlink = escapeshellcmd($nginx_config['vhost_conf_enabled_dir'].'/'.$data['old']['domain'].'.vhost'); - unlink($vhost_symlink); - $app->log('Removing symlink: '.$vhost_symlink.'->'.$vhost_file,LOGLEVEL_DEBUG); - $vhost_file = escapeshellcmd($nginx_config['vhost_conf_dir'].'/'.$data['old']['domain'].'.vhost'); - unlink($vhost_file); - $app->log('Removing file: '.$vhost_file,LOGLEVEL_DEBUG); - - if(is_dir('/var/log/ispconfig/nginx/'.$data['old']['domain'])) exec('rm -rf /var/log/ispconfig/nginx/'.$data['old']['domain']); - } - - // request a httpd reload when all records have been processed - $app->services->restartServiceDelayed('nginx','restart'); - - // Remove the backup copy of the config file. - if(@is_file($vhost_file.'~')) unlink($vhost_file.'~'); - - - //* Unset action to clean it for next processed vhost. - $this->action = ''; - - } - - - - - // Handle the creation of SSL certificates - function ssl($event_name,$data) { - global $app, $conf; - - if(!is_dir($conf['nginx']['config_dir'].'/ssl')) exec('mkdir -p '.$conf['nginx']['config_dir'].'/ssl'); - $ssl_dir = $conf['nginx']['config_dir'].'/ssl'; - $domain = $data['new']['ssl_domain']; - $key_file = $ssl_dir.'/'.$domain.'.key.org'; - $key_file2 = $ssl_dir.'/'.$domain.'.key'; - $csr_file = $ssl_dir.'/'.$domain.'.csr'; - $crt_file = $ssl_dir.'/'.$domain.'.crt'; - - - //* Save a SSL certificate to disk - if($data["new"]["ssl_action"] == 'save') { - $web = $app->masterdb->queryOneRecord("select wd.document_root, sp.ip_address from web_domain wd INNER JOIN server_ip sp USING(server_id) WHERE domain = '".$data['new']['domain']."'"); - - $src_ssl_dir = $web["document_root"]."/ssl"; - //$domain = $data["new"]["ssl_domain"]; - //$csr_file = $ssl_dir.'/'.$domain.".csr"; - //$crt_file = $ssl_dir.'/'.$domain.".crt"; - //$bundle_file = $ssl_dir.'/'.$domain.".bundle"; - $this->_exec('rsync -v -e ssh root@'.$web['ip_address'].':~/$src_ssl_dir '.$ssl_dir); - - $app->log('Syncing SSL Cert for: '.$domain,LOGLEVEL_DEBUG); - } - - //* Delete a SSL certificate - if($data['new']['ssl_action'] == 'del') { - //$ssl_dir = $data['new']['document_root'].'/ssl'; - $domain = $data['new']['ssl_domain']; - $csr_file = $ssl_dir.'/'.$domain.'.csr'; - $crt_file = $ssl_dir.'/'.$domain.'.crt'; - $bundle_file = $ssl_dir.'/'.$domain.'.bundle'; - unlink($csr_file); - unlink($crt_file); - unlink($bundle_file); - $app->log('Deleting SSL Cert for: '.$domain,LOGLEVEL_DEBUG); - } - - - } - - - function delete($event_name,$data) { - global $app, $conf; - - // load the server configuration options - $app->uses('getconf'); - $nginx_config = $app->getconf->get_server_config($conf['server_id'], 'nginx'); - - - if($data['old']['type'] == 'vhost') { - - //* This is a website - // Deleting the vhost file, symlink and the data directory - $vhost_symlink = escapeshellcmd($nginx_config['vhost_conf_enabled_dir'].'/'.$data['old']['domain'].'.vhost'); - unlink($vhost_symlink); - $app->log('Removing symlink: '.$vhost_symlink.'->'.$vhost_file,LOGLEVEL_DEBUG); - - $vhost_file = escapeshellcmd($nginx_config['vhost_conf_dir'].'/'.$data['old']['domain'].'.vhost'); - unlink($vhost_file); - $app->log('Removing vhost file: '.$vhost_file,LOGLEVEL_DEBUG); - - - - // Delete the log file directory - $vhost_logfile_dir = escapeshellcmd('/var/log/ispconfig/nginx/'.$data['old']['domain']); - if($data['old']['domain'] != '' && !stristr($vhost_logfile_dir,'..')) exec('rm -rf '.$vhost_logfile_dir); - $app->log('Removing website logfile directory: '.$vhost_logfile_dir,LOGLEVEL_DEBUG); - - } - } - - //* Wrapper for exec function for easier debugging - private function _exec($command) { - global $app; - $app->log('exec: '.$command,LOGLEVEL_DEBUG); - exec($command); - } - - function rewrite_insert($event_name,$data) { - global $app, $conf; - - // just run the update function - $this->update($event_name,$data); - } - - function rewrite_update($event_name,$data) { - global $app, $conf; - - $rules = $this->_getRewriteRules($app); - - $app->uses('getconf'); - $nginx_config = $app->getconf->get_server_config($conf['server_id'], 'nginx'); - - $app->load('tpl'); - $tpl = new tpl(); - $tpl->newTemplate("nginx-rewrites.conf.master"); - if (!empty($rules))$tpl->setLoop('nginx_rewrite_rules',$rules); - - $rewrites_file = escapeshellcmd($nginx_config['vhost_conf_dir'].'/default.rewrites.conf'); - //* Make a backup copy of vhost file - copy($rewrites_file,$rewrites_file.'~'); - - //* Write vhost file - file_put_contents($rewrites_file,$tpl->grab()); - $app->log('Writing the nginx rewrites file: '.$rewrites_file,LOGLEVEL_DEBUG); - unset($tpl); - - - // Set the symlink to enable the vhost - $rewrite_symlink = escapeshellcmd($nginx_config['vhost_conf_enabled_dir'].'/default.rewrites.conf'); - - if(!is_link($rewrite_symlink)) { - symlink($rewrites_file,$rewrite_symlink); - $app->log('Creating symlink for nginx rewrites: '.$rewrite_symlink.'->'.$rewrites_file,LOGLEVEL_DEBUG); - } - } - - function rewrite_delete($event_name,$data) { - global $app, $conf; - - // just run the update function - $this->rewrite_update($event_name,$data); - } - - - function _getRewriteRules($app) - { - $rules = array(); - $rules = $app->db->queryAllRecords("SELECT rewrite_url_src, rewrite_url_dst FROM proxy_reverse ORDER BY rewrite_id ASC"); - return $rules; - } - -} // end class - -?> +plugins->registerEvent('web_domain_insert',$this->plugin_name,'ssl'); + $app->plugins->registerEvent('web_domain_update',$this->plugin_name,'ssl'); + $app->plugins->registerEvent('web_domain_delete',$this->plugin_name,'ssl'); + + $app->plugins->registerEvent('web_domain_insert',$this->plugin_name,'insert'); + $app->plugins->registerEvent('web_domain_update',$this->plugin_name,'update'); + $app->plugins->registerEvent('web_domain_delete',$this->plugin_name,'delete'); + + // $app->plugins->registerEvent('proxy_reverse_insert',$this->plugin_name,'rewrite_insert'); + // $app->plugins->registerEvent('proxy_reverse_update',$this->plugin_name,'rewrite_update'); + // $app->plugins->registerEvent('proxy_reverse_delete',$this->plugin_name,'rewrite_delete'); + + + + } + + + function insert($event_name,$data) { + global $app, $conf; + + // just run the update function + $this->update($event_name,$data); + } + + + function update($event_name,$data) { + global $app, $conf; + + if($this->action != 'insert') $this->action = 'update'; + + if($data['new']['type'] != 'vhost' && $data['new']['parent_domain_id'] > 0) { + + $old_parent_domain_id = intval($data['old']['parent_domain_id']); + $new_parent_domain_id = intval($data['new']['parent_domain_id']); + + // If the parent_domain_id has been chenged, we will have to update the old site as well. + if($this->action == 'update' && $data['new']['parent_domain_id'] != $data['old']['parent_domain_id']) { + $tmp = $app->dbmaster->queryOneRecord('SELECT * FROM web_domain WHERE domain_id = '.$old_parent_domain_id." AND active = 'y'"); + $data['new'] = $tmp; + $data['old'] = $tmp; + $this->action = 'update'; + $this->update($event_name,$data); + } + + // This is not a vhost, so we need to update the parent record instead. + $tmp = $app->dbmaster->queryOneRecord('SELECT * FROM web_domain WHERE domain_id = '.$new_parent_domain_id." AND active = 'y'"); + $data['new'] = $tmp; + $data['old'] = $tmp; + $this->action = 'update'; + } + + + + + // load the server configuration options + $app->uses('getconf'); + $nginx_config = $app->getconf->get_server_config($conf['server_id'], 'nginx'); + + // Create group and user, if not exist + $app->uses('system'); + + //* Create the vhost config file + $app->load('tpl'); + + $tpl = new tpl(); + $tpl->newTemplate('nginx_vhost.conf.master'); + + $vhost_data = $data['new']; + $vhost_data['config_dir'] = $config['nginx']['config_dir']; + + $vhost_data['ssl_domain'] = $data['new']['ssl_domain']; + // Check if a SSL cert exists + $ssl_dir = $config['nginx']['config_dir'].'/ssl'; + $domain = $data['new']['ssl_domain']; + $key_file = $ssl_dir.'/'.$domain.'.key'; + $crt_file = $ssl_dir.'/'.$domain.'.crt'; + $bundle_file = $ssl_dir.'/'.$domain.'.bundle'; + + $vhost_data['nginx_directives'] = preg_replace("/\[IP\]/", $vhost_data['ip_address'], $vhost_data['nginx_directives']); + + + if($data['new']['ssl'] == 'y' && @is_file($crt_file) && @is_file($key_file)) { + $vhost_data['ssl_enabled'] = 1; + $app->log('Enable SSL for: '.$domain,LOGLEVEL_DEBUG); + } else { + $vhost_data['ssl_enabled'] = 0; + $app->log('Disable SSL for: '.$domain,LOGLEVEL_DEBUG); + } + + if(@is_file($bundle_file)) $vhost_data['has_bundle_cert'] = 1; + + + $tpl->setVar($vhost_data); + + + + // get alias domains (co-domains and subdomains) + $aliases = $app->dbmaster->queryAllRecords('SELECT * FROM web_domain WHERE parent_domain_id = '.$data['new']['domain_id']." AND active = 'y'"); + $server_alias = array(); + switch($data['new']['subdomain']) { + case 'www': + $server_alias[] .= 'www.'.$data['new']['domain'].' '; + break; + case '*': + $server_alias[] .= '*.'.$data['new']['domain'].' '; + break; + } + if(is_array($aliases)) { + foreach($aliases as $alias) { + switch($alias['subdomain']) { + case 'www': + $server_alias[] .= 'www.'.$alias['domain'].' '.$alias['domain'].' '; + break; + case '*': + $server_alias[] .= '*.'.$alias['domain'].' '.$alias['domain'].' '; + break; + default: + $server_alias[] .= $alias['domain'].' '; + break; + } + $app->log('Add server alias: '.$alias['domain'],LOGLEVEL_DEBUG); + + } + } + + //* If we have some alias records + if(count($server_alias) > 0) { + $server_alias_str = ''; + $n = 0; + + // begin a new ServerAlias line after 30 alias domains + foreach($server_alias as $tmp_alias) { + if($n % 30 == 0) $server_alias_str .= " "; + $server_alias_str .= $tmp_alias; + } + unset($tmp_alias); + + $tpl->setVar('alias',trim($server_alias_str)); + } else { + $tpl->setVar('alias',''); + } + + + $vhost_file = escapeshellcmd($nginx_config['vhost_conf_dir'].'/'.$data['new']['domain'].'.vhost'); + //* Make a backup copy of vhost file + copy($vhost_file,$vhost_file.'~'); + + //* Write vhost file + file_put_contents($vhost_file,$tpl->grab()); + $app->log('Writing the vhost file: '.$vhost_file,LOGLEVEL_DEBUG); + unset($tpl); + + + // Set the symlink to enable the vhost + $vhost_symlink = escapeshellcmd($nginx_config['vhost_conf_enabled_dir'].'/'.$data['new']['domain'].'.vhost'); + if($data['new']['active'] == 'y' && !is_link($vhost_symlink)) { + symlink($vhost_file,$vhost_symlink); + $app->log('Creating symlink: '.$vhost_symlink.'->'.$vhost_file,LOGLEVEL_DEBUG); + } + + // Remove the symlink, if site is inactive + if($data['new']['active'] == 'n' && is_link($vhost_symlink)) { + unlink($vhost_symlink); + $app->log('Removing symlink: '.$vhost_symlink.'->'.$vhost_file,LOGLEVEL_DEBUG); + } + + if(!is_dir('/var/log/ispconfig/nginx/'.$data['new']['domain'])) exec('mkdir -p /var/log/ispconfig/nginx/'.$data['new']['domain']); + + // remove old symlink and vhost file, if domain name of the site has changed + if($this->action == 'update' && $data['old']['domain'] != '' && $data['new']['domain'] != $data['old']['domain']) { + $vhost_symlink = escapeshellcmd($nginx_config['vhost_conf_enabled_dir'].'/'.$data['old']['domain'].'.vhost'); + unlink($vhost_symlink); + $app->log('Removing symlink: '.$vhost_symlink.'->'.$vhost_file,LOGLEVEL_DEBUG); + $vhost_file = escapeshellcmd($nginx_config['vhost_conf_dir'].'/'.$data['old']['domain'].'.vhost'); + unlink($vhost_file); + $app->log('Removing file: '.$vhost_file,LOGLEVEL_DEBUG); + + if(is_dir('/var/log/ispconfig/nginx/'.$data['old']['domain'])) exec('rm -rf /var/log/ispconfig/nginx/'.$data['old']['domain']); + } + + // request a httpd reload when all records have been processed + $app->services->restartServiceDelayed('nginx','restart'); + + // Remove the backup copy of the config file. + if(@is_file($vhost_file.'~')) unlink($vhost_file.'~'); + + + //* Unset action to clean it for next processed vhost. + $this->action = ''; + + } + + + + + // Handle the creation of SSL certificates + function ssl($event_name,$data) { + global $app, $conf; + + if(!is_dir($conf['nginx']['config_dir'].'/ssl')) exec('mkdir -p '.$conf['nginx']['config_dir'].'/ssl'); + $ssl_dir = $conf['nginx']['config_dir'].'/ssl'; + $domain = $data['new']['ssl_domain']; + $key_file = $ssl_dir.'/'.$domain.'.key.org'; + $key_file2 = $ssl_dir.'/'.$domain.'.key'; + $csr_file = $ssl_dir.'/'.$domain.'.csr'; + $crt_file = $ssl_dir.'/'.$domain.'.crt'; + + + //* Save a SSL certificate to disk + if($data["new"]["ssl_action"] == 'save') { + $web = $app->masterdb->queryOneRecord("select wd.document_root, sp.ip_address from web_domain wd INNER JOIN server_ip sp USING(server_id) WHERE domain = '".$data['new']['domain']."'"); + + $src_ssl_dir = $web["document_root"]."/ssl"; + //$domain = $data["new"]["ssl_domain"]; + //$csr_file = $ssl_dir.'/'.$domain.".csr"; + //$crt_file = $ssl_dir.'/'.$domain.".crt"; + //$bundle_file = $ssl_dir.'/'.$domain.".bundle"; + $this->_exec('rsync -v -e ssh root@'.$web['ip_address'].':~/$src_ssl_dir '.$ssl_dir); + + $app->log('Syncing SSL Cert for: '.$domain,LOGLEVEL_DEBUG); + } + + //* Delete a SSL certificate + if($data['new']['ssl_action'] == 'del') { + //$ssl_dir = $data['new']['document_root'].'/ssl'; + $domain = $data['new']['ssl_domain']; + $csr_file = $ssl_dir.'/'.$domain.'.csr'; + $crt_file = $ssl_dir.'/'.$domain.'.crt'; + $bundle_file = $ssl_dir.'/'.$domain.'.bundle'; + unlink($csr_file); + unlink($crt_file); + unlink($bundle_file); + $app->log('Deleting SSL Cert for: '.$domain,LOGLEVEL_DEBUG); + } + + + } + + + function delete($event_name,$data) { + global $app, $conf; + + // load the server configuration options + $app->uses('getconf'); + $nginx_config = $app->getconf->get_server_config($conf['server_id'], 'nginx'); + + + if($data['old']['type'] == 'vhost') { + + //* This is a website + // Deleting the vhost file, symlink and the data directory + $vhost_symlink = escapeshellcmd($nginx_config['vhost_conf_enabled_dir'].'/'.$data['old']['domain'].'.vhost'); + unlink($vhost_symlink); + $app->log('Removing symlink: '.$vhost_symlink.'->'.$vhost_file,LOGLEVEL_DEBUG); + + $vhost_file = escapeshellcmd($nginx_config['vhost_conf_dir'].'/'.$data['old']['domain'].'.vhost'); + unlink($vhost_file); + $app->log('Removing vhost file: '.$vhost_file,LOGLEVEL_DEBUG); + + + + // Delete the log file directory + $vhost_logfile_dir = escapeshellcmd('/var/log/ispconfig/nginx/'.$data['old']['domain']); + if($data['old']['domain'] != '' && !stristr($vhost_logfile_dir,'..')) exec('rm -rf '.$vhost_logfile_dir); + $app->log('Removing website logfile directory: '.$vhost_logfile_dir,LOGLEVEL_DEBUG); + + } + } + + //* Wrapper for exec function for easier debugging + private function _exec($command) { + global $app; + $app->log('exec: '.$command,LOGLEVEL_DEBUG); + exec($command); + } + + function rewrite_insert($event_name,$data) { + global $app, $conf; + + // just run the update function + $this->update($event_name,$data); + } + + function rewrite_update($event_name,$data) { + global $app, $conf; + + $rules = $this->_getRewriteRules($app); + + $app->uses('getconf'); + $nginx_config = $app->getconf->get_server_config($conf['server_id'], 'nginx'); + + $app->load('tpl'); + $tpl = new tpl(); + $tpl->newTemplate("nginx-rewrites.conf.master"); + if (!empty($rules))$tpl->setLoop('nginx_rewrite_rules',$rules); + + $rewrites_file = escapeshellcmd($nginx_config['vhost_conf_dir'].'/default.rewrites.conf'); + //* Make a backup copy of vhost file + copy($rewrites_file,$rewrites_file.'~'); + + //* Write vhost file + file_put_contents($rewrites_file,$tpl->grab()); + $app->log('Writing the nginx rewrites file: '.$rewrites_file,LOGLEVEL_DEBUG); + unset($tpl); + + + // Set the symlink to enable the vhost + $rewrite_symlink = escapeshellcmd($nginx_config['vhost_conf_enabled_dir'].'/default.rewrites.conf'); + + if(!is_link($rewrite_symlink)) { + symlink($rewrites_file,$rewrite_symlink); + $app->log('Creating symlink for nginx rewrites: '.$rewrite_symlink.'->'.$rewrites_file,LOGLEVEL_DEBUG); + } + } + + function rewrite_delete($event_name,$data) { + global $app, $conf; + + // just run the update function + $this->rewrite_update($event_name,$data); + } + + + function _getRewriteRules($app) + { + $rules = array(); + $rules = $app->db->queryAllRecords("SELECT rewrite_url_src, rewrite_url_dst FROM proxy_reverse ORDER BY rewrite_id ASC"); + return $rules; + } + +} // end class + +?> diff --git a/server/plugins-available/squid_plugin.inc.php b/server/plugins-available/squid_plugin.inc.php index fb667e050938af3b5debed6e2531a6d558a7dd3a..f8bdefcd082ca4a4ca0303b9ef94cea81ed72eb9 100644 --- a/server/plugins-available/squid_plugin.inc.php +++ b/server/plugins-available/squid_plugin.inc.php @@ -1,171 +1,171 @@ -plugins->registerEvent('proxy_reverse_insert',$this->plugin_name,'insert'); - $app->plugins->registerEvent('proxy_reverse_update',$this->plugin_name,'update'); - $app->plugins->registerEvent('proxy_reverse_delete',$this->plugin_name,'delete'); - - $app->plugins->registerEvent('web_domain_insert',$this->plugin_name,'insert'); - $app->plugins->registerEvent('web_domain_update',$this->plugin_name,'update'); - $app->plugins->registerEvent('web_domain_delete',$this->plugin_name,'delete'); - - - - } - - - - - function insert($event_name,$data) { - global $app, $conf; - - - // just run the update function - $this->update($event_name,$data); - - - } - - - function update($event_name,$data) { - global $app, $conf; - - $domains = $this->_getSquidDomains($app); - $rules = $this->_getSquidRewriteRules($app); - - $app->load('tpl'); - $tpl = new tpl(); - $tpl->newTemplate("squidRewriteRules.py.master"); - if (!empty($rules))$tpl->setLoop('squid_rewrite_rules',$rules); - file_put_contents('/etc/squid/squidRewriteRules.py',$tpl->grab()); - unset($tpl); - $app->log('Writing squid rewrite configuration to /etc/squid/squidRewriteRules.py',LOGLEVEL_DEBUG); - - - $tpl = new tpl(); - $tpl->newTemplate("domains.txt.master"); - $tpl->setLoop('squid_domains',$domains); - file_put_contents('/etc/squid/domains.txt',$tpl->grab()); - unset($tpl); - $app->log('Writing squid domains configuration to /etc/squid/domains.txt',LOGLEVEL_DEBUG); - - - // request a httpd reload when all records have been processed - $app->services->restartServiceDelayed('squid','restart'); - - } - - function delete($event_name,$data) { - global $app, $conf; - - // load the server configuration options - - // just run the update function - $this->update($event_name,$data); - - } - - function _getSquidDomains($app) - { - $records = $app->dbmaster->queryAllRecords("SELECT ds.origin, dr.name, IF(origin=name,true,false) AS isRoot FROM dns_soa ds inner join dns_rr dr ON ds.id=dr.zone WHERE ds.active='Y' AND dr.type IN ('A','CNAME') AND dr.name NOT IN ('mail','ns1')"); - $domains = array(); - foreach ($records as $record) { - - $origin = substr($record["origin"],0,-1); - if ($record["isRoot"]) - { - array_push($domains, array("domain" => $origin)); - } else { - array_push($domains, array("domain" => $record["name"].".".$origin)); - } - - } - - return $domains; - - } - - function _getSquidRewriteRules($app) - { - $rules = array(); - - $rules = $app->db->queryAllRecords("SELECT rewrite_url_src, rewrite_url_dest FROM squid_reverse ORDER BY rewrite_id ASC"); - $web_domains = $app->db->queryAllRecords("SELECT wd.subdomain, wd.domain, si.ip_address FROM web_domain wd INNER JOIN server s USING(server_id) INNER JOIN server_ip si USING(server_id)"); - - foreach ($web_domains as $domain) { - if ($domain["subdomain"] == "www") { - array_push($rules,array("rewrite_url_src"=>"^http://www.".$domain["domain"]."/(.*)","rewrite_url_dest"=>"http://".$domain["ip_address"].":80/")); - array_push($rules,array("rewrite_url_src"=>"^http://".$domain["domain"]."/(.*)","rewrite_url_dest"=>"http://".$domain["ip_address"].":80/")); - } else { - array_push($rules,array("rewrite_url_src"=>"^http://www.".$domain["domain"]."/(.*)","rewrite_url_dest"=>"http://".$domain["ip_address"].":80/")); - } - } - return $rules; - } - - - -} // end class - -?> +plugins->registerEvent('proxy_reverse_insert',$this->plugin_name,'insert'); + $app->plugins->registerEvent('proxy_reverse_update',$this->plugin_name,'update'); + $app->plugins->registerEvent('proxy_reverse_delete',$this->plugin_name,'delete'); + + $app->plugins->registerEvent('web_domain_insert',$this->plugin_name,'insert'); + $app->plugins->registerEvent('web_domain_update',$this->plugin_name,'update'); + $app->plugins->registerEvent('web_domain_delete',$this->plugin_name,'delete'); + + + + } + + + + + function insert($event_name,$data) { + global $app, $conf; + + + // just run the update function + $this->update($event_name,$data); + + + } + + + function update($event_name,$data) { + global $app, $conf; + + $domains = $this->_getSquidDomains($app); + $rules = $this->_getSquidRewriteRules($app); + + $app->load('tpl'); + $tpl = new tpl(); + $tpl->newTemplate("squidRewriteRules.py.master"); + if (!empty($rules))$tpl->setLoop('squid_rewrite_rules',$rules); + file_put_contents('/etc/squid/squidRewriteRules.py',$tpl->grab()); + unset($tpl); + $app->log('Writing squid rewrite configuration to /etc/squid/squidRewriteRules.py',LOGLEVEL_DEBUG); + + + $tpl = new tpl(); + $tpl->newTemplate("domains.txt.master"); + $tpl->setLoop('squid_domains',$domains); + file_put_contents('/etc/squid/domains.txt',$tpl->grab()); + unset($tpl); + $app->log('Writing squid domains configuration to /etc/squid/domains.txt',LOGLEVEL_DEBUG); + + + // request a httpd reload when all records have been processed + $app->services->restartServiceDelayed('squid','restart'); + + } + + function delete($event_name,$data) { + global $app, $conf; + + // load the server configuration options + + // just run the update function + $this->update($event_name,$data); + + } + + function _getSquidDomains($app) + { + $records = $app->dbmaster->queryAllRecords("SELECT ds.origin, dr.name, IF(origin=name,true,false) AS isRoot FROM dns_soa ds inner join dns_rr dr ON ds.id=dr.zone WHERE ds.active='Y' AND dr.type IN ('A','CNAME') AND dr.name NOT IN ('mail','ns1')"); + $domains = array(); + foreach ($records as $record) { + + $origin = substr($record["origin"],0,-1); + if ($record["isRoot"]) + { + array_push($domains, array("domain" => $origin)); + } else { + array_push($domains, array("domain" => $record["name"].".".$origin)); + } + + } + + return $domains; + + } + + function _getSquidRewriteRules($app) + { + $rules = array(); + + $rules = $app->db->queryAllRecords("SELECT rewrite_url_src, rewrite_url_dest FROM squid_reverse ORDER BY rewrite_id ASC"); + $web_domains = $app->db->queryAllRecords("SELECT wd.subdomain, wd.domain, si.ip_address FROM web_domain wd INNER JOIN server s USING(server_id) INNER JOIN server_ip si USING(server_id)"); + + foreach ($web_domains as $domain) { + if ($domain["subdomain"] == "www") { + array_push($rules,array("rewrite_url_src"=>"^http://www.".$domain["domain"]."/(.*)","rewrite_url_dest"=>"http://".$domain["ip_address"].":80/")); + array_push($rules,array("rewrite_url_src"=>"^http://".$domain["domain"]."/(.*)","rewrite_url_dest"=>"http://".$domain["ip_address"].":80/")); + } else { + array_push($rules,array("rewrite_url_src"=>"^http://www.".$domain["domain"]."/(.*)","rewrite_url_dest"=>"http://".$domain["ip_address"].":80/")); + } + } + return $rules; + } + + + +} // end class + +?> diff --git a/server/plugins-available/ufw_firewall_plugin.inc.php b/server/plugins-available/ufw_firewall_plugin.inc.php index 4eb1e1f960558a7069b7c93528c75d3611750385..be10cf67330204cb99859d9bdcb3b1e7257cdb2f 100644 --- a/server/plugins-available/ufw_firewall_plugin.inc.php +++ b/server/plugins-available/ufw_firewall_plugin.inc.php @@ -1,504 +1,504 @@ -plugins->registerEvent('firewall_insert',$this->plugin_name,'insert_basic'); - $app->plugins->registerEvent('firewall_update',$this->plugin_name,'update_basic'); - $app->plugins->registerEvent('firewall_delete',$this->plugin_name,'update_basic'); - - $app->plugins->registerEvent('firewall_forward_insert',$this->plugin_name,'insert_forward'); - $app->plugins->registerEvent('firewall_forward_update',$this->plugin_name,'update_forward'); - $app->plugins->registerEvent('firewall_forward_delete',$this->plugin_name,'update_forward'); - - $app->plugins->registerEvent('firewall_filter_insert',$this->plugin_name,'insert_filter'); - $app->plugins->registerEvent('firewall_filter_update',$this->plugin_name,'update_filter'); - $app->plugins->registerEvent('firewall_filter_delete',$this->plugin_name,'delete_filter'); - - $app->plugins->registerEvent('server_insert',$this->plugin_name,'updateSettings'); - $app->plugins->registerEvent('server_update',$this->plugin_name,'updateSettings'); - - - - } - - - function insert_basic($event_name,$data) { - global $app, $conf; - - $this->update_basic($event_name,$data); - - } - - function update_basic($event_name,$data) { - global $app, $conf; - - $tcp_ports = ''; - $udp_ports = ''; - - $delete_rule = ($data["new"]["active"] == "n" ? "delete " : ""); - /* - $ports = explode(',',$data["new"]["tcp_port"]); - if(is_array($ports)) { - foreach($ports as $p) { - if(strstr($p,':')) { - $p_parts = explode(':',$p); - $p_clean = intval($p_parts[0]).':'.intval($p_parts[1]); - } else { - $p_clean = intval($p); - } - - //system("ufw $delete_rule allow " . $p_clean . "/tcp"); - - } - }*/ - - system("ufw $delete_rule allow out" . $data["new"]["tcp_port"] . "/tcp"); - system("ufw $delete_rule allow in" . $data["new"]["tcp_port"] . "/tcp"); - system("ufw $delete_rule allow out" . $data["new"]["udp_port"] . "/udp"); - system("ufw $delete_rule allow in" . $data["new"]["udp_port"] . "/udp"); - //$tcp_ports = trim($tcp_ports); - /* - $ports = explode(',',$data["new"]["udp_port"]); - if(is_array($ports)) { - foreach($ports as $p) { - if(strstr($p,':')) { - $p_parts = explode(':',$p); - $p_clean = intval($p_parts[0]).':'.intval($p_parts[1]); - } else { - $p_clean = intval($p); - } - - - } - } - - system("ufw $delete_rule allow " . $p_clean . "/udp"); - */ - - if($data["new"]["active"] == 'y') { - exec('/etc/init.d/ufw force-reload'); - $app->log('Restarting the firewall',LOGLEVEL_DEBUG); - } else { - exec('/etc/init.d/ufw force-reload'); - $app->log('Flushing the firewall',LOGLEVEL_DEBUG); - } - - - } - - - function insert_filter($event_name,$data) { - global $app, $conf; - - $this->update_filter($event_name,$data); - - } - - function getCidr($mask) { - $long = ip2long($mask); - $base = ip2long('255.255.255.255'); - return 32-log(($long ^ $base)+1,2); - } - - function update_filter($event_name,$data) { - global $app, $conf; - - $app->uses("getconf"); - $server_config = $app->getconf->get_server_config($conf["server_id"], 'ufw'); - $network = $server_config["ufw_network"]; - - $records = $app->db->queryAllRecords( - "SELECT - protocol, - IF - (src_from_port=src_to_port, src_from_port, CONCAT(src_from_port, ':',src_to_port)) - AS - src_port, - IF - (dst_from_port=dst_to_port, dst_from_port, CONCAT(dst_from_port, ':',dst_to_port)) - AS - dst_port, - IF - (src_ip='0.0.0.0','any',src_ip) - AS - src_ip, - IF - (dst_ip='0.0.0.0','any',dst_ip) - AS - dst_ip, - src_netmask, - dst_netmask, - inbound_policy, - outbound_policy, - rule_id, - active - FROM - firewall_filter - ORDER BY - rule_id - ASC"); - - $commands = array(); - foreach ($records as $record) { - $src_netmask = $this->getCidr($record["src_netmask"]); - $dst_netmask = $this->getCidr($record["dst_netmask"]); - $src_port = ($record["src_port"] == "0:65535" ? "" : " port " .$record["src_port"]); - $dst_port = ($record["dst_port"] == "0:65535" ? "" : " port " . $record["dst_port"]); - $src_ip = ($record["src_ip"] == "any" ? "any" : $record["src_ip"] . "/" . $src_netmask); - $dst_ip = ($record["dst_ip"] == "any" ? "any" : $record["dst_ip"] . "/" . $dst_netmask); - //$protocol = $record["protocol"]; - $delete = ($record["active"] == "n" ? true : false); - //$protocols = array_split($record["protocol"]); - //$inbound = ($record["inbound"] == 0 ? "deny " : "allow"); - //$outbound = ($record["outbound"] == 0 ? "deny out" : "allow out"); - - //foreach ($protocols as $protocol) { - - - $ufw = new UFW(); - //$ufw->setDelete($record["active"] == "n"); - $ufw->setRuleID($record["rule_id"]); - $ufw->setSrcIP($src_ip); - $ufw->setDstIP($dst_ip); - $ufw->setSrcPort($src_port); - $ufw->setDstPort($dst_port); - $ufw->setInboundPolicy($record["inbound_policy"]); - $ufw->setOutboundPolicy($record["outbound_policy"]); - $ufw->setProtocol($record["protocol"]); - $ufw->setNetwork($network); - - if ($delete) { - $ufw->delete(); - } else { - $ufw->insert(); - } - //} - - /* - if ($record["active"] == 'n') { - $inbound = ($record["inbound"] == 0 ? "deny " : "allow"); - $outbound = ($record["outbound"] == 0 ? "deny out" : "allow out"); - array_push($commands, "ufw deny proto udp from $src_ip $src_port to $dst_ip $dst_port"); - if ($protocol == "tcp/udp") { - array_push($commands, "ufw delete $inbound proto udp from $src_ip $src_port to $dst_ip $dst_port"); - array_push($commands, "ufw delete $outbound proto udp from $src_ip $src_port to $dst_ip $dst_port"); - array_push($commands, "ufw delete $inbound proto tcp from $src_ip $src_port to $dst_ip $dst_port"); - array_push($commands, "ufw delete $outbound proto tcp from $src_ip $src_port to $dst_ip $dst_port"); - } else { - array_push($commands, "ufw delete $inbound proto $protocol from $src_ip $src_port to $dst_ip $dst_port"); - array_push($commands, "ufw delete $outbound proto $protocol from $src_ip $src_port to $dst_ip $dst_port"); - } - } elseif ($record["inbound"] == 0) { - if ($protocol == "tcp/udp") { - array_push($commands, "ufw deny proto udp from $src_ip $src_port to $dst_ip $dst_port"); - array_push($commands, "ufw deny proto tcp from $src_ip $src_port to $dst_ip $dst_port"); - } else { - array_push($commands, "ufw deny proto $protocol from $src_ip $src_port to $dst_ip $dst_port"); - } - - } elseif ($record["outbound"] == 0) { - if ($protocol == "tcp/udp") { - array_push($commands, "ufw deny out proto udp from $network to any $dst_port"); - array_push($commands, "ufw deny out proto tcp from $network to any $dst_port"); - } else { - array_push($commands, "ufw deny out proto $protocol from $network to any $dst_port"); - } - }*/ - - - } - - /* - - $records = $app->db->queryAllRecords( - "SELECT - protocol, - IF - (src_from_port=src_to_port, src_from_port, CONCAT(src_from_port, ':',src_to_port)) - AS - src_port, - IF - (dst_from_port=dst_to_port, dst_from_port, CONCAT(dst_from_port, ':',dst_to_port)) - AS - dst_port, - IF - (src_ip='0.0.0.0','any',src_ip) - AS - src_ip, - IF - (dst_ip='0.0.0.0','any',dst_ip) - AS - dst_ip, - src_netmask, - dst_netmask, - inbound, - outbound, - active - FROM - firewall_filter - WHERE - inbound=1 - OR - outbound=1 - AND - active='y'"); - - - foreach ($records as $record) { - $src_netmask = $this->getCidr($record["src_netmask"]); - $dst_netmask = $this->getCidr($record["dst_netmask"]); - $src_port = ($record["src_port"] == "0:65535" ? "" : " port " .$record["src_port"]); - $dst_port = ($record["dst_port"] == "0:65535" ? "" : " port " . $record["dst_port"]); - $src_ip = ($record["src_ip"] == "any" ? "any" : $record["src_ip"] . "/" . $src_netmask); - $dst_ip = ($record["dst_ip"] == "any" ? "any" : $record["dst_ip"] . "/" . $dst_netmask); - $protocol = $record["protocol"]; - $outbound = ($record["outbound"] == 1 ? "out" : ""); - - - - if ($record["inbound"] == 1) { - if ($protocol == "tcp/udp") { - array_push($commands, "ufw allow proto udp from $src_ip $src_port to $dst_ip $dst_port"); - array_push($commands, "ufw allow proto tcp from $src_ip $src_port to $dst_ip $dst_port"); - } else { - array_push($commands, "ufw allow proto $protocol from $src_ip $src_port to $dst_ip $dst_port"); - } - - } elseif ($record["outbound"] == 1) { - if ($protocol == "tcp/udp") { - array_push($commands, "ufw allow out proto udp from $network to any $dst_port"); - array_push($commands, "ufw allow out proto tcp from $network to any $dst_port"); - } else { - array_push($commands, "ufw allow out proto $protocol from $network to any $dst_port"); - } - } - - - } - - foreach ($commands as $command) { - system($command); - } - */ - } - - function insert_forward($event_name,$data) { - global $app, $conf; - - $this->update_filter($event_name,$data); - - } - - function update_forward($event_name,$data) { - global $app, $conf; - - - - } - - //update server config - - function backupConfigs() - { - copy('/etc/default/ufw','/etc/default/ufw~'); - copy('/etc/ufw/ufw.conf','/etc/ufw/ufw.conf~'); - copy('/etc/ufw/before.rules','/etc/ufw/before.rules~'); - } - - function updateSettings($event_name,$data) { - global $app, $conf; - - // get the config - $app->uses("getconf"); - $server_config = $app->getconf->get_server_config($conf["server_id"], 'ufw'); - - - if(is_dir('/etc/ufw') && is_file('/etc/default/ufw')) { - $this->backupConfigs(); - - $app->load('tpl'); - - $ufw_tpl = new tpl(); - $ufw_tpl->newTemplate("ufw.conf.master"); - - $ufw_tpl->setVar('enable',($server_config["ufw_enable"] == "" ? "no" : $server_config["ufw_enable"])); - $ufw_tpl->setVar('log_level',$server_config["ufw_log_level"]); - - - file_put_contents('/etc/ufw/ufw.conf',$ufw_tpl->grab()); - unset($ufw_tpl); - - $app->log("Changed UFW settings",LOGLEVEL_DEBUG); - - $ufw_tpl = new tpl(); - $ufw_tpl->newTemplate("ufw.default.master"); - - $ufw_tpl->setVar('ipv6',$server_config["ufw_ipv6"] == "" ? "no" : $server_config["ufw_ipv6"]); - $ufw_tpl->setVar('default_input_policy',$server_config["ufw_default_input_policy"]); - $ufw_tpl->setVar('default_output_policy',$server_config["ufw_default_output_policy"]); - $ufw_tpl->setVar('default_forward_policy',$server_config["ufw_default_forward_policy"]); - $ufw_tpl->setVar('default_application_policy',$server_config["ufw_default_application_policy"]); - $ufw_tpl->setVar('manage_builtins',$server_config["ufw_manage_builtins"] == "" ? "no" : $server_config["ufw_manage_builtins"]); - - file_put_contents('/etc/default/ufw',$ufw_tpl->grab()); - unset($ufw_tpl); - - $app->log("Changed default UFW settings",LOGLEVEL_DEBUG); - - $app->services->restartServiceDelayed('ufw','--force-reload'); - - } else { - $app->log("Ubuntu Uncomplicated Firewall configuration not available for this linux distribution.",LOGLEVEL_DEBUG); - } - - } - - - - -} // end class - -class UFW { - - var $_delete = false; - var $_ufwCmd = "ufw"; - var $_inboundPolicy = "allow"; - var $_outboundPolicy = "allow"; - var $_protocol = "tcp"; - var $_ruleID = 1; - var $_srcIP; - var $_dstIP; - var $_srcPort; - var $_dstPort; - var $_network = "0.0.0.0/24"; - - function UFW() { - - } - - function setDelete($delete) { - $this->_delete = $delete; - } - - function setInboundPolicy($policy) { - $this->_inboundPolicy = $policy; - } - - function setOutboundPolicy($policy) { - $this->_outboundPolicy = $policy; - } - - function setProtocol($protocol) { - $this->_outboundPolicy = $protocol; - } - - function setRuleID($id) { - $this->_ruleID = $id; - } - - function setSrcIP($ip) { - $this->_srcIP = $ip; - } - - function setDstIP($ip) { - $this->_dstIP = $ip; - } - - function setSrcPort($port) { - $this->_srcPort = $port; - } - - function setDstPort($port) { - $this->_dstPort = $port; - } - - function setNetwork($network) { - $this->_network = $network; - } - - - function insert() { - $protocols = split("/",$this->_protocol); - foreach ($protocols as $protocol) { - $inbound = sprintf("ufw insert %s %s proto %s from %s port %s to %s port %s ", $this->_ruleID, $this->_inboundPolicy, $protocol, $this->_srcIP, $this->_srcPort, $this->_dstIP, $this->_dstPort); - $outbound = sprintf("ufw insert %s %s proto %s from %s port %s to %s port %s ", $this->_ruleID, $this->_outboundPolicy, $protocol, $this->_network, $this->_srcPort, $this->_dstIP, $this->_dstPort); - - echo $inbound."\n"; - echo $outbound."\n"; - system($inbound); - system($outbound); - } - } - - function delete() { - $protocols = split("/",$this->_protocol); - foreach ($protocols as $protocol) { - $inbound = sprintf("ufw delete %s proto %s from %s port %s to %s port %s ", $this->_ruleID, $this->_inboundPolicy, $protocol, $this->_srcIP, $this->_srcPort, $this->_dstIP, $this->_dstPort); - $outbound = sprintf("ufw delete %s proto %s from %s port %s to %s port %s ", $this->_ruleID, $this->_outboundPolicy, $protocol, $this->_network, $this->_srcPort, $this->_dstIP, $this->_dstPort); - - echo $inbound."\n"; - echo $outbound."\n"; - - system($inbound); - system($outbound); - } - } - -} - -?> +plugins->registerEvent('firewall_insert',$this->plugin_name,'insert_basic'); + $app->plugins->registerEvent('firewall_update',$this->plugin_name,'update_basic'); + $app->plugins->registerEvent('firewall_delete',$this->plugin_name,'update_basic'); + + $app->plugins->registerEvent('firewall_forward_insert',$this->plugin_name,'insert_forward'); + $app->plugins->registerEvent('firewall_forward_update',$this->plugin_name,'update_forward'); + $app->plugins->registerEvent('firewall_forward_delete',$this->plugin_name,'update_forward'); + + $app->plugins->registerEvent('firewall_filter_insert',$this->plugin_name,'insert_filter'); + $app->plugins->registerEvent('firewall_filter_update',$this->plugin_name,'update_filter'); + $app->plugins->registerEvent('firewall_filter_delete',$this->plugin_name,'delete_filter'); + + $app->plugins->registerEvent('server_insert',$this->plugin_name,'updateSettings'); + $app->plugins->registerEvent('server_update',$this->plugin_name,'updateSettings'); + + + + } + + + function insert_basic($event_name,$data) { + global $app, $conf; + + $this->update_basic($event_name,$data); + + } + + function update_basic($event_name,$data) { + global $app, $conf; + + $tcp_ports = ''; + $udp_ports = ''; + + $delete_rule = ($data["new"]["active"] == "n" ? "delete " : ""); + /* + $ports = explode(',',$data["new"]["tcp_port"]); + if(is_array($ports)) { + foreach($ports as $p) { + if(strstr($p,':')) { + $p_parts = explode(':',$p); + $p_clean = intval($p_parts[0]).':'.intval($p_parts[1]); + } else { + $p_clean = intval($p); + } + + //system("ufw $delete_rule allow " . $p_clean . "/tcp"); + + } + }*/ + + system("ufw $delete_rule allow out" . $data["new"]["tcp_port"] . "/tcp"); + system("ufw $delete_rule allow in" . $data["new"]["tcp_port"] . "/tcp"); + system("ufw $delete_rule allow out" . $data["new"]["udp_port"] . "/udp"); + system("ufw $delete_rule allow in" . $data["new"]["udp_port"] . "/udp"); + //$tcp_ports = trim($tcp_ports); + /* + $ports = explode(',',$data["new"]["udp_port"]); + if(is_array($ports)) { + foreach($ports as $p) { + if(strstr($p,':')) { + $p_parts = explode(':',$p); + $p_clean = intval($p_parts[0]).':'.intval($p_parts[1]); + } else { + $p_clean = intval($p); + } + + + } + } + + system("ufw $delete_rule allow " . $p_clean . "/udp"); + */ + + if($data["new"]["active"] == 'y') { + exec('/etc/init.d/ufw force-reload'); + $app->log('Restarting the firewall',LOGLEVEL_DEBUG); + } else { + exec('/etc/init.d/ufw force-reload'); + $app->log('Flushing the firewall',LOGLEVEL_DEBUG); + } + + + } + + + function insert_filter($event_name,$data) { + global $app, $conf; + + $this->update_filter($event_name,$data); + + } + + function getCidr($mask) { + $long = ip2long($mask); + $base = ip2long('255.255.255.255'); + return 32-log(($long ^ $base)+1,2); + } + + function update_filter($event_name,$data) { + global $app, $conf; + + $app->uses("getconf"); + $server_config = $app->getconf->get_server_config($conf["server_id"], 'ufw'); + $network = $server_config["ufw_network"]; + + $records = $app->db->queryAllRecords( + "SELECT + protocol, + IF + (src_from_port=src_to_port, src_from_port, CONCAT(src_from_port, ':',src_to_port)) + AS + src_port, + IF + (dst_from_port=dst_to_port, dst_from_port, CONCAT(dst_from_port, ':',dst_to_port)) + AS + dst_port, + IF + (src_ip='0.0.0.0','any',src_ip) + AS + src_ip, + IF + (dst_ip='0.0.0.0','any',dst_ip) + AS + dst_ip, + src_netmask, + dst_netmask, + inbound_policy, + outbound_policy, + rule_id, + active + FROM + firewall_filter + ORDER BY + rule_id + ASC"); + + $commands = array(); + foreach ($records as $record) { + $src_netmask = $this->getCidr($record["src_netmask"]); + $dst_netmask = $this->getCidr($record["dst_netmask"]); + $src_port = ($record["src_port"] == "0:65535" ? "" : " port " .$record["src_port"]); + $dst_port = ($record["dst_port"] == "0:65535" ? "" : " port " . $record["dst_port"]); + $src_ip = ($record["src_ip"] == "any" ? "any" : $record["src_ip"] . "/" . $src_netmask); + $dst_ip = ($record["dst_ip"] == "any" ? "any" : $record["dst_ip"] . "/" . $dst_netmask); + //$protocol = $record["protocol"]; + $delete = ($record["active"] == "n" ? true : false); + //$protocols = array_split($record["protocol"]); + //$inbound = ($record["inbound"] == 0 ? "deny " : "allow"); + //$outbound = ($record["outbound"] == 0 ? "deny out" : "allow out"); + + //foreach ($protocols as $protocol) { + + + $ufw = new UFW(); + //$ufw->setDelete($record["active"] == "n"); + $ufw->setRuleID($record["rule_id"]); + $ufw->setSrcIP($src_ip); + $ufw->setDstIP($dst_ip); + $ufw->setSrcPort($src_port); + $ufw->setDstPort($dst_port); + $ufw->setInboundPolicy($record["inbound_policy"]); + $ufw->setOutboundPolicy($record["outbound_policy"]); + $ufw->setProtocol($record["protocol"]); + $ufw->setNetwork($network); + + if ($delete) { + $ufw->delete(); + } else { + $ufw->insert(); + } + //} + + /* + if ($record["active"] == 'n') { + $inbound = ($record["inbound"] == 0 ? "deny " : "allow"); + $outbound = ($record["outbound"] == 0 ? "deny out" : "allow out"); + array_push($commands, "ufw deny proto udp from $src_ip $src_port to $dst_ip $dst_port"); + if ($protocol == "tcp/udp") { + array_push($commands, "ufw delete $inbound proto udp from $src_ip $src_port to $dst_ip $dst_port"); + array_push($commands, "ufw delete $outbound proto udp from $src_ip $src_port to $dst_ip $dst_port"); + array_push($commands, "ufw delete $inbound proto tcp from $src_ip $src_port to $dst_ip $dst_port"); + array_push($commands, "ufw delete $outbound proto tcp from $src_ip $src_port to $dst_ip $dst_port"); + } else { + array_push($commands, "ufw delete $inbound proto $protocol from $src_ip $src_port to $dst_ip $dst_port"); + array_push($commands, "ufw delete $outbound proto $protocol from $src_ip $src_port to $dst_ip $dst_port"); + } + } elseif ($record["inbound"] == 0) { + if ($protocol == "tcp/udp") { + array_push($commands, "ufw deny proto udp from $src_ip $src_port to $dst_ip $dst_port"); + array_push($commands, "ufw deny proto tcp from $src_ip $src_port to $dst_ip $dst_port"); + } else { + array_push($commands, "ufw deny proto $protocol from $src_ip $src_port to $dst_ip $dst_port"); + } + + } elseif ($record["outbound"] == 0) { + if ($protocol == "tcp/udp") { + array_push($commands, "ufw deny out proto udp from $network to any $dst_port"); + array_push($commands, "ufw deny out proto tcp from $network to any $dst_port"); + } else { + array_push($commands, "ufw deny out proto $protocol from $network to any $dst_port"); + } + }*/ + + + } + + /* + + $records = $app->db->queryAllRecords( + "SELECT + protocol, + IF + (src_from_port=src_to_port, src_from_port, CONCAT(src_from_port, ':',src_to_port)) + AS + src_port, + IF + (dst_from_port=dst_to_port, dst_from_port, CONCAT(dst_from_port, ':',dst_to_port)) + AS + dst_port, + IF + (src_ip='0.0.0.0','any',src_ip) + AS + src_ip, + IF + (dst_ip='0.0.0.0','any',dst_ip) + AS + dst_ip, + src_netmask, + dst_netmask, + inbound, + outbound, + active + FROM + firewall_filter + WHERE + inbound=1 + OR + outbound=1 + AND + active='y'"); + + + foreach ($records as $record) { + $src_netmask = $this->getCidr($record["src_netmask"]); + $dst_netmask = $this->getCidr($record["dst_netmask"]); + $src_port = ($record["src_port"] == "0:65535" ? "" : " port " .$record["src_port"]); + $dst_port = ($record["dst_port"] == "0:65535" ? "" : " port " . $record["dst_port"]); + $src_ip = ($record["src_ip"] == "any" ? "any" : $record["src_ip"] . "/" . $src_netmask); + $dst_ip = ($record["dst_ip"] == "any" ? "any" : $record["dst_ip"] . "/" . $dst_netmask); + $protocol = $record["protocol"]; + $outbound = ($record["outbound"] == 1 ? "out" : ""); + + + + if ($record["inbound"] == 1) { + if ($protocol == "tcp/udp") { + array_push($commands, "ufw allow proto udp from $src_ip $src_port to $dst_ip $dst_port"); + array_push($commands, "ufw allow proto tcp from $src_ip $src_port to $dst_ip $dst_port"); + } else { + array_push($commands, "ufw allow proto $protocol from $src_ip $src_port to $dst_ip $dst_port"); + } + + } elseif ($record["outbound"] == 1) { + if ($protocol == "tcp/udp") { + array_push($commands, "ufw allow out proto udp from $network to any $dst_port"); + array_push($commands, "ufw allow out proto tcp from $network to any $dst_port"); + } else { + array_push($commands, "ufw allow out proto $protocol from $network to any $dst_port"); + } + } + + + } + + foreach ($commands as $command) { + system($command); + } + */ + } + + function insert_forward($event_name,$data) { + global $app, $conf; + + $this->update_filter($event_name,$data); + + } + + function update_forward($event_name,$data) { + global $app, $conf; + + + + } + + //update server config + + function backupConfigs() + { + copy('/etc/default/ufw','/etc/default/ufw~'); + copy('/etc/ufw/ufw.conf','/etc/ufw/ufw.conf~'); + copy('/etc/ufw/before.rules','/etc/ufw/before.rules~'); + } + + function updateSettings($event_name,$data) { + global $app, $conf; + + // get the config + $app->uses("getconf"); + $server_config = $app->getconf->get_server_config($conf["server_id"], 'ufw'); + + + if(is_dir('/etc/ufw') && is_file('/etc/default/ufw')) { + $this->backupConfigs(); + + $app->load('tpl'); + + $ufw_tpl = new tpl(); + $ufw_tpl->newTemplate("ufw.conf.master"); + + $ufw_tpl->setVar('enable',($server_config["ufw_enable"] == "" ? "no" : $server_config["ufw_enable"])); + $ufw_tpl->setVar('log_level',$server_config["ufw_log_level"]); + + + file_put_contents('/etc/ufw/ufw.conf',$ufw_tpl->grab()); + unset($ufw_tpl); + + $app->log("Changed UFW settings",LOGLEVEL_DEBUG); + + $ufw_tpl = new tpl(); + $ufw_tpl->newTemplate("ufw.default.master"); + + $ufw_tpl->setVar('ipv6',$server_config["ufw_ipv6"] == "" ? "no" : $server_config["ufw_ipv6"]); + $ufw_tpl->setVar('default_input_policy',$server_config["ufw_default_input_policy"]); + $ufw_tpl->setVar('default_output_policy',$server_config["ufw_default_output_policy"]); + $ufw_tpl->setVar('default_forward_policy',$server_config["ufw_default_forward_policy"]); + $ufw_tpl->setVar('default_application_policy',$server_config["ufw_default_application_policy"]); + $ufw_tpl->setVar('manage_builtins',$server_config["ufw_manage_builtins"] == "" ? "no" : $server_config["ufw_manage_builtins"]); + + file_put_contents('/etc/default/ufw',$ufw_tpl->grab()); + unset($ufw_tpl); + + $app->log("Changed default UFW settings",LOGLEVEL_DEBUG); + + $app->services->restartServiceDelayed('ufw','--force-reload'); + + } else { + $app->log("Ubuntu Uncomplicated Firewall configuration not available for this linux distribution.",LOGLEVEL_DEBUG); + } + + } + + + + +} // end class + +class UFW { + + var $_delete = false; + var $_ufwCmd = "ufw"; + var $_inboundPolicy = "allow"; + var $_outboundPolicy = "allow"; + var $_protocol = "tcp"; + var $_ruleID = 1; + var $_srcIP; + var $_dstIP; + var $_srcPort; + var $_dstPort; + var $_network = "0.0.0.0/24"; + + function UFW() { + + } + + function setDelete($delete) { + $this->_delete = $delete; + } + + function setInboundPolicy($policy) { + $this->_inboundPolicy = $policy; + } + + function setOutboundPolicy($policy) { + $this->_outboundPolicy = $policy; + } + + function setProtocol($protocol) { + $this->_outboundPolicy = $protocol; + } + + function setRuleID($id) { + $this->_ruleID = $id; + } + + function setSrcIP($ip) { + $this->_srcIP = $ip; + } + + function setDstIP($ip) { + $this->_dstIP = $ip; + } + + function setSrcPort($port) { + $this->_srcPort = $port; + } + + function setDstPort($port) { + $this->_dstPort = $port; + } + + function setNetwork($network) { + $this->_network = $network; + } + + + function insert() { + $protocols = split("/",$this->_protocol); + foreach ($protocols as $protocol) { + $inbound = sprintf("ufw insert %s %s proto %s from %s port %s to %s port %s ", $this->_ruleID, $this->_inboundPolicy, $protocol, $this->_srcIP, $this->_srcPort, $this->_dstIP, $this->_dstPort); + $outbound = sprintf("ufw insert %s %s proto %s from %s port %s to %s port %s ", $this->_ruleID, $this->_outboundPolicy, $protocol, $this->_network, $this->_srcPort, $this->_dstIP, $this->_dstPort); + + echo $inbound."\n"; + echo $outbound."\n"; + system($inbound); + system($outbound); + } + } + + function delete() { + $protocols = split("/",$this->_protocol); + foreach ($protocols as $protocol) { + $inbound = sprintf("ufw delete %s proto %s from %s port %s to %s port %s ", $this->_ruleID, $this->_inboundPolicy, $protocol, $this->_srcIP, $this->_srcPort, $this->_dstIP, $this->_dstPort); + $outbound = sprintf("ufw delete %s proto %s from %s port %s to %s port %s ", $this->_ruleID, $this->_outboundPolicy, $protocol, $this->_network, $this->_srcPort, $this->_dstIP, $this->_dstPort); + + echo $inbound."\n"; + echo $outbound."\n"; + + system($inbound); + system($outbound); + } + } + +} + +?>