Commit Graph

2933 Commits

Author SHA1 Message Date
Adolf Belka
18bece0edb web-user-interface: Addition of new icon for secure connection certificate download
- This uses a padlock icon from https://commons.wikimedia.org/wiki/File:Encrypted.png
- The license for this image is the following:-
   This library is free software; you can redistribute it and/or modify it under the terms
   of the GNU Lesser General Public License as published by the Free Software Foundation;
   either version 2.1 of the License, or (at your option) any later version. This library
   is distributed in the hope that it will be useful, but without any warranty; without
   even the implied warranty of merchantability or fitness for a particular purpose. See
   version 2.1 and version 3 of the GNU Lesser General Public License for more details.
- Based on the above license I believe it can be used by IPFire covered by the GNU General
   Public License that is used for it.
- The icon image was made by taking the existing openvpn.png file and superimposing the
   padlock icon on top of it at a 12x12 pixel format and naming it openvpn_encrypted.png

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
2023-05-18 09:51:09 +00:00
Adolf Belka
762c88ec4d ovpnmain.cgi: Fix for bug#11048 - insecure download icon shown for connections with a password
- The insecure package download icon is shown if entry 41 in /var/ipfire/ovpn/ovpnconfig
   is set to no-pass. The code block on ovpnmain.cgi that deals with this checks if the
   connection is a host and if the first password entry is a null. Then it adds no-pass
   to ovpnconfig.
- The same block of code is also used for when he connection is edited. However at this
   stage the password entry is back to null because the password value is only kept until
   the connection has been saved. Therefore doing an edit results in the password value
   being taken as null even for connections with a password.
- This fix enters no-pass if the connection type is host and the password is null, pass if
   the connection type is host and the password has characters. If the connection type is
   net then no-pass is used as net2net connections dop not have encrypted certificates.
- The code has been changed to show a different icon for unencrypted and encrypted
   certificates.
- Separate patches are provided for the language file change, the provision of a new icon
   and the code for the update.sh script for the Core Update to update all existing
   connections, if any exist, to have either pass or no-pass in index 41.
- This patch set was a joint collaboration between Erik Kapfer and Adolf Belka
- Patch set, including the code for the Core Update 175 update.sh script has been tested
   on a vm testbed

Fixes: Bug#11048
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Tested-by: Erik Kapfer <ummeegge@ipfire.org>
Suggested-by: Adolf Belka <adolf.belka@ipfire.org>
Suggested-by: Erik Kapfer <ummeegge@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
2023-05-18 09:51:09 +00:00
Adolf Belka
5a6134e2a6 wio: move cgi files to standard IPFire location
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
2023-05-18 09:47:46 +00:00
Adolf Belka
4e908f84c7 wio: images moved to standard IPFire location
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
2023-05-18 09:47:46 +00:00
Peter Müller
15d8e278ba Run ./make.sh update-contributors
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2023-05-11 20:34:43 +00:00
Stefan Schantl
c797789c1f backup.cgi: Read and deliver the requested backup in pieces
Read-in the requested backup file line by line and directly deliver this
as stream to the client.

This fixes the problem with very big backups on systems with very
limited RAM, which resulted in an OOM kill of the CGI and delivery
process.

Fixes #13096.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
2023-05-11 20:07:13 +00:00
Robin Roevens
957b6f92b9 Add Zabbix Agent to logviewer
- Configure Zabbix Agent to log to syslog instead of its own logs.
- Remove old zabbix log-dir and logrotate settings from rootfile, lfs
  and install-script.
- Update log.dat to view Zabbix Agent logging from syslog.

Signed-off-by: Robin Roevens <robin.roevens@disroot.org>
2023-05-11 20:03:27 +00:00
Peter Müller
a201764e75 ovpnmain.cgi: Do not determine certificate expiry status for N2N connections
https://wiki.ipfire.org/devel/telco/2023-04-03

