Commit Graph

2260 Commits

Author SHA1 Message Date
Erik Kapfer
73735ad99c OpenVPN: Fix for N2N plausibility checks
Fixes #12335
If no N2N name has been set, no directory and config has been created so it can not be deleted.

'goto VPNCONF_ERROR;' has been missing for N2N checks.
Fixed also code formatting.

Signed-off-by: Erik Kapfer <ummeegge@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-05-09 11:42:24 +00:00
Michael Tremer
708f2b7368 openvpn: Add metrics script
This script is called when an OpenVPN Roadwarrior client
connects or disconnect and logs the start and duration
of the session.

This can be used to monitor session duration and data transfer.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-05-01 19:18:00 +00:00
Michael Tremer
186c0ddd91 OpenVPN Log: Add connection duration
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-05-01 19:15:25 +00:00
Stefan Schantl
b10612e8ba ovpnclients.dat: Align traffic values to the right side.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-05-01 19:14:58 +00:00
Stefan Schantl
7b54c0fb7b ovpnclients.dat: Fix type in received.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-05-01 19:14:48 +00:00
Stefan Schantl
e1cc1e6cb9 ovpnclients.dat: Do not perform DB actions if there is an error message.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-05-01 19:14:21 +00:00
Stefan Schantl
0f195a5305 ovpnclients.dat: Display error when the to date is not later than the from date.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-05-01 19:14:11 +00:00
Stefan Schantl
c7d55d7fbd ovpnclients.dat: Display a notice if there are no entries.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-05-01 19:13:57 +00:00
Stefan Schantl
1242cb0134 ovpnclients.dat: Convert timestamps into localtime.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-05-01 19:13:46 +00:00
Stefan Schantl
d5b6023c32 ovpnclients.dat: Add table header.
The header will be dynamically generated, according the items which will
be displayed.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-05-01 19:13:28 +00:00
Stefan Schantl
8615383823 ovpnclients.dat: Display traffic details in a human-readable format.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-05-01 19:12:51 +00:00
Stefan Schantl
6317d55c4a ovpnclients.dat: Fix hard coded language string
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-05-01 19:12:28 +00:00
Michael Tremer
70e1d58745 OpenVPN: Fix query when selecting sessions only
Previously some sessions were selected which did not qualify
for the search.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-05-01 19:12:10 +00:00
Stefan Schantl
3e10b3de4a openvpn: Add WUI page for client usage statistics
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-05-01 19:11:50 +00:00
Peter Müller
003fb6f608 system.cgi: correctly translate CPU frequency
The CPU frequency diagram used the same "translation" as the CPU load,
which was confusing. This patch introduces a dedicated translation for
"CPU frequency", which makes things a little bit better but still does
not solve a Deppenleerzeichen ("CPU-Frequenz Diagramm") in the German
translation.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-04-30 15:07:06 +00:00
Matthias Fischer
29f35b79c7 traffic.cgi: Changed time interval for vnstat graphs from 5 to 1 minute
This keeps the graphs a bit more "updated".

From 'man vnstat':
'-c (--cache-time) => Update output file only if at least *time* minutes
have passed since the previous file update.

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-04-30 14:55:51 +00:00
Arne Fitzenreiter
89445161b0 core144: start update
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-04-12 08:14:26 +02:00
Michael Tremer
bb90622c2c zoneconf.cgi: Skip checks for non-existing zones
On systems with RED on PPP and no BLUE or ORANGE zones,
there would always be an error when handling non-existant input.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-04-07 08:58:48 +00:00
Stefan Schantl
e698090e7f IDS: Dynamically generate and import the HTTP ports.
With this commit suricata reads the HTTP port declarations from a newly
introduced external file
(/var/ipfire/suricata/suricata-http-ports.yaml).

This file dynamically will be generated. HTTP ports always are the
default port "80" and "81" for update Accelerator and HTTP access to the
WUI. In case the Web-proxy is used, the configured proxy port and/or Transparent
Proxy port also will be declared as a HTTP port and written to that file.

In case one of the proxy ports will be changed, the HTTP port file will
be re-generated and suricate restarted if launched. Also if an old
backup with snort will be restored the convert script handles the
generation of the HTTP ports file.

Finally the suricata-generate-http-ports-file as a tiny script which
simply generates the http ports file and needs to be launched during the
installation of a core update. (The script will no be required
anymore, so it could be deleted afterwards.)

Fixes #12308.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-04-06 14:04:00 +00:00
Stefan Schantl
1622e5c1f3 ids.cgi: Fix logic if suricata needs to be restarted.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-04-06 14:02:59 +00:00
Stefan Schantl
af8e5145fa ids.cgi: Restart suricata if necessary when altering the ruleset.
Suricata does support re-reading it's configuration files and therfore
we need to restart it, if one or more ruleset files should be loaded or
not loaded anymore.

If simple some rules inside the same files are activated or deactivated
we are still fine to call the reload method to send suricata the signal
to reload its ruleset.

