This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 2.x development tree".
The branch, next has been updated via cc864e3d122974f55a88347dbb58f2a469287ec3 (commit) via 9755fdf9d21d70767e208a7499fc798c5899dbbe (commit) via cf07214a9c18701bd82e1c8b602bd74e8e52fcf2 (commit) via b3f7628a9f4e6e72be3c0395150120a1814bbb7f (commit) via 9c5dbb24e044a31b54689ad26552301153c67891 (commit) via 391a24591e67e4361fc8b84272d2b381d9d8357e (commit) via 445c4ccd1eb34f038deeb73e38d3e775e53d8189 (commit) via ccf13cc9db7f98224b0c82e43dbe71eab449214b (commit) via a920fdc343fa2b681f7ace9b64274e746cd120ef (commit) via 78b65ea7e39c89573b7bf60c5d55b925363de832 (commit) via dcbdc8f587a34e2790ac1e9caa7e804063d61a33 (commit) via ab88da11a6a6f69f68c84031ea084778607edb37 (commit) via 429f48bd38805d3ea624a94ff33ade4834d9ebf5 (commit) via 0f8251fe64dd8d799713e0f42cc01785f5ce2bc9 (commit) via abbec6069a551bc3dffd27ef7e0eaa53b0ba2412 (commit) from 822d70e10258829ac636e253c1ae78d464c22d9d (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit cc864e3d122974f55a88347dbb58f2a469287ec3 Author: Stephan Feddersen sfeddersen@ipfire.org Date: Sun Jun 28 12:48:59 2020 +0200
WIO - shutdown function removed, adjustments to IPsec status display
Signed-off-by: Arne Fitzenreiter arne_f@ipfire.org
commit 9755fdf9d21d70767e208a7499fc798c5899dbbe Author: Stephan Feddersen sfeddersen@ipfire.org Date: Sun Jun 28 12:47:54 2020 +0200
WIO - shutdown function removed, adjustments to IPsec status display
Signed-off-by: Arne Fitzenreiter arne_f@ipfire.org
commit cf07214a9c18701bd82e1c8b602bd74e8e52fcf2 Author: Stephan Feddersen sfeddersen@ipfire.org Date: Sun Jun 28 12:47:01 2020 +0200
WIO - shutdown function removed, adjustments to IPsec status display
Signed-off-by: Arne Fitzenreiter arne_f@ipfire.org
commit b3f7628a9f4e6e72be3c0395150120a1814bbb7f Author: Stephan Feddersen sfeddersen@ipfire.org Date: Sun Jun 28 12:45:41 2020 +0200
WIO - hutdown function removed, adjustments to IPsec status display
Signed-off-by: Arne Fitzenreiter arne_f@ipfire.org
commit 9c5dbb24e044a31b54689ad26552301153c67891 Author: Stephan Feddersen sfeddersen@ipfire.org Date: Sun Jun 28 12:44:18 2020 +0200
WIO - shutdown function removed, adjustments to IPsec status display
Signed-off-by: Arne Fitzenreiter arne_f@ipfire.org
commit 391a24591e67e4361fc8b84272d2b381d9d8357e Author: Stephan Feddersen sfeddersen@ipfire.org Date: Sun Jun 28 12:41:55 2020 +0200
WIO - shutdown function removed, adjustments to IPsec status display
Signed-off-by: Arne Fitzenreiter arne_f@ipfire.org
commit 445c4ccd1eb34f038deeb73e38d3e775e53d8189 Author: Stephan Feddersen sfeddersen@ipfire.org Date: Sun Jun 28 12:34:18 2020 +0200
WIO - cleaned up language files
Signed-off-by: Arne Fitzenreiter arne_f@ipfire.org
commit ccf13cc9db7f98224b0c82e43dbe71eab449214b Author: Stephan Feddersen sfeddersen@ipfire.org Date: Sun Jun 28 12:29:26 2020 +0200
WIO - new version 1.3.2-9
Signed-off-by: Arne Fitzenreiter arne_f@ipfire.org
commit a920fdc343fa2b681f7ace9b64274e746cd120ef Author: Arne Fitzenreiter arne_f@ipfire.org Date: Wed Jul 1 12:17:11 2020 +0000
remove nf_log_ipv4 from sysctl.conf
the revert commit has failed and sysctl.conf should still shipped to fix machines in next tree.
Signed-off-by: Arne Fitzenreiter arne_f@ipfire.org
commit 78b65ea7e39c89573b7bf60c5d55b925363de832 Author: Michael Tremer michael.tremer@ipfire.org Date: Mon Jun 29 14:53:17 2020 +0000
firewall: Configure TRACE target to log to syslog
Signed-off-by: Michael Tremer michael.tremer@ipfire.org Signed-off-by: Arne Fitzenreiter arne_f@ipfire.org
commit dcbdc8f587a34e2790ac1e9caa7e804063d61a33 Author: Arne Fitzenreiter arne_f@ipfire.org Date: Wed Jul 1 12:11:51 2020 +0000
core147: add ntp
Signed-off-by: Arne Fitzenreiter arne_f@ipfire.org
commit ab88da11a6a6f69f68c84031ea084778607edb37 Author: Matthias Fischer matthias.fischer@ipfire.org Date: Sun Jun 28 09:01:33 2020 +0200
ntp: Update to 4.2.8p15
For details see: http://support.ntp.org/bin/view/Main/SecurityNotice#June_2020_ntp_4_2_8p15_N...
Signed-off-by: Matthias Fischer matthias.fischer@ipfire.org Reviewed-by: Michael Tremer michael.tremer@ipfire.org Signed-off-by: Arne Fitzenreiter arne_f@ipfire.org
commit 429f48bd38805d3ea624a94ff33ade4834d9ebf5 Author: Arne Fitzenreiter arne_f@ipfire.org Date: Wed Jul 1 12:09:45 2020 +0000
core147: add proxy.cgi
Signed-off-by: Arne Fitzenreiter arne_f@ipfire.org
commit 0f8251fe64dd8d799713e0f42cc01785f5ce2bc9 Author: Peter Müller peter.mueller@ipfire.org Date: Sun Jun 21 10:57:29 2020 +0000
Revert "proxy: Remove AUTH_IPCACHE_TTL"
This reverts commit dc637f087fe07ab26ae1dee00133da69bab5e6a1.
Rationale: "authenticate_ip_ttl" can be safely used as it does not introduces an authentication bypass, but saves relationships between successfully authenticated users and their IP addresses.
"max_user_ip" depends on such an authentication cache, so credential sharing between several IPs (on purpose or by chance) can be detected properly. This is useful in case of crompromised machines and/or attackers in internal networks having stolen proxy authentication credentials.
Quoted from squid.conf.documented or man 5 squid.conf:
> acl aclname max_user_ip [-s] number > # This will be matched when the user attempts to log in from more > # than <number> different ip addresses. The authenticate_ip_ttl > # parameter controls the timeout on the ip entries. [fast] > # If -s is specified the limit is strict, denying browsing > # from any further IP addresses until the ttl has expired. Without > # -s Squid will just annoy the user by "randomly" denying requests. > # (the counter is reset each time the limit is reached and a > # request is denied) > # NOTE: in acceleration mode or where there is mesh of child proxies, > # clients may appear to come from multiple addresses if they are > # going through proxy farms, so a limit of 1 may cause user problems.
Fixes: #11994
Cc: Michael Tremer michael.tremer@ipfire.org Signed-off-by: Peter Müller peter.mueller@ipfire.org Signed-off-by: Arne Fitzenreiter arne_f@ipfire.org
commit abbec6069a551bc3dffd27ef7e0eaa53b0ba2412 Author: Peter Müller peter.mueller@ipfire.org Date: Sun Jun 21 10:57:00 2020 +0000
proxy.cgi: remove old CVS licence clutter
Signed-off-by: Peter Müller peter.mueller@ipfire.org Signed-off-by: Arne Fitzenreiter arne_f@ipfire.org
-----------------------------------------------------------------------
Summary of changes: config/etc/sysctl.conf | 3 - config/rootfiles/core/147/filelists/files | 1 + .../{oldcore/100 => core/147}/filelists/ntp | 0 doc/language_issues.de | 3 - doc/language_issues.en | 2 + doc/language_issues.es | 7 +- doc/language_issues.fr | 3 - doc/language_issues.it | 3 - doc/language_issues.nl | 3 - doc/language_issues.pl | 7 +- doc/language_issues.ru | 5 +- doc/language_issues.tr | 3 - html/cgi-bin/proxy.cgi | 35 +-- lfs/ntp | 6 +- lfs/wio | 2 +- src/initscripts/system/firewall | 4 + src/wio/lang/wio.de.pl | 19 +- src/wio/lang/wio.en.pl | 19 +- src/wio/lang/wio.fr.pl | 21 +- src/wio/lang/wio.tr.pl | 15 +- src/wio/main/wio.pl | 56 +--- src/wio/main/wiovpn.pl | 50 ++-- src/wio/wio-graphs.pl | 97 +++---- src/wio/wio-lib.pl | 23 +- src/wio/wio.cgi | 316 +++++++++++---------- src/wio/wiographs.cgi | 6 +- 26 files changed, 317 insertions(+), 392 deletions(-) copy config/rootfiles/{oldcore/100 => core/147}/filelists/ntp (100%)
Difference in files: diff --git a/config/etc/sysctl.conf b/config/etc/sysctl.conf index 98a0dbe63..7e7ebee44 100644 --- a/config/etc/sysctl.conf +++ b/config/etc/sysctl.conf @@ -34,9 +34,6 @@ net.ipv6.conf.default.disable_ipv6 = 1 # Enable netfilter accounting net.netfilter.nf_conntrack_acct=1
-# Enable TRACE logging to syslog -net.netfilter.nf_log.2=nf_log_ipv4 - # Disable netfilter on bridges. net.bridge.bridge-nf-call-ip6tables = 0 net.bridge.bridge-nf-call-iptables = 0 diff --git a/config/rootfiles/core/147/filelists/files b/config/rootfiles/core/147/filelists/files index fe33d7d71..3c758bee9 100644 --- a/config/rootfiles/core/147/filelists/files +++ b/config/rootfiles/core/147/filelists/files @@ -11,5 +11,6 @@ etc/rc.d/init.d/networking/any etc/rc.d/init.d/networking/red etc/rc.d/init.d/partresize etc/sysctl.conf +srv/web/ipfire/cgi-bin/proxy.cgi var/ipfire/header.pl var/ipfire/general-functions.pl diff --git a/config/rootfiles/core/147/filelists/ntp b/config/rootfiles/core/147/filelists/ntp new file mode 120000 index 000000000..7542d86cb --- /dev/null +++ b/config/rootfiles/core/147/filelists/ntp @@ -0,0 +1 @@ +../../../common/ntp \ No newline at end of file diff --git a/doc/language_issues.de b/doc/language_issues.de index 2dc986d0a..f2d628d51 100644 --- a/doc/language_issues.de +++ b/doc/language_issues.de @@ -48,7 +48,6 @@ WARNING: translation string unused: admin user password has been changed WARNING: translation string unused: administrator user password WARNING: translation string unused: adsl settings WARNING: translation string unused: advproxy AUTH method ntlm -WARNING: translation string unused: advproxy AUTH user IP cache TTL WARNING: translation string unused: advproxy LDAP auth WARNING: translation string unused: advproxy NTLM BDC hostname WARNING: translation string unused: advproxy NTLM PDC hostname @@ -73,8 +72,6 @@ WARNING: translation string unused: advproxy chgwebpwd new password WARNING: translation string unused: advproxy chgwebpwd new password confirm WARNING: translation string unused: advproxy chgwebpwd old password WARNING: translation string unused: advproxy chgwebpwd username -WARNING: translation string unused: advproxy content based throttling -WARNING: translation string unused: advproxy errmsg auth ipcache ttl WARNING: translation string unused: advproxy errmsg change fail WARNING: translation string unused: advproxy errmsg change success WARNING: translation string unused: advproxy errmsg invalid bdc diff --git a/doc/language_issues.en b/doc/language_issues.en index 88fa6ed79..76c4237d4 100644 --- a/doc/language_issues.en +++ b/doc/language_issues.en @@ -128,6 +128,7 @@ WARNING: untranslated string: advproxy AUTH method radius = RADIUS WARNING: untranslated string: advproxy AUTH no auth = Domains without authentication (one per line) WARNING: untranslated string: advproxy AUTH number of auth processes = Number of authentication processes WARNING: untranslated string: advproxy AUTH realm = Authentication realm prompt +WARNING: untranslated string: advproxy AUTH user IP cache TTL = User/IP cache TTL (in minutes) WARNING: untranslated string: advproxy IDENT authorized users = Authorized users (one per line) WARNING: untranslated string: advproxy IDENT aware hosts = Ident aware hosts (one per line) WARNING: untranslated string: advproxy IDENT identd settings = Common identd settings @@ -206,6 +207,7 @@ WARNING: untranslated string: advproxy errmsg acl cannot be empty = Access contr WARNING: untranslated string: advproxy errmsg auth cache ttl = Invalid value for authentication cache TTL WARNING: untranslated string: advproxy errmsg auth children = Invalid number of authentication processes WARNING: untranslated string: advproxy errmsg auth ipcache may not be null = Authentication cache TTL may not be 0 when using IP address limits +WARNING: untranslated string: advproxy errmsg auth ipcache ttl = Invalid value for user/IP cache TTL WARNING: untranslated string: advproxy errmsg cache = The RAM cache size is greater than the harddisk cache size: WARNING: untranslated string: advproxy errmsg hdd cache size = Invalid value for harddisk cache size (min 10 MB required) WARNING: untranslated string: advproxy errmsg ident timeout = Invalid ident timeout diff --git a/doc/language_issues.es b/doc/language_issues.es index ef78d6680..4d74fe91b 100644 --- a/doc/language_issues.es +++ b/doc/language_issues.es @@ -24,7 +24,6 @@ WARNING: translation string unused: add xtaccess WARNING: translation string unused: add-route WARNING: translation string unused: admin user password has been changed WARNING: translation string unused: administrator user password -WARNING: translation string unused: advproxy AUTH user IP cache TTL WARNING: translation string unused: advproxy LDAP auth WARNING: translation string unused: advproxy NTLM BDC hostname WARNING: translation string unused: advproxy NTLM PDC hostname @@ -49,8 +48,6 @@ WARNING: translation string unused: advproxy chgwebpwd new password WARNING: translation string unused: advproxy chgwebpwd new password confirm WARNING: translation string unused: advproxy chgwebpwd old password WARNING: translation string unused: advproxy chgwebpwd username -WARNING: translation string unused: advproxy content based throttling -WARNING: translation string unused: advproxy errmsg auth ipcache ttl WARNING: translation string unused: advproxy errmsg change fail WARNING: translation string unused: advproxy errmsg change success WARNING: translation string unused: advproxy errmsg invalid bdc @@ -900,7 +897,7 @@ WARNING: untranslated string: fireinfo please enable = Please enable the fireinf WARNING: untranslated string: fireinfo settings = Fireinfo settings WARNING: untranslated string: fireinfo system version = System versions WARNING: untranslated string: fireinfo why descr1 = It is very important for the development of IPFire that you enable this -WARNING: untranslated string: fireinfo why descr2 = service. +WARNING: untranslated string: fireinfo why descr2 = service. WARNING: untranslated string: fireinfo why enable = Why should I enable fireinfo? WARNING: untranslated string: fireinfo why read more = Read more about the reasons. WARNING: untranslated string: fireinfo your profile id = Your profile ID @@ -958,7 +955,7 @@ WARNING: untranslated string: fwdfw err tgt_port = Invalid destination port. WARNING: untranslated string: fwdfw err time = You have to select at least one day. WARNING: untranslated string: fwdfw external port nat = External port (NAT) WARNING: untranslated string: fwdfw hint ip1 = The last generated rule may never match, because source and destination subnets may overlap. -WARNING: untranslated string: fwdfw hint ip2 = Please double-check if this rule makes sense: +WARNING: untranslated string: fwdfw hint ip2 = Please double-check if this rule makes sense: WARNING: untranslated string: fwdfw hint mac = The destination group contains MAC addresses, which will be skipped during rule creation. WARNING: untranslated string: fwdfw iface = Interface WARNING: untranslated string: fwdfw limitconcon = Limit concurrent connections per IP address diff --git a/doc/language_issues.fr b/doc/language_issues.fr index fd10b171e..c5953d5ba 100644 --- a/doc/language_issues.fr +++ b/doc/language_issues.fr @@ -52,7 +52,6 @@ WARNING: translation string unused: admin user password has been changed WARNING: translation string unused: administrator user password WARNING: translation string unused: adsl settings WARNING: translation string unused: advproxy AUTH method ntlm -WARNING: translation string unused: advproxy AUTH user IP cache TTL WARNING: translation string unused: advproxy LDAP auth WARNING: translation string unused: advproxy NTLM BDC hostname WARNING: translation string unused: advproxy NTLM PDC hostname @@ -77,8 +76,6 @@ WARNING: translation string unused: advproxy chgwebpwd new password WARNING: translation string unused: advproxy chgwebpwd new password confirm WARNING: translation string unused: advproxy chgwebpwd old password WARNING: translation string unused: advproxy chgwebpwd username -WARNING: translation string unused: advproxy content based throttling -WARNING: translation string unused: advproxy errmsg auth ipcache ttl WARNING: translation string unused: advproxy errmsg change fail WARNING: translation string unused: advproxy errmsg change success WARNING: translation string unused: advproxy errmsg invalid bdc diff --git a/doc/language_issues.it b/doc/language_issues.it index 16ff776b5..059c73a59 100644 --- a/doc/language_issues.it +++ b/doc/language_issues.it @@ -26,7 +26,6 @@ WARNING: translation string unused: add-route WARNING: translation string unused: admin user password has been changed WARNING: translation string unused: administrator user password WARNING: translation string unused: advproxy AUTH method ntlm -WARNING: translation string unused: advproxy AUTH user IP cache TTL WARNING: translation string unused: advproxy LDAP auth WARNING: translation string unused: advproxy NTLM BDC hostname WARNING: translation string unused: advproxy NTLM PDC hostname @@ -51,8 +50,6 @@ WARNING: translation string unused: advproxy chgwebpwd new password WARNING: translation string unused: advproxy chgwebpwd new password confirm WARNING: translation string unused: advproxy chgwebpwd old password WARNING: translation string unused: advproxy chgwebpwd username -WARNING: translation string unused: advproxy content based throttling -WARNING: translation string unused: advproxy errmsg auth ipcache ttl WARNING: translation string unused: advproxy errmsg change fail WARNING: translation string unused: advproxy errmsg change success WARNING: translation string unused: advproxy errmsg invalid bdc diff --git a/doc/language_issues.nl b/doc/language_issues.nl index 328a8e1f2..8a79baa83 100644 --- a/doc/language_issues.nl +++ b/doc/language_issues.nl @@ -25,7 +25,6 @@ WARNING: translation string unused: add xtaccess WARNING: translation string unused: add-route WARNING: translation string unused: admin user password has been changed WARNING: translation string unused: administrator user password -WARNING: translation string unused: advproxy AUTH user IP cache TTL WARNING: translation string unused: advproxy LDAP auth WARNING: translation string unused: advproxy NTLM BDC hostname WARNING: translation string unused: advproxy NTLM PDC hostname @@ -50,8 +49,6 @@ WARNING: translation string unused: advproxy chgwebpwd new password WARNING: translation string unused: advproxy chgwebpwd new password confirm WARNING: translation string unused: advproxy chgwebpwd old password WARNING: translation string unused: advproxy chgwebpwd username -WARNING: translation string unused: advproxy content based throttling -WARNING: translation string unused: advproxy errmsg auth ipcache ttl WARNING: translation string unused: advproxy errmsg change fail WARNING: translation string unused: advproxy errmsg change success WARNING: translation string unused: advproxy errmsg invalid bdc diff --git a/doc/language_issues.pl b/doc/language_issues.pl index ef78d6680..4d74fe91b 100644 --- a/doc/language_issues.pl +++ b/doc/language_issues.pl @@ -24,7 +24,6 @@ WARNING: translation string unused: add xtaccess WARNING: translation string unused: add-route WARNING: translation string unused: admin user password has been changed WARNING: translation string unused: administrator user password -WARNING: translation string unused: advproxy AUTH user IP cache TTL WARNING: translation string unused: advproxy LDAP auth WARNING: translation string unused: advproxy NTLM BDC hostname WARNING: translation string unused: advproxy NTLM PDC hostname @@ -49,8 +48,6 @@ WARNING: translation string unused: advproxy chgwebpwd new password WARNING: translation string unused: advproxy chgwebpwd new password confirm WARNING: translation string unused: advproxy chgwebpwd old password WARNING: translation string unused: advproxy chgwebpwd username -WARNING: translation string unused: advproxy content based throttling -WARNING: translation string unused: advproxy errmsg auth ipcache ttl WARNING: translation string unused: advproxy errmsg change fail WARNING: translation string unused: advproxy errmsg change success WARNING: translation string unused: advproxy errmsg invalid bdc @@ -900,7 +897,7 @@ WARNING: untranslated string: fireinfo please enable = Please enable the fireinf WARNING: untranslated string: fireinfo settings = Fireinfo settings WARNING: untranslated string: fireinfo system version = System versions WARNING: untranslated string: fireinfo why descr1 = It is very important for the development of IPFire that you enable this -WARNING: untranslated string: fireinfo why descr2 = service. +WARNING: untranslated string: fireinfo why descr2 = service. WARNING: untranslated string: fireinfo why enable = Why should I enable fireinfo? WARNING: untranslated string: fireinfo why read more = Read more about the reasons. WARNING: untranslated string: fireinfo your profile id = Your profile ID @@ -958,7 +955,7 @@ WARNING: untranslated string: fwdfw err tgt_port = Invalid destination port. WARNING: untranslated string: fwdfw err time = You have to select at least one day. WARNING: untranslated string: fwdfw external port nat = External port (NAT) WARNING: untranslated string: fwdfw hint ip1 = The last generated rule may never match, because source and destination subnets may overlap. -WARNING: untranslated string: fwdfw hint ip2 = Please double-check if this rule makes sense: +WARNING: untranslated string: fwdfw hint ip2 = Please double-check if this rule makes sense: WARNING: untranslated string: fwdfw hint mac = The destination group contains MAC addresses, which will be skipped during rule creation. WARNING: untranslated string: fwdfw iface = Interface WARNING: untranslated string: fwdfw limitconcon = Limit concurrent connections per IP address diff --git a/doc/language_issues.ru b/doc/language_issues.ru index 0a579d406..d435f0437 100644 --- a/doc/language_issues.ru +++ b/doc/language_issues.ru @@ -25,7 +25,6 @@ WARNING: translation string unused: add xtaccess WARNING: translation string unused: add-route WARNING: translation string unused: admin user password has been changed WARNING: translation string unused: administrator user password -WARNING: translation string unused: advproxy AUTH user IP cache TTL WARNING: translation string unused: advproxy LDAP auth WARNING: translation string unused: advproxy NTLM BDC hostname WARNING: translation string unused: advproxy NTLM PDC hostname @@ -50,8 +49,6 @@ WARNING: translation string unused: advproxy chgwebpwd new password WARNING: translation string unused: advproxy chgwebpwd new password confirm WARNING: translation string unused: advproxy chgwebpwd old password WARNING: translation string unused: advproxy chgwebpwd username -WARNING: translation string unused: advproxy content based throttling -WARNING: translation string unused: advproxy errmsg auth ipcache ttl WARNING: translation string unused: advproxy errmsg change fail WARNING: translation string unused: advproxy errmsg change success WARNING: translation string unused: advproxy errmsg invalid bdc @@ -952,7 +949,7 @@ WARNING: untranslated string: fwdfw err tgt_port = Invalid destination port. WARNING: untranslated string: fwdfw err time = You have to select at least one day. WARNING: untranslated string: fwdfw external port nat = External port (NAT) WARNING: untranslated string: fwdfw hint ip1 = The last generated rule may never match, because source and destination subnets may overlap. -WARNING: untranslated string: fwdfw hint ip2 = Please double-check if this rule makes sense: +WARNING: untranslated string: fwdfw hint ip2 = Please double-check if this rule makes sense: WARNING: untranslated string: fwdfw hint mac = The destination group contains MAC addresses, which will be skipped during rule creation. WARNING: untranslated string: fwdfw iface = Interface WARNING: untranslated string: fwdfw limitconcon = Limit concurrent connections per IP address diff --git a/doc/language_issues.tr b/doc/language_issues.tr index d04c99305..d4cbbac2d 100644 --- a/doc/language_issues.tr +++ b/doc/language_issues.tr @@ -48,7 +48,6 @@ WARNING: translation string unused: admin user password has been changed WARNING: translation string unused: administrator user password WARNING: translation string unused: adsl settings WARNING: translation string unused: advproxy AUTH method ntlm -WARNING: translation string unused: advproxy AUTH user IP cache TTL WARNING: translation string unused: advproxy LDAP auth WARNING: translation string unused: advproxy NTLM BDC hostname WARNING: translation string unused: advproxy NTLM PDC hostname @@ -73,8 +72,6 @@ WARNING: translation string unused: advproxy chgwebpwd new password WARNING: translation string unused: advproxy chgwebpwd new password confirm WARNING: translation string unused: advproxy chgwebpwd old password WARNING: translation string unused: advproxy chgwebpwd username -WARNING: translation string unused: advproxy content based throttling -WARNING: translation string unused: advproxy errmsg auth ipcache ttl WARNING: translation string unused: advproxy errmsg change fail WARNING: translation string unused: advproxy errmsg change success WARNING: translation string unused: advproxy errmsg invalid bdc diff --git a/html/cgi-bin/proxy.cgi b/html/cgi-bin/proxy.cgi index 73646a5ae..fdf9bddaf 100644 --- a/html/cgi-bin/proxy.cgi +++ b/html/cgi-bin/proxy.cgi @@ -18,13 +18,6 @@ # along with this program. If not, see http://www.gnu.org/licenses/. # # # ############################################################################### -# -# (c) 2004-2009 marco.s - http://www.advproxy.net -# -# This code is distributed under the terms of the GPL -# -# $Id: advproxy.cgi,v 3.0.2 2009/02/04 00:00:00 marco.s Exp $ -#
use strict; use Apache::Htpasswd; @@ -239,6 +232,7 @@ $proxysettings{'AUTH_METHOD'} = 'none'; $proxysettings{'AUTH_REALM'} = ''; $proxysettings{'AUTH_MAX_USERIP'} = ''; $proxysettings{'AUTH_CACHE_TTL'} = '60'; +$proxysettings{'AUTH_IPCACHE_TTL'} = '0'; $proxysettings{'AUTH_CHILDREN'} = '5'; $proxysettings{'NCSA_MIN_PASS_LEN'} = '6'; $proxysettings{'NCSA_BYPASS_REDIR'} = 'off'; @@ -444,18 +438,23 @@ if (($proxysettings{'ACTION'} eq $Lang::tr{'save'}) || ($proxysettings{'ACTION'} } } } + if ((!($proxysettings{'AUTH_MAX_USERIP'} eq '')) && + ((!($proxysettings{'AUTH_MAX_USERIP'} =~ /^\d+/)) || ($proxysettings{'AUTH_MAX_USERIP'} < 1) || ($proxysettings{'AUTH_MAX_USERIP'} > 255))) + { + $errormessage = $Lang::tr{'advproxy errmsg max userip'}; + goto ERROR; + } if (!($proxysettings{'AUTH_CACHE_TTL'} =~ /^\d+/)) { $errormessage = $Lang::tr{'advproxy errmsg auth cache ttl'}; goto ERROR; } - if ((!($proxysettings{'AUTH_MAX_USERIP'} eq '')) && - ((!($proxysettings{'AUTH_MAX_USERIP'} =~ /^\d+/)) || ($proxysettings{'AUTH_MAX_USERIP'} < 1) || ($proxysettings{'AUTH_MAX_USERIP'} > 255))) + if (!($proxysettings{'AUTH_IPCACHE_TTL'} =~ /^\d+/)) { - $errormessage = $Lang::tr{'advproxy errmsg max userip'}; + $errormessage = $Lang::tr{'advproxy errmsg auth ipcache ttl'}; goto ERROR; } - if (!($proxysettings{'AUTH_MAX_USERIP'} eq '')) + if ((!($proxysettings{'AUTH_MAX_USERIP'} eq '')) && ($proxysettings{'AUTH_IPCACHE_TTL'} eq '0')) { $errormessage = $Lang::tr{'advproxy errmsg auth ipcache may not be null'}; goto ERROR; @@ -1742,6 +1741,10 @@ print <<END <td class='base'>$Lang::tr{'advproxy AUTH limit of IP addresses'}:</td> <td><input type='text' name='AUTH_MAX_USERIP' value='$proxysettings{'AUTH_MAX_USERIP'}' size='5' /></td> </tr> +<tr> + <td class='base'>$Lang::tr{'advproxy AUTH user IP cache TTL'}:</td> + <td><input type='text' name='AUTH_IPCACHE_TTL' value='$proxysettings{'AUTH_IPCACHE_TTL'}' size='5' /></td> +</tr> <tr> <td class='base'>$Lang::tr{'advproxy AUTH always required'}:</td> <td><input type='checkbox' name='AUTH_ALWAYS_REQUIRED' $checked{'AUTH_ALWAYS_REQUIRED'}{'on'} /></td> @@ -2038,6 +2041,7 @@ print <<END <td><input type='hidden' name='AUTH_CHILDREN' value='$proxysettings{'AUTH_CHILDREN'}'></td> <td><input type='hidden' name='AUTH_CACHE_TTL' value='$proxysettings{'AUTH_CACHE_TTL'}' size='5' /></td> <td><input type='hidden' name='AUTH_MAX_USERIP' value='$proxysettings{'AUTH_MAX_USERIP'}' size='5' /></td> +<td><input type='hidden' name='AUTH_IPCACHE_TTL' value='$proxysettings{'AUTH_IPCACHE_TTL'}' size='5' /></td> <td><input type='hidden' name='AUTH_ALWAYS_REQUIRED' value='$proxysettings{'AUTH_ALWAYS_REQUIRED'}'></td> <td><input type='hidden' name='AUTH_REALM' value='$proxysettings{'AUTH_REALM'}'></td> <td><input type='hidden' name='DST_NOAUTH' value='$proxysettings{'DST_NOAUTH'}'></td> @@ -2049,6 +2053,7 @@ print <<END <td><input type='hidden' name='AUTH_CHILDREN' value='$proxysettings{'AUTH_CHILDREN'}'></td> <td><input type='hidden' name='AUTH_CACHE_TTL' value='$proxysettings{'AUTH_CACHE_TTL'}' size='5' /></td> <td><input type='hidden' name='AUTH_MAX_USERIP' value='$proxysettings{'AUTH_MAX_USERIP'}' size='5' /></td> +<td><input type='hidden' name='AUTH_IPCACHE_TTL' value='$proxysettings{'AUTH_IPCACHE_TTL'}' size='5' /></td> <td><input type='hidden' name='AUTH_REALM' value='$proxysettings{'AUTH_REALM'}'></td> END ; } @@ -3262,11 +3267,6 @@ END } print FILE "\n";
- # If we use authentication, users must always authenticate - unless ($proxysettings{"AUTH_METHOD"} eq "") { - print FILE "authenticate_ip_ttl 0\n\n"; - } - if ((!($proxysettings{'AUTH_METHOD'} eq 'none')) && (!($proxysettings{'AUTH_METHOD'} eq 'ident'))) { if ($proxysettings{'AUTH_METHOD'} eq 'ncsa') @@ -3275,6 +3275,7 @@ END print FILE "auth_param basic children $proxysettings{'AUTH_CHILDREN'}\n"; print FILE "auth_param basic realm $authrealm\n"; print FILE "auth_param basic credentialsttl $proxysettings{'AUTH_CACHE_TTL'} minutes\n"; + if (!($proxysettings{'AUTH_IPCACHE_TTL'} eq '0')) { print FILE "\nauthenticate_ip_ttl $proxysettings{'AUTH_IPCACHE_TTL'} minutes\n"; } }
if ($proxysettings{'AUTH_METHOD'} eq 'ldap') @@ -3319,6 +3320,7 @@ END print FILE "auth_param basic children $proxysettings{'AUTH_CHILDREN'}\n"; print FILE "auth_param basic realm $authrealm\n"; print FILE "auth_param basic credentialsttl $proxysettings{'AUTH_CACHE_TTL'} minutes\n"; + if (!($proxysettings{'AUTH_IPCACHE_TTL'} eq '0')) { print FILE "\nauthenticate_ip_ttl $proxysettings{'AUTH_IPCACHE_TTL'} minutes\n"; } }
if ($proxysettings{'AUTH_METHOD'} eq 'ntlm-auth') @@ -3359,6 +3361,7 @@ END print FILE "auth_param basic children $proxysettings{'AUTH_CHILDREN'}\n"; print FILE "auth_param basic realm $authrealm\n"; print FILE "auth_param basic credentialsttl $proxysettings{'AUTH_CACHE_TTL'} minutes\n"; + if (!($proxysettings{'AUTH_IPCACHE_TTL'} eq '0')) { print FILE "\nauthenticate_ip_ttl $proxysettings{'AUTH_IPCACHE_TTL'} minutes\n"; } }
print FILE "\n"; diff --git a/lfs/ntp b/lfs/ntp index 9a12e4e10..3c4a97033 100644 --- a/lfs/ntp +++ b/lfs/ntp @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2019 IPFire Team info@ipfire.org # +# Copyright (C) 2007-2020 IPFire Team info@ipfire.org # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -24,7 +24,7 @@
include Config
-VER = 4.2.8p14 +VER = 4.2.8p15
THISAPP = ntp-$(VER) DL_FILE = $(THISAPP).tar.gz @@ -40,7 +40,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_MD5 = 783edaf1d68ddf651bde64eda54a579d +$(DL_FILE)_MD5 = e1e6b23d2fc75cced41801dbcd6c2561
install : $(TARGET)
diff --git a/lfs/wio b/lfs/wio index 57dee7e31..29581dca6 100644 --- a/lfs/wio +++ b/lfs/wio @@ -15,7 +15,7 @@ THISAPP = wio-$(VER) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) PROG = wio -PAK_VER = 8 +PAK_VER = 9
############################################################################### # Top-level Rules diff --git a/src/initscripts/system/firewall b/src/initscripts/system/firewall index b0890c717..ab3a0bbf9 100644 --- a/src/initscripts/system/firewall +++ b/src/initscripts/system/firewall @@ -32,6 +32,10 @@ iptables_init() { iptables -P FORWARD DROP iptables -P OUTPUT ACCEPT
+ # Enable TRACE logging to syslog + modprobe nf_log_ipv4 + sysctl -q -w net.netfilter.nf_log.2=nf_log_ipv4 + # Empty LOG_DROP and LOG_REJECT chains iptables -N LOG_DROP iptables -A LOG_DROP -m limit --limit 10/second -j LOG diff --git a/src/wio/lang/wio.de.pl b/src/wio/lang/wio.de.pl index 2544cef82..78e4747b3 100644 --- a/src/wio/lang/wio.de.pl +++ b/src/wio/lang/wio.de.pl @@ -22,7 +22,7 @@ 'wio enabled' => 'Aktivieren?', 'wio min' => 'Minute(n)', 'wio cron' => 'Zeitintervall für die Überprüfung:', -'wio_ovpn_cron' => 'Zeitintervall für die Überprüfung des OpenVPN RW und IPSec Status:', +'wio_ovpn_cron' => 'Zeitintervall für die Überprüfung des OpenVPN RW und IPsec Status:', 'wio_save' => 'Speichern', 'wio_error' => 'Fehlermeldung:', 'wio_info' => 'Meldung:', @@ -61,18 +61,18 @@ 'wio_graphs' => 'Graphen anzeigen', 'wio_no_graphs' => 'Keine Graphen vorhanden', 'wio_graphs_stat' => 'Diagramme für', -'wio_vpn_con' => 'VPN - Verbindung(en):', +'wio_vpn_con' => 'IPsec - Verbindung(en):', 'wio_wan_con' => 'WAN - Verbindung:', 'wio_clients' => 'Clients:', 'wio click to disable' => 'Aktiviert', 'wio click to enable' => 'Deaktiviert', 'wio_net_scan' => 'Netzwerk(e) durchsuchen:', -'wio_net_scan_vl' => '', -'wio_net_scan_l' => 'Netzwerk an', -'wio_net_scan_r' => 'durchsuchen:', +'wio_net_scan_l' => '', +'wio_net_scan_r' => 'Netzwerk durchsuchen:', 'wio_net_scan_green' => 'grünes', 'wio_net_scan_blue' => 'blaues', 'wio_net_scan_orange' => 'oranges', +'wio_net_scan_red' => 'rotes', 'wio_net_scan_run' => 'Starten', 'wio_sort_host' => 'Nach Hostnamen (FQDN) sortieren', 'wio_sort_ip' => 'Nach IP Adressen sortieren', @@ -108,7 +108,6 @@ 'wio_fqdn_on' => 'Überprüfen per FQDN aktiviert (klicken, um per IP zu aktivieren)', 'wio_client_add' => 'Eingaben anwenden', 'wio_config' => 'Client(s) konfigurieren:', -'wio_settings_msg' => 'Einstellungen bearbeiten:', 'wio_settings_msg_hint' => 'Um Who Is Online? benutzen zu können, müssen hier grundsätzliche Einstellungen vorgenommen werden.', 'wio_sub' => 'WIO Client-Status-Mail', 'wio timeout' => 'Ping Timeout:', @@ -122,7 +121,7 @@ 'wio_mail_style' => 'WIO Client Statusmails versenden als', 'wio_mail_smail' => 'Sammelmail', 'wio_mail_email' => 'Einzelmails', -'wio_mail_ovpnrw' => 'OpenVPN RW und IPSec Statusmails aktivieren?', +'wio_mail_ovpnrw' => 'OpenVPN RW und IPsec Statusmails aktivieren?', 'wio_edit_set' => 'Konfiguration', 'wio_service' => 'Service:', 'wio_dyndns_success' => 'DynDNS IP ermittelt und eingetragen!', @@ -133,12 +132,13 @@ 'wio_arp_table_entries' => 'Client aus der ARP-Tabelle hinzufügen:', 'wio_activ' => 'Aktiv', 'wio_check' => 'Prüfen', -'wio_common_name' => 'Remote Host / IP', +'wio_common_name' => 'Remote Subnetz / RW IP', 'wio_msg_left' => 'Das', 'wio_msg_green' => 'grüne', 'wio_msg_blue' => 'blaue', +'wio_msg_red' => 'rote', 'wio_msg_orange' => 'orange', -'wio_msg_center' => 'Netzwerk an', +'wio_msg_center' => 'Netzwerk', 'wio_msg_right' => 'wird durchsucht.', 'wio_msg_hint' => 'Einen Moment bitte ...', 'wio_last_update' => 'Zuletzt aktualisiert', @@ -146,7 +146,6 @@ 'wio_clientremark' => 'Anmerkung anzeigen?', 'wio_already_running' => 'Die Prüfung wird bereits durchgeführt!', 'wio_error_function' => 'Diese Funktion kann im Moment nicht ausgeführt werden, da im Hintergrund gerade der Zustand (aktiv/inaktiv) der Clients aktualisiert wird.', -'wio_shutdown' => 'Herunterfahren, wenn alle Clients "offline" sind?', 'wio_unknown_lan' => 'UNBEKANNT', 'wio_red_lan' => 'ROT', 'wio_search' => 'Suche im lokalen Netzwerk nach aktiven Hosts ...', diff --git a/src/wio/lang/wio.en.pl b/src/wio/lang/wio.en.pl index be0046fe7..57ce6d200 100644 --- a/src/wio/lang/wio.en.pl +++ b/src/wio/lang/wio.en.pl @@ -22,7 +22,7 @@ 'wio enabled' => 'Enable?', 'wio min' => 'Minute(s)', 'wio cron' => 'Time interval for checking:', -'wio_ovpn_cron' => 'Time interval for checking the OpenVPN RW and IPSec Status:', +'wio_ovpn_cron' => 'Time interval for checking the OpenVPN RW and IPsec Status:', 'wio_save' => 'Save', 'wio_error' => 'errormessage:', 'wio_info' => 'message:', @@ -61,18 +61,18 @@ 'wio_graphs' => 'Show graphs', 'wio_no_graphs' => 'No graphs available', 'wio_graphs_stat' => 'Diagram for', -'wio_vpn_con' => 'VPN - Connection(s):', +'wio_vpn_con' => 'IPsec - Connection(s):', 'wio_wan_con' => 'WAN - Connection:', 'wio_clients' => 'clients:', 'wio click to disable' => 'Activated', 'wio click to enable' => 'Deactivated', 'wio_net_scan' => 'Scan network(s):', -'wio_net_scan_vl' => 'Scan', -'wio_net_scan_l' => 'network on', -'wio_net_scan_r' => '', +'wio_net_scan_l' => 'scan', +'wio_net_scan_r' => 'network', 'wio_net_scan_green' => 'green', 'wio_net_scan_blue' => 'blue', 'wio_net_scan_orange' => 'orange', +'wio_net_scan_red' => 'red', 'wio_net_scan_run' => 'Start', 'wio_sort_host' => 'Sort Hostnames (FQDN)', 'wio_sort_ip' => 'Sort IP-Adresses', @@ -108,7 +108,6 @@ 'wio_fqdn_on' => 'Send ping to FQDN enabled (click to enable IP)', 'wio_client_add' => 'Use settings', 'wio_config' => 'Configure Client(s):', -'wio_settings_msg' => 'Configure settings:', 'wio_settings_msg_hint' => 'Here you have to set some values to get the addon started.', 'wio_sub' => 'WIO Client-Status-Mail', 'wio timeout' => 'Ping Timeout:', @@ -122,7 +121,7 @@ 'wio_mail_style' => 'Send WIO client statusmails as', 'wio_mail_smail' => 'Collected mail', 'wio_mail_email' => 'Single mails', -'wio_mail_ovpnrw' => 'Enable OpenVPN RW and IPSec Statusmails?', +'wio_mail_ovpnrw' => 'Enable OpenVPN RW and IPsec Statusmails?', 'wio_edit_set' => 'Configuration', 'wio_service' => 'Service:', 'wio_dyndns_success' => 'DynDNS IP identified and registered!', @@ -133,12 +132,13 @@ 'wio_arp_table_entries' => 'Add client from ARP-Table:', 'wio_activ' => 'Active', 'wio_check' => 'Check', -'wio_common_name' => 'Remote Host/IP', +'wio_common_name' => 'Remote Subnet/RW IP', 'wio_msg_left' => 'Searching on the', 'wio_msg_green' => 'green', 'wio_msg_blue' => 'blue', +'wio_msg_red' => 'red', 'wio_msg_orange' => 'orange', -'wio_msg_center' => 'Interface on', +'wio_msg_center' => 'Interface', 'wio_msg_right' => 'is being examined.', 'wio_msg_hint' => 'One moment please ...', 'wio_last_update' => 'Last update', @@ -146,7 +146,6 @@ 'wio_clientremark' => 'Show remark?', 'wio_already_running' => 'This check is already running!', 'wio_error_function' => 'This function is temporarily unavailable, because in the background client states are being updated (active/inactive).', -'wio_shutdown' => 'Shutdown when all clients are "offline"?', 'wio_unknown_lan' => 'UNKNOWN', 'wio_red_lan' => 'RED', 'wio_search' => 'Searching for active hosts in the local network ...', diff --git a/src/wio/lang/wio.fr.pl b/src/wio/lang/wio.fr.pl index b9acd5c6d..9e8bdbc22 100644 --- a/src/wio/lang/wio.fr.pl +++ b/src/wio/lang/wio.fr.pl @@ -22,7 +22,7 @@ 'wio enabled' => 'Activer le service ?', 'wio min' => 'minute(s)', 'wio cron' => 'Interval de temps pour la mise à jour :', -'wio_ovpn_cron' => 'Interval de temps pour vérifier l'état d'OpenVPN RW et IPSec :', +'wio_ovpn_cron' => 'Interval de temps pour vérifier l'état d'OpenVPN RW et IPsec :', 'wio_save' => 'Sauvegarder', 'wio_error' => 'message d'erreur :', 'wio_info' => 'message :', @@ -61,18 +61,18 @@ 'wio_graphs' => 'Afficher le graphique', 'wio_no_graphs' => 'Pas de graphique disponible', 'wio_graphs_stat' => 'Graphique pour', -'wio_vpn_con' => 'Connexion(s) VPN :', +'wio_vpn_con' => 'Connexion(s) IPsec :', 'wio_wan_con' => 'Connexion WAN :', 'wio_clients' => 'Clients :', 'wio click to disable' => 'Activé', 'wio click to enable' => 'Désactivé', 'wio_net_scan' => 'Scan réseau(s) :', -'wio_net_scan_vl' => 'Scan réseau', -'wio_net_scan_l' => 'sur', +'wio_net_scan_l' => 'Scan réseau', 'wio_net_scan_r' => '', 'wio_net_scan_green' => 'vert', 'wio_net_scan_blue' => 'bleu', 'wio_net_scan_orange' => 'orange', +'wio_net_scan_red' => 'rouge', 'wio_net_scan_run' => 'Démarrer la recherche', 'wio_sort_host' => 'Trier noms d'hôtes (FQDN)', 'wio_sort_ip' => 'Trier adresses IP', @@ -108,7 +108,6 @@ 'wio_fqdn_on' => 'Envoi ping vers FQDN activé (cliquer pour activer IP)', 'wio_client_add' => 'Valider ces paramètres', 'wio_config' => 'Configurer client(s) :', -'wio_settings_msg' => 'Paramètres de configuration :', 'wio_settings_msg_hint' => 'Dans cette zone, vous pouvez personnaliser des paramètres du module.', 'wio_sub' => 'WIO Client-Status-Mail', 'wio timeout' => 'Temps de réponse max. du ping :', @@ -122,7 +121,7 @@ 'wio_mail_style' => 'Envoyer les messages d'état du client WIO en tant que ', 'wio_mail_smail' => 'Email collectif', 'wio_mail_email' => 'Email simple', -'wio_mail_ovpnrw' => 'Activer les messages d'état OpenVPN RW et IPSec ?', +'wio_mail_ovpnrw' => 'Activer les messages d'état OpenVPN RW et IPsec ?', 'wio_edit_set' => 'Configuration', 'wio_service' => 'Paramètres du service "Qui est en ligne ?" :', 'wio_dyndns_success' => 'IP DynDNS identifié et enregistré !', @@ -137,20 +136,20 @@ 'wio_msg_left' => 'La recherche du réseau ', 'wio_msg_green' => 'vert', 'wio_msg_blue' => 'bleu', +'wio_msg_red' => 'rouge', 'wio_msg_orange' => 'orange', -'wio_msg_center' => 'sur l'interface', +'wio_msg_center' => 'l'interface', 'wio_msg_right' => 'est en cours.', 'wio_msg_hint' => 'Un moment SVP...', 'wio_last_update' => 'Dernière mise à jour', -'wio_disable_hint' => 'Attention ! Tous les paramètres vont être réinitialisés, y compris le client à vérifier !', +'wio_disable_hint' => 'Attention ! Tous les paramètres vont être réinitialisés , y compris le client à vérifier !', 'wio_clientremark' => 'Afficher la remarque ?', 'wio_already_running' => 'Cette vérification est déjà en cours d'exécution !', -'wio_error_function' => 'Cette fonction est temporairement indisponible, car les états du client sont mis à jour en arrière-plan (actif / inactif).', -'wio_shutdown' => 'Arrêter IPFire quand tous les clients sont "hors ligne" ?', +'wio_error_function' => 'Cette fonction est temporairement indisponible, car en arrière-plan les états du client sont mis à jour (actif / inactif).', 'wio_unknown_lan' => 'INCONNU', 'wio_red_lan' => 'ROUGE', 'wio_search' => 'Recherche d'hôtes actifs sur le réseau local...', -'wio_answer' => 'Réponse', +'wio_answer' => 'Answer', 'wio_answer_time' => 'Temps de réponse', 'wio_scriptruntime' => 'Temps d'exécution du script', 'wio_show_table_off' => 'Cacher la table', diff --git a/src/wio/lang/wio.tr.pl b/src/wio/lang/wio.tr.pl index fb7137854..399011d5d 100644 --- a/src/wio/lang/wio.tr.pl +++ b/src/wio/lang/wio.tr.pl @@ -22,7 +22,7 @@ 'wio enabled' => 'Aktif', 'wio min' => 'dakika', 'wio cron' => 'Kontrol için zaman aralığı', -'wio_ovpn_cron' => 'OpenVPN RW ve IPSec durum kontrolü için zaman aralığı', +'wio_ovpn_cron' => 'OpenVPN RW ve IPsec durum kontrolü için zaman aralığı', 'wio_save' => 'Kaydet', 'wio_error' => 'Hata mesajı', 'wio_info' => 'Mesaj', @@ -62,18 +62,18 @@ 'wio_graphs' => 'Grafiği göster', 'wio_no_graphs' => 'Henüz grafik yok', 'wio_graphs_stat' => 'Diyagram - ', -'wio_vpn_con' => 'VPN - Bağlantı(lar)', +'wio_vpn_con' => 'IPsec - Bağlantı(lar)', 'wio_wan_con' => 'WAN - Bağlantı', 'wio_clients' => 'İstemciler', 'wio click to disable' => 'Aktifleştirildi', 'wio click to enable' => 'Pasifleştirildi', 'wio_net_scan' => 'Ağ tarama', -'wio_net_scan_vl' => 'Tara', -'wio_net_scan_l' => 'ağdaki', -'wio_net_scan_r' => '', +'wio_net_scan_l' => 'Tara', +'wio_net_scan_r' => 'ağdaki', 'wio_net_scan_green' => 'yeşil', 'wio_net_scan_blue' => 'mavi', 'wio_net_scan_orange' => 'turuncu', +'wio_net_scan_red' => 'kirmizi', 'wio_net_scan_run' => 'Tara', 'wio_sort_host' => 'Ana bilgisayar adlarına (FQDN) göre sırala', 'wio_sort_ip' => 'IP adreslerine göre sırala', @@ -109,7 +109,6 @@ 'wio_fqdn_on' => 'Aktif FQDN adresine ping gönderin (IP aktifleştirmek için tıklayın)', 'wio_client_add' => 'Kullanılan Ayarlar', 'wio_config' => 'İstemci(leri) yapılandır', -'wio_settings_msg' => 'Yapılandırma ayarları', 'wio_settings_msg_hint' => 'Eklentinin başlatılabilmesi için buradaki bazı seçeneklerin seçilmesi gerekir.', 'wio_sub' => 'WIO İstemci-Durup-Eposta', 'wio timeout' => 'Ping zaman aşımı', @@ -123,7 +122,7 @@ 'wio_mail_style' => 'Kimler çevrimiçi istemci durumunu e-posta olarak gönder', 'wio_mail_smail' => 'Toplam e-posta', 'wio_mail_email' => 'Tek e-posta', -'wio_mail_ovpnrw' => 'OpenVPN RW ve IPSec durumu e-postasını aktifleştir', +'wio_mail_ovpnrw' => 'OpenVPN RW ve IPsec durumu e-postasını aktifleştir', 'wio_edit_set' => 'Yapılandırma', 'wio_service' => 'Hizmetler', 'wio_dyndns_success' => 'esbit ve tescil edilen DynDNS IP!', @@ -138,6 +137,7 @@ 'wio_msg_left' => 'Taranıyor', 'wio_msg_green' => 'yeşil', 'wio_msg_blue' => 'mavi', +'wio_msg_red' => 'kirmizi', 'wio_msg_orange' => 'turuncu', 'wio_msg_center' => 'ağdaki', 'wio_msg_right' => 'incelenmektedir.', @@ -147,7 +147,6 @@ 'wio_clientremark' => 'Açıklamaları göster', 'wio_already_running' => 'Bu kontrol zaten çalışıyor!', 'wio_error_function' => 'Bu özellik geçici olarak kullanılamıyor çünkü arka planda istemci durumları güncellenmektedir (aktif/pasif)', -'wio_shutdown' => 'Tüm istemciler "çevrimdışı" olduğunda kapat', 'wio_unknown_lan' => 'BİLİNMEYEN', 'wio_red_lan' => 'KIRMIZI', 'wio_search' => 'Yerel ağda aktif ana bilgisayarlar aranıyor...', diff --git a/src/wio/main/wio.pl b/src/wio/main/wio.pl index 8e2fb8879..91c6c1494 100644 --- a/src/wio/main/wio.pl +++ b/src/wio/main/wio.pl @@ -3,7 +3,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2017-2018 Stephan Feddersen sfeddersen@ipfire.org # +# Copyright (C) 2017-2020 Stephan Feddersen sfeddersen@ipfire.org # # All Rights Reserved. # # # # This program is free software: you can redistribute it and/or modify # @@ -21,14 +21,14 @@ # # ############################################################################### # -# Version: 2019/06/04 21:12:23 +# Version: 2020/06/01 13:29:23 # -# This wio.pl is based on the Code from the IPCop WIO Addon +# This wio.pl is based on the code from the IPCop WIO Addon # and is extremly adapted to work with IPFire. # # Autor: Stephan Feddersen # Co-Autor: Alexander Marx -# Co-Autor: Frank Mainz +# Co-Autor: Frank Mainz (for some code for the IPCop WIO Addon) #
# enable only the following on debugging purpose @@ -46,10 +46,9 @@ require '/var/ipfire/lang.pl'; require '/usr/lib/wio/wio-lib.pl';
my ( $debug, $i, $t, $ib, $tb, $ivpn, $tvpn ) = ''; -my $logdir = "/var/log/wio"; my $owner = getpwnam "nobody"; my $group = getgrnam "nobody"; -my $ipadrfile = "$logdir/wioips"; +my $ipadrfile = "/var/log/wio/wioips";
unless ( -e $ipadrfile ) { print ( "The file $ipadrfile doesn't exist!\n" ); exit; }
@@ -70,9 +69,8 @@ my $logging = $wiosettings{'LOGGING'}; my $mailstyle = $wiosettings{'MAILSTYLE'}; my $mailremark = $wiosettings{'MAILREMARK'}; my $timeout = $wiosettings{'TIMEOUT'}; -my $shutdown = $wiosettings{'SHUTDOWN'}; my $rrddir = "/var/log/rrd/wio"; -my $onoffip = "$logdir/wioscip"; +my $onoffip = "/var/log/wio/wioscip"; my $hostname = "$mainsettings{'HOSTNAME'}.$mainsettings{'DOMAINNAME'}"; my $redactive = "/var/ipfire/red/active"; my $rediface = "/var/ipfire/red/iface"; @@ -91,7 +89,6 @@ my $i_ping = 'icmp'; my $t_ping = 'tcp';
my $nr = 1; -my $poweroff = 0;
my ( $togglestat, $arp, $time, $start, $timestamp ) = 0; my ( $id, $ipadr, $ipadrnew, $host, $hostnew, $enable, $remark, $dyndns, $dyndnsip ) = ''; @@ -101,6 +98,10 @@ my ( $ping_i, $ping_t, $ping_ib, $ping_tb, $ping_iv, $ping_tv, $pingmode ) = ''; my ( @tmp, @arptmp, @myarray, @status, @arpclients ) = ''; my @ifaces = ('GREEN','BLUE','ORANGE');
+if ( $netsettings{'RED_TYPE'} eq 'STATIC' || $netsettings{'RED_TYPE'} eq 'DHCP' ) { + push (@ifaces, "RED"); +} + if ( $mailsettings{'USEMAIL'} eq 'on' ) { $mailen = 'on'; } else { $mailen = 'off'; }
@@ -279,7 +280,7 @@ foreach (@myarray) { } }
-# write adressfile new +# write ipadressfile new
if ( !-e $onoffip ) { open( FILE, "> $ipadrfile" ); @@ -298,33 +299,6 @@ if ($debug) {
if ( $smailtxt ne '' ) { &WIO::mailsender($Lang::tr{'wio_sub'}, $smailtxt); }
-if ($shutdown eq 'on' && ! -e $onoffip) { - foreach (@status) { - chomp; - @tmp = split( /,/, $_ ); - - ($id,$timestamp,$ipadr,$host,$enable,$remark,$dyndns,$mailon,$mailoff,$ping,$on,$httphost) = @tmp; - - if ( $on eq 'on' ) { - $poweroff = 0; - last; - } - else { - $poweroff = 1; - next; - } - } - - if ($poweroff == 1) { - if ($debug) { - printf "$Lang::tr{'shutting down ipfire'}!\n\n"; - } - - &General::log("wio","$Lang::tr{'shutting down ipfire'}!"); - system '/usr/local/bin/ipfirereboot down'; - } -} - undef (@tmp); undef (@myarray); undef (@status); @@ -355,7 +329,6 @@ sub updatewiodata { }
sub startdebug { - printf " HOSTNAME : $hostname TIMEOUT : $timeout $Lang::tr{'age ssecond'} @@ -363,10 +336,11 @@ MAILSTYLE : $mailstyle RED TYPE : $netsettings{'RED_TYPE'} RED DEVICE : $reddev RED ADDRESS : $redip -SHUTDOWN : $shutdown "; - if ($ovpnpid) {printf "OVPN PID : $ovpnpid"} - if ($vpnpid) {printf "VPN PID : $vpnpid"} + +if ($ovpnpid) {printf "OpenVPN PID : $ovpnpid"} +if ($vpnpid) {printf "IPsec PID : $vpnpid"} + printf " $Lang::tr{'wio_search'}
diff --git a/src/wio/main/wiovpn.pl b/src/wio/main/wiovpn.pl index c4c6b5739..22116cd62 100644 --- a/src/wio/main/wiovpn.pl +++ b/src/wio/main/wiovpn.pl @@ -3,7 +3,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2017-2018 Stephan Feddersen sfeddersen@ipfire.org # +# Copyright (C) 2017-2020 Stephan Feddersen sfeddersen@ipfire.org # # All Rights Reserved. # # # # This program is free software: you can redistribute it and/or modify # @@ -21,14 +21,14 @@ # # ############################################################################### # -# Version: 2018/01/05 12:32:23 +# Version: 2020/05/04 12:02:23 # -# This wioovpn.pl is based on the Code from the IPCop WIO Addon +# This wioovpn.pl is based on the code from the IPCop WIO Addon # and is extremly adapted to work with IPFire. # # Autor: Stephan Feddersen # Co-Autor: Alexander Marx -# Co-Autor: Frank Mainz +# Co-Autor: Frank Mainz (for some code for the IPCop WIO Addon) #
# enable only the following on debugging purpose @@ -37,8 +37,6 @@ use strict; use POSIX qw(strftime);
-my $logdir = "/var/log/wio"; - require '/var/ipfire/general-functions.pl'; require '/var/ipfire/lang.pl'; require '/usr/lib/wio/wio-lib.pl'; @@ -55,7 +53,7 @@ my ( @ovpnstatus, @ovpncfg, @ovpncache, @ovpnarray, @ovpnmatch, @ovpnwrite ); my $now = strftime "%a, %d.%m.%Y %H:%M:%S", localtime; my $ovpnpid = "/var/run/openvpn.pid"; my $ovpnmailmsg = ''; -my $ovpncache = "$logdir/.ovpncache"; +my $ovpncache = "/var/log/wio/.ovpncache"; my $ovpnconfig = "/var/ipfire/ovpn/ovpnconfig";
my ( $name, $nameul, $ovpnclt, $ovpncltip, $realipadr, $connected ) = ''; @@ -65,10 +63,10 @@ my ( @vpnstatus, @vpncfg, @vpncache, @vpnarray, @vpnwrite );
my $vpnpid = "/var/run/charon.pid"; my $vpnmailmsg = ''; -my $vpncache = "$logdir/.vpncache"; +my $vpncache = "/var/log/wio/.vpncache"; my $vpnconfig = "/var/ipfire/vpn/config";
-my ( $activ, $vpnmailsub, $vpnrwstatus, $status,) = ''; +my ( $vpnmailsub, $vpnrwstatus ) = '';
my $togglestat = 0;
@@ -100,9 +98,7 @@ foreach (@ovpncfg) {
( $name, $remark ) = (split (/,/, $_))[3, 26];
- $status = 'off'; - - unless ( grep (/$name/, @ovpncache) ) { push (@ovpncache, "$name,$remark,$status\n"); } + unless ( grep (/$name/, @ovpncache) ) { push (@ovpncache, "$name,$remark,off\n"); } }
foreach (@ovpncache) { @@ -110,7 +106,7 @@ foreach (@ovpncache) {
( $name, $remark, $status ) = split (/,/, $_);
- if ( grep (/,$name,/, @ovpncfg) ) { push (@ovpnarray, "$name,$remark,$status\n"); } + if ( grep (/$name/, @ovpncfg) ) { push (@ovpnarray, "$name,$remark,$status\n"); } }
foreach (@ovpnarray) { @@ -118,6 +114,9 @@ foreach (@ovpnarray) {
( $name, $remark, $status ) = split (/,/, $_);
+ $remark = `/bin/cat $ovpnconfig | grep '$name' | cut -d "," -f 27`; + chomp ($remark); + if ( $name =~ m/_/ ) { $nameul = $name; } else { ($nameul = $name) =~ s/ /_/g; }
@@ -196,15 +195,13 @@ if ( ! -e "$vpnpid" ) { } else {
-if ( -e "$vpnpid" ) { - @vpnstatus = `/usr/local/bin/ipsecctrl I`; -} +@vpnstatus = `/usr/local/bin/ipsecctrl I`;
open(FILE, "$vpnconfig"); @vpncfg = <FILE>; close (FILE);
-if ( ! -e "$vpncache" ) { +unless ( -e "$vpncache" ) { open(FILE, ">$vpncache"); close (FILE); } @@ -217,15 +214,9 @@ else { foreach (@vpncfg) { chomp;
- ( $activ, $name, $remark ) = (split (/,/, $_))[1, 2, 26]; + ( $name, $remark ) = (split (/,/, $_))[2, 26];
- if ( $remark eq 'off' ) { $remark = '-'; } - - $status = 'off'; - - if ( $activ eq "off" ) { next; } - - unless ( grep (/$name/, @vpncache) ) { push (@vpncache, "$name,$remark,$status\n"); } + unless ( grep (/$name/, @vpncache) ) { push (@vpncache, "$name,$remark,off\n"); } }
foreach (@vpncache) { @@ -233,7 +224,7 @@ foreach (@vpncache) {
( $name, $remark, $status ) = split (/,/, $_); - if ( grep (/,$name,/, @vpncfg) ) { push (@vpnarray, "$name,$remark,$status\n"); } + if ( grep (/$name/, @vpncfg) ) { push (@vpnarray, "$name,$remark,$status\n"); } }
foreach (@vpnarray) { @@ -241,6 +232,9 @@ foreach (@vpnarray) { ( $name, $remark, $status ) = split (/,/, $_);
+ $remark = `/bin/cat $vpnconfig | grep '$name' | cut -d "," -f 27`; + chomp ($remark); + if ( grep (/$name{.*INSTALLED/ , @vpnstatus) ) { $vpnrwstatus = "$Lang::tr{'wio up'}"; $togglestat = ( $status ne 'on' ) ? 1 : 0; @@ -255,8 +249,8 @@ foreach (@vpnarray) { push (@vpnwrite, "$name,$remark,$status\n");
if ( $togglestat == 1 ) { - $vpnmailsub = "WIO VPN - $name - $vpnrwstatus - $now"; - $logmsg = "Client: WIO VPN $name - Status: $vpnrwstatus $now"; + $vpnmailsub = "WIO IPsec - $name - $vpnrwstatus - $now"; + $logmsg = "Client: WIO IPSec $name - Status: $vpnrwstatus $now"; $vpnmailmsg = "Client : $name\n";
if ( $status eq 'on' ) { diff --git a/src/wio/wio-graphs.pl b/src/wio/wio-graphs.pl index af5c52062..0cfac20d6 100644 --- a/src/wio/wio-graphs.pl +++ b/src/wio/wio-graphs.pl @@ -3,7 +3,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2017-2018 Stephan Feddersen sfeddersen@ipfire.org # +# Copyright (C) 2017-2020 Stephan Feddersen sfeddersen@ipfire.org # # All Rights Reserved. # # # # This program is free software: you can redistribute it and/or modify # @@ -21,9 +21,9 @@ # # ############################################################################### # -# Version: 2017/07/11 21:32:23 +# Version: 2020/05/26 10:34:23 # -# This wio-graphs.pl is based on the Code from the IPCop WIO Addon +# This wio-graphs.pl is based on the code from the IPCop WIO Addon # and is extremly adapted to work with IPFire. # # Autor: Stephan Feddersen @@ -45,18 +45,35 @@ require '/var/ipfire/lang.pl'; my ( %mainsettings, %color ) = ();
&General::readhash('/var/ipfire/main/settings', %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash('/srv/web/ipfire/html/themes/'.$mainsettings{'THEME'}.'/include/colors.txt', %color);
-sub wio { - my $hostid = $_[0]; - my $hostname = $_[1]; - my $period = $_[2]; +sub wiograph { + my $hostid = $_[0]; + my $host = $_[1]; + my $period = $_[2]; + + my $title = "$host ($Lang::tr{$period})\n";
my @rrd = ();
push @rrd, ("-"); - push @rrd, @{&header($period, "$hostname ($Lang::tr{$period})")}; - push @rrd, @{&body($hostid)}; + push @rrd, ("--title", "$title"); + push @rrd, ("--start", "-1$period", "-aPNG", "-i", "-z"); + push @rrd, ("--border", "0"); + push @rrd, ("--full-size-mode"); + push @rrd, ("--slope-mode"); + push @rrd, ("--pango-markup"); + push @rrd, ("--alt-y-grid", "-w 910", "-h 300"); + if ( $period eq 'day' ) { push @rrd, ("--x-grid", "MINUTE:30:HOUR:1:HOUR:2:0:%H:%M"); } + push @rrd, ("--color", "SHADEA".$color{"color19"}); + push @rrd, ("--color", "SHADEB".$color{"color19"}); + push @rrd, ("--color", "BACK".$color{"color21"}); + push @rrd, "DEF:mode=/var/log/rrd/wio/$hostid.rrd:mode:AVERAGE"; + push @rrd, "CDEF:online=mode,UN,0,mode,IF,50,GT,100,0,IF"; + push @rrd, "CDEF:offline=mode,UN,100,mode,IF,50,LT,100,0,IF"; + push @rrd, "AREA:online".$color{"color12"}.":$Lang::tr{'wio up'}\j"; + push @rrd, "AREA:offline".$color{"color13"}.":$Lang::tr{'wio down'}\j"; + push @rrd, "-W www.ipfire.org";
RRDs::graph (@rrd);
@@ -64,64 +81,14 @@ sub wio { print "Error in RRD::graph for Who Is Online: $error\n" if $error; }
-sub body { - my $hostid = shift; - my $result = []; - - push @$result, "DEF:mode=/var/log/rrd/wio/$hostid.rrd:mode:AVERAGE"; - push @$result, "CDEF:online=mode,UN,0,mode,IF,50,GT,100,0,IF"; - push @$result, "CDEF:offline=mode,UN,100,mode,IF,50,LT,100,0,IF"; - push @$result, "AREA:online".$color{"color12"}.":$Lang::tr{'wio up'}\j"; - push @$result, "AREA:offline".$color{"color13"}.":$Lang::tr{'wio down'}\j"; - push @$result, "COMMENT:\r<span size='smaller'>$Lang::tr{'wio_last_update'}\: ". lastupdate(scalar localtime()) ."</span>\r"; - - return $result; -} - -sub lastupdate { - my $text = shift; - - return undef if not defined $text; - $text =~ s/\/\\/g; - $text =~ s/:/\:/g; - - return $text; -} - -sub header { - my $period = shift; - my $title = shift; - my $result = []; - - push @$result, ("--title", "$title"); - push @$result, ("--start", "-1$period", "-aPNG", "-i", "-z"); - push @$result, ("--border", "0"); - push @$result, ("--full-size-mode"); - push @$result, ("--slope-mode"); - push @$result, ("--pango-markup"); - push @$result, ("--alt-y-grid", "-w 910", "-h 300"); - if ( $period eq 'day' ) { push @$result, ("--x-grid", "MINUTE:30:HOUR:1:HOUR:2:0:%H:%M"); } - push @$result, ("--color", "SHADEA".$color{"color19"}); - push @$result, ("--color", "SHADEB".$color{"color19"}); - push @$result, ("--color", "BACK".$color{"color21"}); - - return $result; -} - sub wiographbox { - print "<center>"; - print "<table width='100%' cellspacing='0'>"; - print "<tr>"; - print "<td align='center' bgcolor='".$color{"color20"}."'><a href='".$_[0]."?".$_[1]."?hour?".$_[3]."' target='".$_[1]."box'><b>".$Lang::tr{'hour'}."</b></a></td>"; + print "<table width='100%' align='center' cellspacing='0' border='0'>"; + print "<tr><td align='center' bgcolor='".$color{"color20"}."'><a href='".$_[0]."?".$_[1]."?hour?".$_[3]."' target='".$_[1]."box'><b>".$Lang::tr{'hour'}."</b></a></td>"; print "<td align='center' bgcolor='".$color{"color20"}."'><a href='".$_[0]."?".$_[1]."?day?".$_[3]."' target='".$_[1]."box'><b>".$Lang::tr{'day'}."</b></a></td>"; print "<td align='center' bgcolor='".$color{"color20"}."'><a href='".$_[0]."?".$_[1]."?week?".$_[3]."' target='".$_[1]."box'><b>".$Lang::tr{'week'}."</b></a></td>"; print "<td align='center' bgcolor='".$color{"color20"}."'><a href='".$_[0]."?".$_[1]."?month?".$_[3]."' target='".$_[1]."box'><b>".$Lang::tr{'month'}."</b></a></td>"; - print "<td align='center' bgcolor='".$color{"color20"}."'><a href='".$_[0]."?".$_[1]."?year?".$_[3]."' target='".$_[1]."box'><b>".$Lang::tr{'year'}."</b></a></td>"; - print "</tr>"; - print "</table>"; - print "<table width='100%' cellspacing='0'>"; - print "<tr><td align='center' colspan='8'> </td></tr>"; - print "<tr><td align='center' colspan='8'><iframe class='graph' src='".$_[0]."?".$_[1]."?".$_[2]."?".$_[3]."' scrolling='no' marginheight='0' frameborder='no' name='".$_[1]."box'></iframe></td></tr>"; + print "<td align='center' bgcolor='".$color{"color20"}."'><a href='".$_[0]."?".$_[1]."?year?".$_[3]."' target='".$_[1]."box'><b>".$Lang::tr{'year'}."</b></a></td></tr>"; + print "<tr><td colspan='5' align='center'> </td></tr>"; + print "<tr><td colspan='5' align='center'><iframe height='300px' width='940px' src='".$_[0]."?".$_[1]."?".$_[2]."?".$_[3]."' scrolling='no' marginheight='0' frameborder='no' name='".$_[1]."box'></iframe></td></tr>"; print "</table>"; - print "</center>"; } diff --git a/src/wio/wio-lib.pl b/src/wio/wio-lib.pl index 1ff7cfacc..eb7b33e7d 100644 --- a/src/wio/wio-lib.pl +++ b/src/wio/wio-lib.pl @@ -21,14 +21,14 @@ # # ############################################################################### # -# Version: 2020/26/04 19:35:23 +# Version: 2020/05/25 19:39:23 # -# This wio-lib.pl is based on the Code from the IPCop WIO Addon +# This wio-lib.pl is based on the code from the IPCop WIO Addon # and is extremly adapted to work with IPFire. # # Autor: Stephan Feddersen # Co-Autor: Alexander Marx -# Co-Autor: Frank Mainz +# Co-Autor: Frank Mainz (for some code for the IPCop WIO Addon) #
package WIO; @@ -45,10 +45,9 @@ require '/var/ipfire/general-functions.pl'; require '/var/ipfire/header.pl'; require '/var/ipfire/lang.pl';
-my $mailfile = "${General::swroot}/dma/mail.conf"; -my %mail = (); +my %mailsettings = ();
-&General::readhash($mailfile, %mail); +&General::readhash('/var/ipfire/dma/mail.conf', %mailsettings);
############################################################################################################################
@@ -91,6 +90,14 @@ sub contime { if ( $temp[1] eq 'minutes' ) { $totalsecs = $temp[0] * 60; } + + if ( $temp[1] eq 'hours' ) { + $totalsecs = $temp[0] * 3600; + } + + if ( $temp[1] eq 'days' ) { + $totalsecs = $temp[0] * 86400; + } }
if ( $vpn eq 'ovpn' ) { @@ -147,8 +154,8 @@ sub mailsender { my $msg = '';
$msg = MIME::Lite->new( - From => $mail{'SENDER'}, - To => $mail{'RECIPIENT'}, + From => $mailsettings{'SENDER'}, + To => $mailsettings{'RECIPIENT'}, Subject => $_[0], Type => 'multipart/mixed' ); diff --git a/src/wio/wio.cgi b/src/wio/wio.cgi index 3094ec30c..a92a44473 100644 --- a/src/wio/wio.cgi +++ b/src/wio/wio.cgi @@ -21,14 +21,14 @@ # # ############################################################################### # -# Version: 2020/26/04 19:35:23 +# Version: 2020/06/01 13:29:23 # -# This wio.cgi is based on the Code from the IPCop WIO Addon +# This wio.cgi is based on the code from the IPCop WIO Addon # and is extremly adapted to work with IPFire. # # Autor: Stephan Feddersen # Co-Autor: Alexander Marx -# Co-Autor: Frank Mainz (for some Code for the IPCop WIO Addon) +# Co-Autor: Frank Mainz (for some code for the IPCop WIO Addon) #
use strict; @@ -55,7 +55,7 @@ require '/usr/lib/wio/wio-graphs.pl';
my $logdir = "/var/log/wio";
-my ( %mainsettings, %mailsettings, %wiosettings, %cgiparams, %netsettings, %ipshash, +my ( %mainsettings, %mailsettings, %wiosettings, %cgiparams, %netsettings, %ipshash, %vpnsettings, %vpnconfighash, %ovpnconfighash, %ovpnccdconfhash, %ovpnsettings, %checked, %selected, %color ) = ();
&General::readhash('/var/ipfire/main/settings', %mainsettings); @@ -67,6 +67,7 @@ my ( %mainsettings, %mailsettings, %wiosettings, %cgiparams, %netsettings, %ipsh &General::readhash('/var/ipfire/ovpn/settings', %ovpnsettings); &General::readhasharray('/var/ipfire/ovpn/ccd.conf', %ovpnccdconfhash); &General::readhasharray('/var/ipfire/vpn/config', %vpnconfighash); +&General::readhash('/var/ipfire/vpn/settings', %vpnsettings);
my $ipadrfile = "$logdir/wioips"; my $onoffip = "$logdir/wioscip"; @@ -112,7 +113,7 @@ my $networksearchbuttontext = "$Lang::tr{'wio_show_table_on'}"; my ( $message, $infomessage, $errormessage, $importmessage ) = '';
my ( $buttontext, $host, $timestamp, $ipadr, $on, $remark, $dyndns, $dyndnsip, $sendemailon, $net, $dev, $iprange, $output, $write, $webinterface, - $sendemailoff, $pingmethode, $online, $color, $bgcolor, $exitcode, $id, $line, $interface, $counter, $vpnn2nip, $vpnn2nmask, $ddns, $edc, + $sendemailoff, $pingmethode, $online, $color, $bgcolor, $exitcode, $id, $line, $interface, $counter, $vpnn2nip, $vpnn2nmask, $edc, $edd, $wmon, $wmoff, $ipfqdn, $http, $wioscan, $statustxt, $status, $key, $ic, $text, $image ) = ();
my ( @temp, @dates, @ipaddresses, @names, @remark, @sendemailon, @sendemailoff, @current, @ddns, @match, @webinterface, @arpcache, @arpadd, @line, @@ -127,6 +128,10 @@ my @devs_alt = ('green','blue','orange','red');
my %ifacecolor = ( GREEN => 'wio_run_green', BLUE => 'wio_run_blue', ORANGE => 'wio_run_orange');
+#if ( $netsettings{'RED_TYPE'} eq 'STATIC' || $netsettings{'RED_TYPE'} eq 'DHCP' ) { +# %ifacecolor = ( %ifacecolor, RED => 'wio_run_red' ); +#} + &loadips();
## some wio settings @@ -156,7 +161,6 @@ $wiosettings{'LOGGING'} = 'off'; $wiosettings{'MAILREMARK'} = 'off'; $wiosettings{'MAILSTYLE'} = 'email'; $wiosettings{'OVPNRWMAIL'} = 'off'; -$wiosettings{'SHUTDOWN'} = 'off'; $wiosettings{'WIOGUISHOWARPTABLE'} = ''; $wiosettings{'WIOGUISHOWCLIENTIMPORTTABLE'} = ''; $wiosettings{'WIOGUISHOWNETWORKSEARCHTABLE'} = ''; @@ -194,7 +198,6 @@ if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_save'}.'1' ) { $cgiparams{'MAILREMARK'} = $wiosettings{'MAILREMARK'}; $cgiparams{'MAILSTYLE'} = $wiosettings{'MAILSTYLE'}; $cgiparams{'OVPNRWMAIL'} = $wiosettings{'OVPNRWMAIL'}; - $cgiparams{'SHUTDOWN'} = $wiosettings{'SHUTDOWN'};
&General::writehash($wiosettings, %cgiparams); &General::readhash($wiosettings, %wiosettings); @@ -535,6 +538,7 @@ if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_back'} ) {
if ( $wiosettings{'ACTION'} eq 'wio_run_green' || $wiosettings{'ACTION'} eq 'wio_run_blue' || + $wiosettings{'ACTION'} eq 'wio_run_red' || $wiosettings{'ACTION'} eq 'wio_run_orange') { $wioscan = 'on'; }
if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_import'}.'1' || @@ -599,13 +603,14 @@ elsif ( $wioscan eq 'on' ) {
if ( $_ eq 'GREEN' ) { $color = "$Header::colourgreen"; $net = $Lang::tr{'wio_msg_green'}; } elsif ( $_ eq 'BLUE' ) { $color = "$Header::colourblue"; $net = $Lang::tr{'wio_msg_blue'}; } + elsif ( $_ eq 'RED' ) { $color = "$Header::colourred"; $net = $Lang::tr{'wio_msg_red'}; } else { $color = "$Header::colourorange"; $net = $Lang::tr{'wio_msg_orange'}; } } }
&Header::openbox('100%', 'left', $Lang::tr{'wio_info'}); print"<table width='100%'> - <tr><td align='center'><font class='base'>$Lang::tr{'wio_msg_left'} </font><font class='base' color='$color'><b>$net</b></font> $Lang::tr{'wio_msg_center'} <font class='base' color='$color'><b>$dev</b></font><font class='base'> $Lang::tr{'wio_msg_right'} $Lang::tr{'wio_msg_hint'}</font></td></tr> + <tr><td align='center'><font class='base'>$Lang::tr{'wio_msg_left'} </font><font class='base' color='$color'><b>$net</b></font> $Lang::tr{'wio_msg_center'} <font class='base'> $Lang::tr{'wio_msg_right'} $Lang::tr{'wio_msg_hint'}</font></td></tr> <tr><td> </td></tr> <tr><td align='center'><img align='middle' src='/images/indicator.gif' /></td></tr> </table>"; @@ -884,9 +889,6 @@ $checked{'MAILREMARK'}{$wiosettings{'MAILREMARK'}} = "checked='checked'"; $checked{'OVPNRWMAIL'}{'off'} = $checked{'OVPNRWMAIL'}{'on'} = ''; $checked{'OVPNRWMAIL'}{$wiosettings{'OVPNRWMAIL'}} = "checked='checked'";
-$checked{'SHUTDOWN'}{'off'} = $checked{'SHUTDOWN'}{'on'} = ''; -$checked{'SHUTDOWN'}{$wiosettings{'SHUTDOWN'}} = "checked='checked'"; - $checked{'MAILSTYLE'}{'smail'} = $checked{'MAILSTYLE'}{'email'} = ''; $checked{'MAILSTYLE'}{$wiosettings{'MAILSTYLE'}} = "checked='checked'";
@@ -942,15 +944,14 @@ print" <form method='post' action='$ENV{'SCRIPT_NAME'}' enctype='multipart/form-data'> <table width='100%'> <tr> - <td width='55%' bgcolor='$color{'color20'}' align='left' height='20'><b> $Lang::tr{'wio_settings_msg'}</b></td> - <td width='2%'> </td> - <td width='43%'> </td> + <td bgcolor='$color{'color20'}' align='left'><b>$Lang::tr{'wio_settings_msg_hint'}</b></td> + <td colspan='2'> </td> </tr> -<tr><td colspan='3'> </td></tr> <tr> - <td colspan='3'>$Lang::tr{'wio_settings_msg_hint'}</td> + <td width='48%'> </td> + <td width='2%'> </td> + <td width='50%'> </td> </tr> -<tr><td colspan='3'> </td></tr> <tr> <td align='right'>$Lang::tr{'wio enabled'}</td> "; @@ -966,12 +967,6 @@ else { print" </tr> <tr><td colspan='3'> </td></tr> -<tr> - <td align='right'>$Lang::tr{'wio_shutdown'}</td> - <td> </td> - <td align='left'><input type='checkbox' name='SHUTDOWN' $checked{'SHUTDOWN'}{'on'} /></td> -</tr> -<tr><td colspan='3'> </td></tr> <tr> <td align='right'>$Lang::tr{'wio cron'}</td> <td> </td> @@ -1133,16 +1128,16 @@ print" <tr bgcolor='$color{'color20'}' height='20'> <td width='3%' align='center'><b>$Lang::tr{'wio_id'}</b></td> <td width='15%' align='center'><b>$Lang::tr{'wio ipadress'}</b></td> - <td width='3%' align='center'><b>$Lang::tr{'wio network'}</b></td> + <td width='7%' align='center'><b>$Lang::tr{'wio network'}</b></td> <td width='15%' align='center'><b>$Lang::tr{'wio_lanname'}</b></td> <td width='15%' align='center'><b>$Lang::tr{'wio_wanname'}</b></td> - <td width='24%' align='center'><b>$Lang::tr{'wio_dyndns_hosts'}</b></td> + <td width='20%' align='center'><b>$Lang::tr{'wio_dyndns_hosts'}</b></td> <td width='11%' align='center'><b>$Lang::tr{'wio image'}</b></td> <td width='14%' align='center'><b>$Lang::tr{'wio_connected'}</b></td> </tr> <tr bgcolor='$color{'color22'}' height='20'> <td align='center'>01</td> - <td align='center'><font color='$Header::colourred'>$redip</b></font></td> + <td align='center'><font color='$Header::colourred'>$redip</font></td> <td align='center'><img align='middle' src='$imgstatic/red.png' alt='$Lang::tr{'internet'}' title='$Lang::tr{'internet'}' /></td> <td align='center'><font color='$Header::colourgreen'>".$mainsettings{'HOSTNAME'}.".".$mainsettings{'DOMAINNAME'}."</font></td> <td align='center'><font color='$Header::colourred'>".( $redip ne '-' ? (gethostbyaddr(pack("C4", split (/./, $redip)), 2))[0] : '-' )."</font></td> @@ -1155,22 +1150,25 @@ open(FILE, "< $dyndnsconfig"); @ddns = <FILE>; close (FILE);
-$ddns = @ddns; -$bgcolor = "blue"; - foreach (@ddns) { chomp; - + @temp = split (/,/, $_);
- if ( $temp[7] eq "on" ) { $bgcolor = ( &General::DyndnsServiceSync (&General::GetDyndnsRedIP,$temp[1],$temp[2]) ? "$Header::colourgreen" : "$Header::colourred" ); } - + if ( $temp[7] eq "on" ) { + $bgcolor = ( &General::DyndnsServiceSync (&General::GetDyndnsRedIP,$temp[1],$temp[2]) ? "$Header::colourgreen" : "$Header::colourred" ); + } + else { + $bgcolor = "blue"; + } + print"<font color='$bgcolor'>$temp[1].$temp[2]</font>"; - - if ( $iddyndns++ ne ($ddns-1) ) { print"<b>, </b>"; } + if ( $iddyndns++ ne (@ddns-1) ) { print"<br />\n"; } } } -else { print"<b> - </b>"; } +else { + print"-"; +}
print" </td> @@ -1217,19 +1215,23 @@ print"
foreach $key (sort SortByTunnelName (keys(%vpnconfighash))) {
-my ( $vpncheck, $vpntime, $vpnclient ) = ''; - -if ( -e '/var/log/wio/.vpncache' ) { - $vpncheck = strftime("%d.%m.%Y - %H:%M:%S",localtime(((stat('/var/log/wio/.vpncache'))[9]))); -} +my ( $vpnclient, $vpnclientip, $vpnrwnet, $vpnn2nnet, $vpntime, $vpncheck ) = '';
$status = "bgcolor='${Header::colourred}'"; $statustxt = "$Lang::tr{'capsclosed'}"; $vpnclient = $vpnconfighash{$key}[1];
+my ($ip,$sub) = split(///,$vpnsettings{'RW_NET'}); +my @ip = split( /./, $ip); +$vpnrwnet = join( '.', ( $ip[0], $ip[1], $ip[2], ) ); + if ($vpnconfighash{$key}[0] eq 'off') { $status = "bgcolor='${Header::colourblue}'"; $statustxt = "$Lang::tr{'capsclosed'}"; + $vpnn2nnet = '-'; + } + else { + $vpnn2nnet = $vpnconfighash{$key}[11]; }
foreach (@vpnstatus) { @@ -1238,6 +1240,8 @@ $vpnclient = $vpnconfighash{$key}[1]; $statustxt = "$Lang::tr{'capsopen'}"; $vpntime = `/usr/local/bin/ipsecctrl I | grep $vpnclient.*ESTABLISHED | sed 's/^[ \t]*//' | cut -d " " -f 3-4`; $vpntime = &WIO::contime($vpntime, "ipsec"); + $vpnclientip = `/usr/local/bin/ipsecctrl I | grep $vpnclient.*$vpnrwnet | sed 's/^[ \t]*//' | cut -d " " -f 6 | cut -d "/" -f 1`; + $vpncheck = strftime("%d.%m.%Y - %H:%M:%S",localtime); last; } } @@ -1248,10 +1252,10 @@ $vpnclient = $vpnconfighash{$key}[1];
printf ("<td align='center'>%02d</td>", $vpnnr);
- print"<td align='center'>$vpncheck</td> + print"<td align='center'>".($vpncheck ne '' ? "$vpncheck" : "-")."</td> <td align='center'>$vpnclient</td> <td align='center'><img align='middle' src='$imgstatic/".($vpnconfighash{$key}[3] eq 'host' ? "vpnrw.png' alt='$Lang::tr{'wio_rw'}' title='$Lang::tr{'wio_rw'}'" : "vpnn2n.png' alt='$Lang::tr{'wio_n2n'}' title='$Lang::tr{'wio_n2n'}'")." /></td> - <td align='center'>".($vpnconfighash{$key}[2] eq '%auth-dn' ? "$vpnconfighash{$key}[9]" : ($vpnconfighash{$key}[4] eq 'cert' ? "$vpnconfighash{$key}[2]" : ($vpnconfighash{$key}[8] ne '' ? "$vpnconfighash{$key}[10]" : " ")))."</td> + <td align='center'>".($vpnconfighash{$key}[3] eq 'host' ? (defined($vpnclientip) ? "$vpnclientip" : "-") : $vpnconfighash{$key}[3] eq 'net' ? "$vpnn2nnet" : "-")."</td> <td align='center'> <table $status cellpadding='2' cellspacing='0' width='100%'> <tr height='20'> @@ -1259,15 +1263,16 @@ $vpnclient = $vpnconfighash{$key}[1]; </tr> </table> </td> - <td align='center' height='20'>".(defined($vpntime)? "$vpntime" : "-")."</td> + <td align='center' height='20'>".($vpntime ne '' ? "$vpntime" : "-")."</td> </tr> ";
-if ($vpnconfighash{$key}[25] && $wiosettings{'CLIENTREMARK'} eq 'on') { - print"<tr".($idvpn % 2?" bgcolor='$color{'color20'}'":" bgcolor='$color{'color22'}'")." height='20'><td> </td><td colspan='16' align='left'>$vpnconfighash{$key}[25]</td></tr>"; +if ($wiosettings{'CLIENTREMARK'} eq 'on') { + print"<tr".($idvpn % 2?" bgcolor='$color{'color20'}'":" bgcolor='$color{'color22'}'")." height='20'><td> </td><td colspan='16' align='left'>".($vpnconfighash{$key}[25] ne '' ? "$vpnconfighash{$key}[25]" : "-")."</td></tr>"; } - print"<tr height='1'><td colspan='7' bgcolor='#696565'></td></tr>"; - $idvpn++ + +print"<tr height='1'><td colspan='7' bgcolor='#696565'></td></tr>"; +$idvpn++ }
print"</table>"; @@ -1292,117 +1297,117 @@ print" <tr bgcolor='$color{'color20'}' height='20'> <td width='3%' align='center'><b>$Lang::tr{'wio_id'}</b></td> <td width='19%' align='center'><b>$Lang::tr{'wio checked'}</b></td> - <td width='20%' align='center'><b>$Lang::tr{'wio ipadress'}</b></td> + <td width='20%' align='center'><b>$Lang::tr{'name'}</b></td> <td width='8%' align='center'><b>$Lang::tr{'type'}</b></td> - <td width='25%' align='center'><b>$Lang::tr{'common name'}</b></td> + <td width='25%' align='center'><b>$Lang::tr{'wio_common_name'}</b></td> <td width='11%' align='center'><b>$Lang::tr{'wio image'}</b></td> <td width='14%' align='center'><b>$Lang::tr{'wio_connected'}</b></td> </tr> ";
- foreach $key (keys %ovpnconfighash) { +foreach $key (keys %ovpnconfighash) {
- my ( $ovpnclt, $ovpntime, $ovpnrwip, $ovpncheck ) = ''; + my ( $ovpncheck, $ovpntime, $ovpnclt, $ovpnrwip ) = '';
- if ( -e '/var/log/wio/.ovpncache' ) { - $ovpncheck = strftime("%d.%m.%Y - %H:%M:%S",localtime(((stat('/var/log/wio/.ovpncache'))[9]))); - } + print"<tr".($idovpn % 2?" bgcolor='$color{'color20'}'":" bgcolor='$color{'color22'}'")." height='20'>";
- print"<tr".($idovpn % 2?" bgcolor='$color{'color20'}'":" bgcolor='$color{'color22'}'")." height='20'>"; + my $ovpnnr = $idovpn+1;
- my $ovpnnr = $idovpn+1; + printf ("<td align='center' height='20'> %02d</td>", $ovpnnr);
- printf ("<td align='center' height='20'> %02d</td>", $ovpnnr); + if ($ovpnconfighash{$key}[3] eq 'net') { + $image = "$imgstatic/ovpnn2n.png"; + $text = "$Lang::tr{'wio_n2n'}"; + } + else { + $image = "$imgstatic/ovpnrw.png"; + $text = "$Lang::tr{'wio_rw'}"; + }
+ if ( $ovpnconfighash{$key}[0] eq 'off' ) { + $status = "${Header::colourblue}"; + $statustxt = "$Lang::tr{'capsclosed'}"; + $ovpncheck = "-"; + } + else { if ($ovpnconfighash{$key}[3] eq 'net') { - $image = "$imgstatic/ovpnn2n.png"; - $text = "$Lang::tr{'wio_n2n'}"; - } - else { - $image = "$imgstatic/ovpnrw.png"; - $text = "$Lang::tr{'wio_rw'}"; - } - - if ( $ovpnconfighash{$key}[0] eq 'off' ) { - $status = "${Header::colourblue}"; - $statustxt = "$Lang::tr{'capsclosed'}"; - } - else { - if ($ovpnconfighash{$key}[3] eq 'net') { - if (-e "/var/run/$ovpnconfighash{$key}[1]n2n.pid") { - my @output = ""; - my @tustate = ""; - my $tport = $ovpnconfighash{$key}[22]; - my $tnet = new Net::Telnet ( Timeout=>5, Errmode=>'return', Port=>$tport); - if ($tport ne '') { - $tnet->open('127.0.0.1'); - @output = $tnet->cmd(String => 'state', Prompt => '/(END.*\n|ERROR:.*\n)/'); - @tustate = split(/,/, $output[1]); - $ovpntime = &WIO::contime(scalar localtime($tustate[0]), "ovpn"); - - if (($tustate[1] eq 'CONNECTED')) { - $status = "${Header::colourgreen}"; - $statustxt = "$Lang::tr{'capsopen'}"; - }else { - $status = "${Header::colourred}"; - $statustxt = "$tustate[1]"; - } + if (-e "/var/run/$ovpnconfighash{$key}[1]n2n.pid") { + my ( @output, @tustate ) = ''; + my $tport = $ovpnconfighash{$key}[22]; + my $tnet = new Net::Telnet ( Timeout=>5, Errmode=>'return', Port=>$tport); + if ($tport ne '') { + $tnet->open('127.0.0.1'); + @output = $tnet->cmd(String => 'state', Prompt => '/(END.*\n|ERROR:.*\n)/'); + @tustate = split(/,/, $output[1]); + $ovpntime = &WIO::contime(scalar localtime($tustate[0]), "ovpn"); + $ovpncheck = strftime("%d.%m.%Y - %H:%M:%S", localtime); + + if (($tustate[1] eq 'CONNECTED')) { + $status = "${Header::colourgreen}"; + $statustxt = "$Lang::tr{'capsopen'}"; + $ovpnrwip = $ovpnconfighash{$key}[11]; + } + else { + $status = "${Header::colourred}"; + $statustxt = "$tustate[1]"; } } } - else { - foreach (@ovpnstatus) { - if ( $_ =~ /^(.+),(\d+.\d+.\d+.\d+:\d+),(\d+),(\d+),(.+)/ ) { - @match = split (m/^(.+),(\d+.\d+.\d+.\d+:\d+),(\d+),(\d+),(.+)/, $_); - $match[1] =~ s/[_]/ /g; - } + } + else { + foreach (@ovpnstatus) { + if ( $_ =~ /^(.+),(\d+.\d+.\d+.\d+:\d+),(\d+),(\d+),(.+)/ ) { + @match = split (m/^(.+),(\d+.\d+.\d+.\d+:\d+),(\d+),(\d+),(.+)/, $_); + $match[1] =~ s/[_]/ /g; + }
- if ( $match[1] ne "Common Name" && ($match[1] eq $ovpnconfighash{$key}[2]) ) { - $ovpnclt = $match[1]; - $ovpntime = &WIO::contime($match[5], "ovpn"); - } + if ( $match[1] ne "Common Name" && ($match[1] eq $ovpnconfighash{$key}[2]) ) { + $ovpnclt = $match[1]; + $ovpntime = &WIO::contime($match[5], "ovpn"); + }
- if ( $_ =~ /^(\d+.\d+.\d+.\d+),(.+),(\d+.\d+.\d+.\d+:\d+),(.+)/ ) { - @match = split(m/^(\d+.\d+.\d+.\d+),(.+),(\d+.\d+.\d+.\d+:\d+),(.+)/, $_); - } + if ( $_ =~ /^(\d+.\d+.\d+.\d+),(.+),(\d+.\d+.\d+.\d+:\d+),(.+)/ ) { + @match = split(m/^(\d+.\d+.\d+.\d+),(.+),(\d+.\d+.\d+.\d+:\d+),(.+)/, $_); + }
- if ( $match[1] ne "Virtual Address" && $match[2] eq $ovpnclt ) { - $ovpnrwip = $match[1]; - $ovpncheck = &WIO::statustime($match[4]); - } + if ( $match[1] ne "Virtual Address" && $match[2] eq $ovpnclt ) { + $ovpnrwip = $match[1]; + $ovpncheck = &WIO::statustime($match[4]); + }
- if ( $ovpnclt eq $ovpnconfighash{$key}[2] ) { - $status = "${Header::colourgreen}"; - $statustxt = "$Lang::tr{'capsopen'}"; - } - else { - $status = "${Header::colourred}"; - $statustxt = "$Lang::tr{'capsclosed'}"; - } + if ( $ovpnclt eq $ovpnconfighash{$key}[2] ) { + $status = "${Header::colourgreen}"; + $statustxt = "$Lang::tr{'capsopen'}"; + } + else { + $status = "${Header::colourred}"; + $statustxt = "$Lang::tr{'capsclosed'}"; } } -} + } + }
- print" - <td align='center'>".(defined($ovpncheck)? "$ovpncheck" : "-")."</td> - <td align='center'>".(defined($ovpnrwip)? "$ovpnrwip" : "-")."</td> +print" + <td align='center'>".(defined($ovpncheck) ? "$ovpncheck" : "-")."</td> + <td align='center'>".($ovpnconfighash{$key}[2] eq '%auth-dn' ? "$ovpnconfighash{$key}[9]" : ($ovpnconfighash{$key}[4] eq 'cert' ? "$ovpnconfighash{$key}[1]": "-"))."</td> <td align='center'><img align='middle' src='$image' alt='$text' title='$text' /></td> - <td align='center'>".($ovpnconfighash{$key}[2] eq '%auth-dn' ? "$ovpnconfighash{$key}[9]" : ($ovpnconfighash{$key}[4] eq 'cert' ? "$ovpnconfighash{$key}[2]": " "))."</td> + <td align='center'>".($ovpnrwip ne '' ? "$ovpnrwip" : "-")."</td> <td align='center'><table bgcolor='$status' cellpadding='2' cellspacing='0' width='100%'><tr height='20'><td align='center'><font color='white'><b>$statustxt</b></font></td></tr></table></td> - <td align='center'>".(defined($ovpntime)? "$ovpntime" : "-")."</td> + <td align='center'>".(defined($ovpntime) ? "$ovpntime" : "-")."</td> </tr> "; - if ($ovpnconfighash{$key}[25] && $wiosettings{'CLIENTREMARK'} eq 'on') { - print"<tr".($idovpn % 2?" bgcolor='$color{'color20'}'":" bgcolor='$color{'color22'}'")." height='20'><td> </td><td colspan='16' align='left'>$ovpnconfighash{$key}[25]</td></tr>"; - }
- print"<tr height='1'><td colspan='17' bgcolor='#696565'></td></tr>"; - $idovpn++ - } - print"</table>"; - &hrline(); +if ($wiosettings{'CLIENTREMARK'} eq 'on') { + print"<tr".($idovpn % 2?" bgcolor='$color{'color20'}'":" bgcolor='$color{'color22'}'")." height='20'><td> </td><td colspan='16' align='left'>".($ovpnconfighash{$key}[25] ne '' ? "$ovpnconfighash{$key}[25]" : "-")."</td></tr>"; +} + +print"<tr height='1'><td colspan='17' bgcolor='#696565'></td></tr>"; +$idovpn++ +} + +print"</table>"; +&hrline(); } -#}
## client status
@@ -1424,9 +1429,9 @@ print" <td width='4%' align='center'><b>$Lang::tr{'wio_webinterface'}</b></td> <td width='11%' align='center'><a href='$ENV{'SCRIPT_NAME'}?IPADR'><b>$Lang::tr{'wio ipadress'}</b></a></td> <td width='5%' align='center'><b>$Lang::tr{'wio network'}</b></td> - <td width='20%' align='center'><a href='$ENV{'SCRIPT_NAME'}?HOST'><b>$Lang::tr{'wio name'}</b></a></td> - <td width='11%' align='center'><b>$Lang::tr{'wio image'}</b></td> - <td width='4%' align='center'><form method='post' action='$ENV{'SCRIPT_NAME'}' enctype='multipart/form-data'><input type='hidden' name='ACTION' value='$Lang::tr{'wio_refresh'}' /><input type='image' name='$Lang::tr{'wio_refresh'}' src='$imgstatic/refresh.png' align='middle' alt='$Lang::tr{'wio_refresh'}' title='$Lang::tr{'wio_refresh'}' /></form></td> + <td width='23%' align='center'><a href='$ENV{'SCRIPT_NAME'}?HOST'><b>$Lang::tr{'wio name'}</b></a></td> + <td width='9%' align='center'><b>$Lang::tr{'wio image'}</b></td> + <td width='3%' align='center'><form method='post' action='$ENV{'SCRIPT_NAME'}' enctype='multipart/form-data'><input type='hidden' name='ACTION' value='$Lang::tr{'wio_refresh'}' /><input type='image' name='$Lang::tr{'wio_refresh'}' src='$imgstatic/refresh.png' align='middle' alt='$Lang::tr{'wio_refresh'}' title='$Lang::tr{'wio_refresh'}' /></form></td> <td width='4%' colspan='2' align='center'><b>$Lang::tr{'wio_dyndns'}</b></td> <td width='12%' colspan='4' align='center'><b>$Lang::tr{'action'}</b></td> <td width='3%' align='center'><form method='post' action='$ENV{'SCRIPT_NAME'}' enctype='multipart/form-data'><input type='hidden' name='ACTION' value='$Lang::tr{'wio_remove_all'}' /><input type='image' name='$Lang::tr{'wio_remove_all'}' src='/images/delete.gif' align='middle' alt='$Lang::tr{'wio_remove_all'}' title='$Lang::tr{'wio_remove_all'}' onClick="return confirm('$Lang::tr{'wio_remove_all_hint'}')"/></form></td> @@ -1525,8 +1530,14 @@ my $dotip = length($ipaddresses[$a]) - rindex($ipaddresses[$a],'.'); next if ( $netsettings{"$ic"."_DEV"} eq 'red0' && $netsettings{"RED_TYPE"} eq 'PPPOE'); if ( $netsettings{"$ic"."_DEV"} eq $interface ) { if ( &General::IpInSubnet($ipaddresses[$a], $netsettings{"$ic"."_NETADDRESS"}, $netsettings{"$ic"."_NETMASK"}) ) { - print"<td align='center' height='20'><img src='$imgstatic/$devs_img[$in]' alt='$Lang::tr{$devs_alt[$in]}' title='$Lang::tr{$devs_alt[$in]}' /></td>"; - last SWITCH; + if ( $netsettings{"$ic"."_DEV"} eq 'red0' ) { + print"<td align='center' height='20'><img src='$imgstatic/$devs_img[$in]' alt='$Lang::tr{'wio_red_lan'}' title='$Lang::tr{'wio_red_lan'}' /></td>"; + } + else { + print"<td align='center' height='20'><img src='$imgstatic/$devs_img[$in]' alt='$Lang::tr{$devs_alt[$in]}' title='$Lang::tr{$devs_alt[$in]}' /></td>"; + + } + last SWITCH; } } $in++; @@ -1545,7 +1556,7 @@ my $dotip = length($ipaddresses[$a]) - rindex($ipaddresses[$a],'.'); $vpnn2nmask = length($net[1]) - rindex($net[1],'.');
if (substr($ipaddresses[$a],0,length($ipaddresses[$a])-$dotip) eq substr($vpnn2nip,0,length($vpnn2nip)-$vpnn2nmask)) { - print"<td align='center'><img align='middle' src='$imgstatic/vpn.png' alt='IPSec' title='IPSec' /></td>"; + print"<td align='center'><img align='middle' src='$imgstatic/vpn.png' alt='IPsec' title='IPsec' /></td>"; last SWITCH; } } @@ -1584,7 +1595,7 @@ my $dotip = length($ipaddresses[$a]) - rindex($ipaddresses[$a],'.'); my $red_netaddress = Network::get_netaddress("$rednet[0]/$red_netmask");
if ( &General::IpInSubnet($ipaddresses[$a], $red_netaddress, $red_netmask) ) { - print"<td align='center' height='20'><img src='$imgstatic/red.png' alt='$Lang::tr{'wio_red_lan'}' title='$Lang::tr{'wio_red_lan'}' /></td>"; + print"<td align='center' height='20'><img src='$imgstatic/red.png' alt='$Lang::tr{'internet'}' title='$Lang::tr{'internet'}' /></td>"; last SWITCH; } } @@ -1671,8 +1682,8 @@ print" <input type='hidden' name='ID' value='$a' /></form></td></tr> ";
-if ($remark[$a] && $wiosettings{'CLIENTREMARK'} eq 'on') { - print"<tr".($a % 2?" bgcolor='$color{'color20'}'":" bgcolor='$color{'color22'}'")." height='20'><td> </td><td colspan='16' align='left'>$remark[$a]</td></tr>"; +if ($wiosettings{'CLIENTREMARK'} eq 'on') { + print"<tr".($a % 2?" bgcolor='$color{'color20'}'":" bgcolor='$color{'color22'}'")." height='20'><td> </td><td colspan='16' align='left'>".($remark[$a] ne '' ? "$remark[$a]" : "-")."</td></tr>"; } print"<tr height='1'><td colspan='17' bgcolor='#696565'></td></tr>"; } @@ -1898,7 +1909,7 @@ SWITCH: { my $red_netaddress = Network::get_netaddress("$rednet[0]/$red_netmask");
if ( &General::IpInSubnet($line[1], $red_netaddress, $red_netmask) ) { - print"<td align='center' height='20'><img src='$imgstatic/red.png' alt='$Lang::tr{'wio_red_lan'}' title='$Lang::tr{'wio_red_lan'}' /></td>"; + print"<td align='center' height='20'><img src='$imgstatic/red.png' alt='$Lang::tr{'internet'}' title='$Lang::tr{'internet'}' /></td>"; last SWITCH; } else { @@ -1949,32 +1960,32 @@ print" <tr><td colspan='3'> </td></tr> <tr bgcolor='$color{'color22'}'> <form method='post' action='/cgi-bin/wio.cgi' enctype='multipart/form-data'> - <td width='35%' align='right'>$Lang::tr{'wio_import_csv'} </td> + <td width='33%' align='right'>$Lang::tr{'wio_import_csv'} </td> <td width='40%' align='center'><input type='file' name='CSVFILE' size='30' /></td> - <td width='25%' align='right'><input type='hidden' name='ACTION' value='$Lang::tr{'wio_import'}1' /><input type='submit' name='SUBMIT' value='$Lang::tr{'wio_import'}' /></td> + <td width='27%' align='right'><input type='hidden' name='ACTION' value='$Lang::tr{'wio_import'}1' /><input type='submit' name='SUBMIT' value='$Lang::tr{'wio_import'}' /></td> </form> </tr> <tr><td colspan='3'> </td></tr> <tr bgcolor='$color{'color22'}'> <form method='post' action='/cgi-bin/wio.cgi' enctype='multipart/form-data'> - <td width='35%' align='right'>$Lang::tr{'wio_import_hosts'} </td> + <td width='33%' align='right'>$Lang::tr{'wio_import_hosts'} </td> <td width='40%' align='center'> </td> - <td width='25%' align='right'><input type='hidden' name='ACTION' value='$Lang::tr{'wio_import'}2' /><input type='submit' name='SUBMIT' value='$Lang::tr{'wio_import'}' /></td> + <td width='27%' align='right'><input type='hidden' name='ACTION' value='$Lang::tr{'wio_import'}2' /><input type='submit' name='SUBMIT' value='$Lang::tr{'wio_import'}' /></td> </form> </tr> <tr><td colspan='3'> </td></tr> <tr bgcolor='$color{'color22'}'> <form method='post' action='/cgi-bin/wio.cgi' enctype='multipart/form-data'> - <td width='35%' align='right'>$Lang::tr{'wio_import_fixleases'} </td> + <td width='33%' align='right'>$Lang::tr{'wio_import_fixleases'} </td> <td width='40%' align='center'> </td> - <td width='25%' align='right'><input type='hidden' name='ACTION' value='$Lang::tr{'wio_import'}3' /><input type='submit' name='SUBMIT' value='$Lang::tr{'wio_import'}' /></td> + <td width='27%' align='right'><input type='hidden' name='ACTION' value='$Lang::tr{'wio_import'}3' /><input type='submit' name='SUBMIT' value='$Lang::tr{'wio_import'}' /></td> </form> </tr> </table> "; }
-&hrline; +&hrline();
print" <table border='0' width='100%' bordercolor='$Header::bordercolour' cellspacing='0' cellpadding='0' style='border-collapse: collapse'> @@ -1997,6 +2008,7 @@ print" foreach (keys(%ifacecolor)) { if ( $_ eq 'GREEN' ) { $color = "$Header::colourgreen"; $net = $Lang::tr{'wio_net_scan_green'}; } elsif ( $_ eq 'BLUE' ) { $color = "$Header::colourblue"; $net = $Lang::tr{'wio_net_scan_blue'}; } + elsif ( $_ eq 'RED' ) { $color = "$Header::colourred"; $net = $Lang::tr{'wio_net_scan_red'}; } else { $color = "$Header::colourorange"; $net = $Lang::tr{'wio_net_scan_orange'}; }
if ( $netsettings{"${_}_DEV"} eq 'disabled' || $netsettings{"${_}_DEV"} eq '' || $netsettings{"${_}_ADDRESS"} eq '' ) { next; } @@ -2004,9 +2016,9 @@ foreach (keys(%ifacecolor)) { print <<END;
<tr bgcolor='$color{'color22'}'> - <td width='35%' align='right'><form method='post' action='$ENV{'SCRIPT_NAME'}' enctype='multipart/form-data'>$Lang::tr{'wio_net_scan_vl'} <font color='$color'><b>$net</b></font> $Lang::tr{'wio_net_scan_l'}<font color='$color'><b> $netsettings{"${_}_DEV"} </b></font>$Lang::tr{'wio_net_scan_r'}</td> + <td width='33%' align='right'><form method='post' action='$ENV{'SCRIPT_NAME'}' enctype='multipart/form-data'>$Lang::tr{'wio_net_scan_l'} <font color='$color'><b>$net </b></font>$Lang::tr{'wio_net_scan_r'}</td> <td width='40%' align='center'><input type='text' name='${_}_IPLOW' value='$wiosettings{"${_}_IPLOW"}' size='14' STYLE='background-color:$color; text-align: center; color:white' /> - <input type='text' name='${_}_IPHIGH' value='$wiosettings{"${_}_IPHIGH"}' size='14' STYLE='background-color:$color; text-align: center; color:white' /></td> - <td width='25%' align='right'><input type='hidden' name='ACTION' value='$ifacecolor{$_}' /><input type='hidden' name='ID' value='$netsettings{"${_}_DEV"}' /><input type='submit' name='SUBMIT' value='$Lang::tr{'wio_net_scan_run'}'></form></td> + <td width='27%' align='right'><input type='hidden' name='ACTION' value='$ifacecolor{$_}' /><input type='hidden' name='ID' value='$netsettings{"${_}_DEV"}' /><input type='submit' name='SUBMIT' value='$Lang::tr{'wio_net_scan_run'}'></form></td> </tr> <tr> <td colspan='3'> </td> @@ -2149,14 +2161,6 @@ print"<table width='100%'><tr><td colspan='2' height='35'><hr></td></tr></table>
############################################################################################################################
-sub back { - -print"<table width='100%'><tr><td width='10%'><a href='/cgi-bin/wio.cgi'><img src='/images/wio/back.png' alt='$Lang::tr{'wio_back'}' title='$Lang::tr{'wio_back'}' /></a></td><td> </td></tr></table>"; - -} - -############################################################################################################################ - sub loadips {
&General::readhasharray($ipadrfile, %ipshash); diff --git a/src/wio/wiographs.cgi b/src/wio/wiographs.cgi index 29435f6b1..8d64325aa 100644 --- a/src/wio/wiographs.cgi +++ b/src/wio/wiographs.cgi @@ -21,9 +21,9 @@ # # ############################################################################### # -# Version: 2020/26/04 19:35:23 +# Version: 2020/05/26 11:01:23 # -# This wiographs.cgi is based on the Code from the IPCop WIO Addon +# This wiographs.cgi is based on the code from the IPCop WIO Addon # and is extremly adapted to work with IPFire. # # Autor: Stephan Feddersen @@ -56,7 +56,7 @@ $querry[2] = '' unless defined $querry[2]; # hostname if ($querry[0] =~ "$hostid") { print "Content-type: image/png\n\n"; binmode(STDOUT); - &WIOGraphs::wio($querry[0], $querry[2], $querry[1]); + &WIOGraphs::wiograph($querry[0], $querry[2], $querry[1]); } else { &Header::showhttpheaders();
hooks/post-receive -- IPFire 2.x development tree