Fixes: #13066
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2023-04-04 20:25:55 +00:00
Leo-Andres Hofmann
138b26e014 Drop support for entropy graph
Entropy data isn't collected anymore. See 8000bc0 for reference.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
2023-03-13 21:37:39 +00:00
Peter Müller
8014198eb6 Run ./make.sh update-contributors
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2023-03-11 17:06:16 +00:00
Adolf Belka
71604352ca procy.cgi: Fix bug#12701 - remove advproxy wpad notice line
- This line is no longer needed with the help button at the top of each WUI page that was
   implemented by @Leo
- Sorry for long time for me to get around to finalising this patch but it is done now.

Fixes: bug#12701
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
2023-03-11 16:31:57 +00:00
Adolf Belka
14051bfeb5 updatexlrator.cgi: Update to naming of variables in css section
- This updates the updatexlrator.cgi page to the same central use of extraHead from
   header.pl and simplifying of css variables where appropriate.
- The variables for the percentage bar will also be able to be used in other cgi pages
   with a percent bar.

Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
2023-03-11 16:30:39 +00:00
Adolf Belka
d3aec71828 dhcp.cgi: Update to naming of variables in css section
- After looking at other .cgi files I realised that I had named the variables based on
   their dhcp usage only. However colouryellow or color20 etc can be used not only in a
   row but also in a cell or a column. Rather than ending up with multiple copies of the
   same colour for rows, cells, columns etc I have simplified the variable names to just
   the colour. They can then be used in whatever situation is wanted. The rest of the cgi
   code will give the view of what structure the colour is being applied to.
- This will limit the number of different css variables defined in the header.pl file

Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
2023-03-11 16:30:39 +00:00
Stefan Schantl
44ea49fa75 traffic.cgi: Do not use hard-coded red interface name
If QMI is used the dial in mode has to be set as ppp dialin but the
interface name is red. In such a case the old code tried to display
the stats for the ppp0 interface which is wrong.

This patch fixes this issue by calling the handy function to get
the correct interface name for red.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2023-03-11 16:29:43 +00:00
Stefan Schantl
0450dce6f6 ipblocklist.cgi: Fix settings checkbox handling
Checkboxes does not submit any values if they are not checked.
Default them to "off" in such a case.

This fixes the issue not beeing able to disable the logging.

Fixes #12979.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Adolf Belka <adolf.belka@ipfire.org>
2023-03-11 16:27:32 +00:00
Adolf Belka
282e3fe4fb log.dat: Fixes Bug#12922 - adjusts regex to catch hostname for hostname or FQDN
- Most of the packages being searched for in the system logs section only put hostname into
   the logs. However HAProxy puts the FQDN. Reviewing RFC 5424 shows that this is following
   the requirements. The preferred order fromn the RFC is
   1.  FQDN
   2.  Static IP address
   3.  hostname
   4.  Dynamic IP address
   5.  the NILVALUE
- Most of the programs are using option 3 but option 1 is valid for HAProxy
- The regex change filters out the hostname from the FQDN if an extra 'dot' is present

Fixes: Bug#12922
Suggested-by: Michael <ip.fire@die-fritzens.de>
Tested-by: Michael <ip.fire@die-fritzens.de>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
2023-03-11 16:19:41 +00:00
Adolf Belka
452fd239f0 log.dat: Fix bug#12922 - add HAProxy to System Log drop down list
Fixes: Bug#12922
Suggested-by: Michael <ip.fire@die-fritzens.de>
Tested-by: Michael <ip.fire@die-fritzens.de>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
2023-03-11 16:19:40 +00:00
Adolf Belka
7721b92500 updatexlrator.cgi: Fixes bug#13024 - Table style rendering bug
- This is happening due to the use of bgcolor which has been deprecated since HTML4.01 and
   is no longer supported in HTML5
- Similar approach used here as was used in the same fix for the dhcp.cgi page
- CSS based approach utilised.
- Partially tested in my vm testbed. The percentage bar works withg no problems.
   The table could not be confirmed as in my testbed I don't have updatexlrator running
   as my updates are all based on https and not http.