Fixes #12340.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-04-01 14:41:51 +00:00
Arne Fitzenreiter
81ebfac70d vpnmain.cgi: fix string
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-03-30 17:25:08 +00:00
Michael Tremer
610108ffbd Fix accidentially reverted IKE lifetime limit to 24 hours
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-03-30 17:21:25 +00:00
Peter Müller
d07286de46 mail.cgi: add support for implicit TLS usage
The second version of this patchset fixes reading empty configuration
files and superseds the first version (duh!).

Fixes #12161

Reported-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Tested-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-03-30 16:45:11 +00:00
Erik Kapfer
fa4dbe2745 OpenVPN: Delete RRD dir if connection is deleted
Signed-off-by: Erik Kapfer <ummeegge@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-03-30 16:29:57 +00:00
Stefan Schantl
7ad653cc09 ovpnmain.cgi: Validate CCDNet name when renaming it.
Fixes #12282

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-03-26 17:51:04 +00:00
Peter Müller
fdf3e9a96b netother.cgi: show content of routing table 220
Since IPsec routing information do not show up in the normal routing
table, also displaying the contents of table 220 on netother.cgi might
be useful for debugging purposes.

The second version of this patch omits the output if routing table 220
is empty and introduces a custom translation for IPsec routing table
entries instead of just adding the table number to the generic translation.

Cc: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-03-26 10:02:52 +00:00
Erik Kapfer
6ad43b0f21 OpenVPN: Stop N2N connection before remove.
Fix #12334

Signed-off-by: Erik Kapfer <ummeegge@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-03-26 09:44:03 +00:00
Peter Müller
99644abaf5 fireinfo.cgi: improve readability of command outputs
Especially when it comes to the output of "uname -a", <code> tags
greatly improve readability.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-03-21 16:11:37 +00:00
Peter Müller
2dfbb338e1 dhcp.cgi: avoid unnecessary line break
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-03-21 16:11:25 +00:00
Arne Fitzenreiter
592be1d206 bluetooth: drop outdated bluetooth addon
The cgi support only rfcomm modem dialup. This is not used by modern hardware.
Also the used bluez stack version is outdated long time.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
Acked-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-03-21 15:41:22 +00:00
Arne Fitzenreiter
80bed5817d dns.cgi: restart suricata before unbound reload
if unbound is reloaded it start a bunch of dns queries
so suricata needs to now which servers should used.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-03-04 21:38:24 +00:00
Stefan Schantl
fd90cadc97 fireinfo.cgi: Use pakfire lib to gather the pakfire version.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-02-24 19:19:21 +00:00
Michael Tremer
18e97c76b0 dns.cgi: Do not show table header if no servers are configured
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-02-16 15:58:09 +00:00
Stefan Schantl
77ea7462bc proxy.cgi: Switch to MD5 hashed passwords for local user auth.
The former used default Crypt algorithmus only supports passwords up to
eight signs wheater MD5 does not have any limitation here.

Fixes 12290.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-02-16 15:49:13 +00:00
Michael Tremer
f61be862c6 pakfire.cgi: Add UI to select repository
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-02-15 11:08:43 +00:00
Michael Tremer
131f163ce8 pakfire.cgi: Rename %pakfiresettings to %cgiparams
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-02-15 11:08:28 +00:00
Michael Tremer
e63fc18d07 pakfire.cgi: Remove some old settings
These can no longer be modified in the GUI and are used nowhere.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-02-15 11:08:13 +00:00
Michael Tremer
d74d6844fd pppsetup.cgi: Drop DNS setting
This has already been dropped and should not be added again
to the configuration file.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-01-31 10:04:14 +00:00
Arne Fitzenreiter
f2d2c69787 dns.cgi: increase timeout to 5s
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-01-30 12:24:24 +00:00
Michael Tremer
e2338aa7ef make.sh: Modify update-contributors so that it will run with older version of awk
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-01-29 11:59:21 +01:00
Michael Tremer
38f51465c9 dns.cgi: Shorten time when checking if DNS is alive
For localhost, one second should be plenty

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-01-29 11:47:35 +01:00
Michael Tremer
351ad526b2 dns.cgi: Show recursor mode message even when we have some servers to show
The message was not shown when we have received DNS servers from the
provider.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-01-29 11:40:59 +01:00
Stefan Schantl
4a791d2ab9 dns.cgi: Display when unbound is running in recursor mode.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-01-21 19:33:43 +00:00
Michael Tremer
87bee81c56 Update list of contributors
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-01-16 18:22:14 +00:00
Stefan Schantl
19602b681f dns.cgi: Fix ID and greater than checks.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-01-14 21:01:44 +00:00
Stefan Schantl
3a5866ac2b dns.cgi: Set kdig params for timeout and retry back to default.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Acked-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-01-14 21:01:42 +00:00
Arne Fitzenreiter
61cc563558 Merge remote-tracking branch 'ms/next-dns-ng' into next 2020-01-13 21:42:49 +00:00
Michael Tremer
77c454b267 dnsforward.cgi: Reloading unbound is enough to apply changes
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-01-13 21:13:03 +01:00
Michael Tremer
d37cdb1bf8 hosts.cgi: Hosts can now be imported when reloading unbound
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-01-13 21:12:02 +01:00