- The table will need to be confirmed by the bug reporter or someone else that uses
   updatexlrator

Fixes: Bug#13024
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
2023-03-05 15:03:54 +00:00
Jon Murphy
4bb389232e log.dat: Fix an error with 'unbound' logging too much data.
- Make regex "non-greedy"
- grab data up to first occurance of "]" and not last occurance of "]"

Signed-off-by: Jon Murphy <jon.murphy@ipfire.org>
2023-03-05 15:01:31 +00:00
Michael Tremer
498134e5dd OpenVPN: Show indication when OpenVPN certificates expire
This will help with #11742 - OpenVPN: No method to replace expired
certificates.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Acked-by: Peter Müller <peter.mueller@ipfire.org>
2023-03-05 14:50:33 +00:00
Adolf Belka
670981e648 mail.cgi: Fixes bug#13040 - Change multipart/mixed to multipart/alternative
- Thunderbird and Roundcube mail clients presume that any mail with Content Type of
   multipart/mixed has an attachment included rather than actually checking for
   disposition attachment. This means that any mail with multipart/mixed gets the
   attachment icon marked up even though there is no attachment.
- Although this is a problem of the clients involved, in this case the simplest solution
   is to change multipart/mixed to multipart/alternative as the Mail Service test mail only
   sends text without any attachment or other part.
- Confirmed on my vm testbed

Fixes: Bug#13040
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
2023-03-04 14:05:42 +00:00
Adolf Belka
284ebca057 log.dat: Fixes bug#12950 - adding apcupsd to system logs list
- Patch tested out on my production system that has apcupsd running on it. APCUPS was
   in the list of options in the system logs and entries from apcupsd were extracted
   correctly in the wui.

Fixes: Bug#12950
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
2023-03-04 14:03:45 +00:00
Adolf Belka
b52a84ddc7 dhcp.cgi: Fix bug#10629 - Highlight fixed IP's in dynamic range in red
- This v2 patch has moved the extraHead variable into header.pl
- This patch marks all IP's that are in the Fixed list but are also in the dynamic range
   that has been defined, in red.
- Additional function created to check if an ip address is in a defined range.
- Added an additional key item under the Fixed Leases table for Fixed IP in dynamic range
- Added line to English Language file for this key item.
- ./make lang run before commit.
- Tested in vm testbed and confirmed that any ip address in the Fixed Leases table that
   is in the defined dynamic range is highlighted in red
- This uses the css background-color appoach from the first patch in this set.
- This patch only highlights those IP's that overlap in red but does nothing more. So a
   user can still create new ones if they want but they will all show up in red.
- This patch flags up if people are doing things that they shouldn't be doing but allows
   them to continue doing so without changing anything if they don't want to and so will
   not break existing setups.

Fixes: Bug#10629
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
Tested-by: Bernhard Bitsch <bbitsch@ipfire.org>
2023-03-04 13:41:21 +00:00
Adolf Belka
de4dea96aa dhcp.cgi: Fix for bug#10629 - update bgcolor to css
- This v2 version moves the extraHead variable to header.pl as many of the css values
   will be used in many other WUI cgi pages so makes sense to not define anew in every
   location using the bgcolor or other colour variables.
- I will submit patches to follow the same approach in all other WUI cgi pages once this
   has been submitted into next
- bgcolor was deprecated in HTML 4.01 and is not supported by HTML 5
- The orange colour for IP's that are outside the IPFire green and blue subnets does not
   work on any browser I am using.
- I used the CSS approach that @Leo used in the Zone Configuration cgi page
- This patch changes all existing bgcolor entries to the css based background-color
- Tested on my vm testbed and confirmed to work. The Orange colour for IP's outside of
   the subnet now shows up.

Fixes: Bug#10629
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
Tested-by: Bernhard Bitsch <bbitsch@ipfire.org>
2023-03-04 13:41:21 +00:00
Jon Murphy
4941ce0031 services.cgi: avoid experimental warnings
- add single line to code: no warnings 'experimental';
- corrects this issue:
    https://lists.ipfire.org/pipermail/development/2022-December/015113.html

Signed-off-by: Jon Murphy <jon.murphy@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-02-09 16:39:34 +00:00
Peter Müller
5f34747122 Run ./make.sh update-contributors
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2023-01-27 00:19:28 +00:00
Adolf Belka
f99ed82420 ovpnmain.cgi: Fix for bug 13030 - Table style rendering bug
- In six places <td class'base'> has been used instead of <td class='base'>
- This patch fixes that error - tested on my vm testbed. Selecting Inspect Element now
   shows the corrrect result rather than class 'base' being set to null.

Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
2023-01-18 23:10:09 +00:00
Matthias Fischer
a3e8b9bbff ovpnmain.cgi: Translation string 'dh parameter' doesn't exist
Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2022-12-31 10:55:09 +00:00
Peter Müller
a5e11a4cc2 Run ./make.sh update-contributors
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-12-26 08:29:36 +00:00
Michael Tremer
7c3369a623 pppsetup.cgi: Move authentication above MTU
I feel that authentication is more important.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-12-17 17:20:46 +00:00
Michael Tremer
80989cc935 pppsetup.cgi: Add support for QMI profiles
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-12-17 17:20:46 +00:00
Michael Tremer
a0918657c9 network: Drop any traces of ISDN
This has been removed a long time ago and we should probably spend a
little bit more time on keeping the networking code tidy :)

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-12-17 17:20:46 +00:00
Adolf Belka
19a417c2a1 ovpnmain.cgi: Fix for bug in WUI menu on CU172 Testing
- On CU172 Testing Build: master/eb9e29f9 when selecting the OpenVPN menu it showed the
   Diffie-Hellman info and pressing back took you to the same DH page.
- Tested patch suggestion from Erik on vm testbed and confirmed that it worked.

Suggested-by: Erik Kapfer <erik.kapfer@ipfire.org>
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
2022-12-11 11:52:38 +00:00
Robin Roevens
e47370a167 services.cgi: translate "Addon"
* Translate string "Addon" in services.cgi
* Added EN/NL translations
* Correct existing plural DE translation for singular "Add-on"
* Fix usage of the incorrect strings "addon(s)" to correct
  hyphenated "add-on(s)" also in other translation strings for
  EN/NL/DE

Signed-off-by: Robin Roevens <robin.roevens@disroot.org>
2022-11-21 11:19:08 +00:00
Peter Müller
35494eac83 OpenVPN: Replace existing Diffie-Hellman parameter with ffdhe4096
Initial patch: https://git.ipfire.org/?p=people/ummeegge/ipfire-2.x.git;a=commit;h=2ccc799f8bd6a12c3edab5f1a89fab4d2cd05ea8

Minor adjustments to make it apply to the current state of "next", and
removal of chown operation in OpenSSL's LFS file, which would have lead
to the Diffie-Hellman group file being writable by nobody, for which
there is no necessity.

Fixes: #12632
From: Erik Kapfer <erik.kapfer@ipfire.org>
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-11-18 14:38:50 +00:00
Peter Müller
8a0be2033f Tor: Disable SOCKS port if unused
Fixes: #11780
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-11-18 14:37:55 +00:00
Peter Müller
818dde8e8b IPsec/OpenVPN: Use 4,096-bit RSA for host certificates as well
We already moved away from 2048-MODP in Core Update 170. Similarly,
German Federal Office for Information Security (BSI) recommends shifting
away from RSA keys below 3,000 bits by the end of 2022 at the latest.

The only place left in IPFire 2.x where we generate such keys is for
IPsec and OpenVPN host certificates. This patch increases their key
sizes to 4,096 bits as well - CA certificates already have this length.

Existing VPN connections cannot be migrated automatically. However, only
the respective host certificate has to be regenerated - thanks to the CA
certificates' key length being sufficient, there is no need to replace
the entire VPN CA.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
2022-11-03 16:49:51 +00:00
Robin Roevens
8ed997102e services.cgi: add link to addon config if ui exists for it
* If a cgi file exists with the same name as an addon, the
  displayed service will be a link to that cgi file.

Signed-off-by: Robin Roevens <robin.roevens@disroot.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
2022-10-29 08:56:48 +00:00
Robin Roevens
4f205b5442 services.cgi: add restart action and restrict action usage
* Add restart action to services.
* Only display available actions for a service:
  Start when service is stopped or Stop and Restart when a service
  is running.

Signed-off-by: Robin Roevens <robin.roevens@disroot.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
2022-10-29 08:56:48 +00:00
Robin Roevens
207ca1141c services.cgi: minor cosmetics
* Singular 'Service' instead of plural 'Services' as column header of
  services table
* Sort list of services

Signed-off-by: Robin Roevens <robin.roevens@disroot.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
2022-10-29 08:56:48 +00:00
Robin Roevens
2b9b31b71d services.cgi: Fix status/actions on services with name != addon name
* addonctrl's new functionality to control explicit addon services was
  implemented.
* Change 'Addon' column header to 'Addon Service' to be clear that
  it's not addons but services listed here.
* Services not matching the name of the addon now display the addon
  name between parentheses, so the user knows where the service comes
  from.
* When no valid runlevel symlink is found by addonctrl for a service,
  the 'enable on boot' checkbox is replaced by a small exclamation point
  with alt-text "No valid runlevel symlink was found for the initscript of
  this service." to inform user why a service can't be enabled.
* Added German and Dutch translation for above message.

Fixes: Bug#12935
Signed-off-by: Robin Roevens <robin.roevens@disroot.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
2022-10-29 08:56:48 +00:00
Peter Müller
c480cb54f0 Update contributor list
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-10-03 10:07:49 +00:00
Matthias Fischer
e0be9eab47 proxy.cgi: Fix for Bug #12826 'squid >=5 crashes on literal IPv6 addresses'
Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
2022-10-02 08:50:39 +00:00
Adolf Belka
a15c20fde9 log.dat: Add NUT entry for System Logs - Fixes bug#12921
- Also aligned all the code entries in %sections and %trsections

Suggested-by: Michael <ip.fire@die-fritzens.de>
Tested-by: Michael <ip.fire@die-fritzens.de>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
2022-09-23 10:36:33 +00:00
Peter Müller
bd94d36335 Update contributors
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-09-17 09:45:30 +00:00
Jon Murphy
3da3c1848e urlfilter.dat: change ipcop to ipfire
- Removed remnant from IPCop on URL Filter Logs Export page.

Signed-off-by: Jon Murphy <jon.murphy@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
2022-09-11 08:48:00 +00:00
Peter Müller
ce455a00a6 Merge branch 'next' into temp-c171-development 2022-09-11 08:20:29 +00:00
Michael Tremer
ba4f53c565 proxy.cgi: Correctly validate domain lists
Fixes: #12925 - JVN#15411362 Inquiry on vulnerability found in IPFire
Reported-by: Noriko Totsuka <vuls@jpcert.or.jp>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-09-11 08:12:00 +00:00
Michael Tremer
7cb63527d9 mail.cgi: Validate email recipient
The email recipient was not correctly validated which allowed for some
stored cross-site scripting vulnerability.

Fixes: #12925 - JVN#15411362 Inquiry on vulnerability found in IPFire
Reported-by: Noriko Totsuka <vuls@jpcert.or.jp>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-09-11 08:11:56 +00:00
Michael Tremer
a61509b995 index.cgi: Show deprecation warning for armv6l
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2022-09-01 21:15:47 +00:00