Commit Graph

2547 Commits

Author SHA1 Message Date
Michael Tremer
5a4412385f hostaopd: Drop box with links to other configuration pages
We do not have this for any other feature and it clutters the UI.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-04-16 10:03:58 +00:00
Michael Tremer
53d03ef352 hostapd: Find device by MAC address
With wireless device as members in bridges, we cannot predict the name
very well. So we will use the MAC address and find the correct device
name when we launch hostapd.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-04-16 10:03:58 +00:00
Leo-Andres Hofmann
c095f81435 rrdimage: Improve CGI & cosmetic changes
Write graph error messages to the system log, to simplify
further inspection by the user.
Add additional parameter check to prevent a possible redirect loop
if the URL format is changed in the future.

Cosmetic: Use underlining instead of background color for highlighting

Fixes #10643

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-04-12 09:31:18 +00:00
Michael Tremer
e90ef935a5 Update contributors
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-04-08 10:20:40 +00:00
Daniel Weismüller
73476dd9dc Drop support for macvtap
This has been broken because of other changes on the network scripts and
since we now have support for bridges there is no point in supporting
something else that has the same functionality.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-04-08 10:19:55 +00:00
Jonatan Schlag
71ae8d5a0d Delete all themes for the webinterface except the default one
Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-04-08 10:13:02 +00:00
Jonatan Schlag
8186b37230 Hardcode theme to ipfire
This disables the theme support and makes it impossible to use any other
themes than the ipfire default theme.

The only intention of this patch is to hardcode the theme to ipfire.
To change any cgi we have is an ugly way, but the only way to do this
fast. The colour handling needs certainly to be improved as well, but
this will and should be done in other patches.

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-04-08 10:11:34 +00:00
Leo-Andres Hofmann
9c6a0ce12d rrdimage: Switch graphs.pl to the new graph scripts
"makegraphbox" is modified to remove the old iframe method and output
a modern div container instead.
Graph errors are now returned, to be displayed by getrrdimage.cgi.

entropy.cgi and netovpnsrv.cgi are modified to ensure compatibility.

Add cache control HTTP header to image output.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-04-06 10:05:28 +00:00
Leo-Andres Hofmann
9064bc7242 rrdimage: Add CSS and Javascript to ipfire theme
This patch adds styling for the new graph time range buttons
and loads the Javascript in the HTML head.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-04-06 10:03:44 +00:00
Leo-Andres Hofmann
910f1e8494 rrdimage: Add scripts for new graph display method
This patch adds two scripts which will later be used to display graphs:

-> getrrdimage.cgi: Generates PNG images for graphs.
Until now, each CGI with embedded graphs had to be able to output
images. These functions are now gathered in this new script.
The additional parameter handling can be removed and the CGIs can
be simplified. This makes it easier to use and output the graphs.

-> rrdimage.js: Interactive Javascript functions
This allows the user to select time ranges without reloading the page.
In addition, the graphs are now periodically updated, allowing users
to live monitor the data.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-04-06 10:01:15 +00:00
Stefan Schantl
cdfbef5de7 logs.cgi/ids.dat: Change url to sid documentation site.
Fixes #12596.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-04-06 09:57:13 +00:00
Stefan Schantl
5ae1188589 logs.cgi/showrequestfromcountry.dat: Proper lookup country code.
Seems to be a code fragment has been left while switching to
libloc. Now call the right function from location-functions.pl.

Fixes #12599.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-04-06 09:56:15 +00:00
Leo-Andres Hofmann
6c958adf2f Remove unused snortupdateutility.js
This script doesn't seem to be maintained or used anywhere anymore.
The last reference to it was removed in commit 1772664.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Acked-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-03-29 10:27:23 +00:00
Leo-Andres Hofmann
a2f77069aa zoneconf.cgi: Avoid unnecessary MAC address changes
Ensure that a bridge always has a MAC address configured, to prevent
udev/network-hotplug-bridges assigning random addresses at each start.
Cache previously generated MAC addresses so that they are not
regenerated each time the configuration is saved by the user.

Add more comments to existing code.

Fixes: #12583

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-03-25 09:21:59 +00:00
Michael Tremer
9823fd82e1 Update contributors
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-03-22 14:40:03 +00:00
Leo-Andres Hofmann
715aa887b6 zoneconf.cgi: Fix VLAN tag range check
Use the correct VLAN tag range 1-4094 and add an error message
to the range check.
The missing error message was discovered by Jonatan.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-03-22 10:37:47 +00:00
Alexander Marx
284bf12c58 BUG12479: Copied NAT rule in Firewall displays incorrect source Port
Fixes: #12479

When copying a NAT rule in the firewall the existing sourceport is copied, too.
This Fix deletes the sourceport from a copied NAT rule. After Saving, the correct port is used.

Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-03-22 10:36:31 +00:00
Michael Tremer
ef6979b51d Update contributors
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-03-10 14:43:32 +00:00
Michael Tremer
ffafaa71a6 firewall: Remove ALGs from UI
This change drops the UIs that could enable ALGs for various protocols.

Those have been all forcibly disabled because "NAT Slipstream".

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-03-02 18:45:13 +00:00
Leo-Andres Hofmann
01139abbe1 zoneconf.cgi: Add default value for STP and require input
Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-02-22 18:59:12 +00:00
Leo-Andres Hofmann
5262805261 zoneconf.cgi: Import network-functions.pl
Remove custom functions and use network-functions.pl instead to detect
the available zones correctly. This also removes the requirement that
a device must be assigned for a zone to become visible/configurable.

Fixes: #12568

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-02-22 18:58:15 +00:00
Leo-Andres Hofmann
b4434345dc zoneconf.cgi: Add Javascript for new GUI elements
Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-02-22 18:58:13 +00:00
Leo-Andres Hofmann
8de94a23e0 zoneconf.cgi: Add STP options to GUI
Changes & new features:
- Add CSS for STP options, add texts to language files
- Read STP settings from ethernet configuration and display inputs
- Validate and save STP settings

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-02-22 18:58:12 +00:00
Leo-Andres Hofmann
5e6eba884b zoneconf.cgi: Modify CSS to allow additional rows
Simplify borders, load more colors from header and add dividers

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-02-22 18:58:10 +00:00
Leo-Andres Hofmann
63a1c81a63 zoneconf.cgi: Change NIC display order, improve code
Refactor duplicate perl code and add comments

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-02-22 18:58:08 +00:00
Michael Tremer
5459c8a4b7 Merge branch 'master' into next 2021-02-16 17:37:26 +00:00
Michael Tremer
e902ebe3be wirelessclient.cgi: Show when 802.11w is active
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-02-16 17:41:23 +01:00
Michael Tremer
5cdf3b8c78 wirelessclient.cgi: Show when actually connected using WPA3
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-02-16 17:37:07 +01:00
Michael Tremer
d95f360683 wirelessclient.cgi: Show when using WPA3
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-02-16 17:34:02 +01:00
Adolf Belka
896fa74d68 dhcp.cgi: Fix incorrect { placement from patch 3724
- When patch 3724 was created for bug #10743 a curly bracket was placed in the wrong place
This results in the overlap of two if loops meaning that there will be no validity
check carried out on Default Lease Time if Deny Known Clients is not checked.
- This patch moves the { bracket to the right location.

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-02-16 15:02:33 +00:00
Matthias Fischer
6134b588a0 country.cgi: Fix for copy&paste typo
Fixes typo in line 103 (<-> is no tab...)

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-02-15 13:13:54 +00:00
Adolf Belka
f90b0f24a2 wirelessclient.cgi: Fix for bug #12571
- Wirelessclient shows priority 0 to be most preferred and priority 4 as
least preferred. Based on forum posters experience and the wpa_supplicant
man page it is the other way round.
- This patch moves the least preferred title to priority 0 and vice versa
- Will ask bug reporter to test out the patch and confirm it works. The page
is only shown if you have a wifi connection on red.

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-02-12 11:58:59 +00:00
Michael Tremer
8e308e4eb2 Update contributors
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-02-05 16:44:41 +00:00
Michael Tremer
d086a16619 Update contributors
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-02-03 22:31:02 +00:00
Michael Tremer
354c3e2b45 samba: Remove option to chose user group and shell
There is no need for this being implemented and it is dangerous to allow
the user to create any shell accounts or users that belong to groups
with higher privileges.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-01-27 21:06:57 +00:00
Michael Tremer
d9f9f16366 Drop launch-ether-wake
The helper binary is being dropped and etherwake is enabled
for CAP_NET_RAW. This allows execution by unprivileged users
as needed by the web user interface (nobody).

Reported-by: Albert Schwarzkopf <ipfire@quitesimple.org>
Fixes: #12562
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-01-27 21:06:57 +00:00
Leo-Andres Hofmann
abffcc99ad Refactor "get_available_network_zones", move to network-functions.pl
This function nicely translates the ethernet/settings "CONFIG_TYPE"
into a list of available zones. Therefore it should be more accessible!

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-01-25 19:32:38 +00:00
Michael Tremer
5addf34780 wireless client: Add support for WPA3
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-01-12 10:38:59 +00:00
Stefan Schantl
0562cdb360 ddns.cgi: Make dealing with auth tokens more user-friendly.
If a provider supports authentication with a token, now
the username and password fileds will be swapped by some
Java Script code in favour of an input field for the token.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-01-06 15:32:53 +00:00
Michael Tremer
86bd9ccc95 Drop unused Asterisk CGI files
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-01-03 11:17:28 +00:00
Michael Tremer
edd2710520 Drop unused upnp.cgi
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-01-03 11:16:22 +00:00
Matthias Fischer
1d55fccdc5 Syntax fixes in several CGIs
Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-01-03 11:13:47 +00:00
Matthias Fischer
ed7f815266 wlanap.cgi: Cosmetic fix - replace 'Save' image with 'Save' button
Fixed syntax for "value"..

Thanks!

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-12-29 10:16:45 +00:00
Matthias Fischer
6666b93d11 Update (and cosmetic fixes) for 'pakfire.cgi': Added GUI entry for existing, but unused translation string
While preparing the Core153 update, I found by chance that a language string had been added from
Core152 to Core153 which I couldn't find in any CGI-file.

The translation suggested that this string ('Available Updates') could belong to 'pakfire.cgi'.

And I thought that on the pakfire GUI something was actually missing: the heading above the
box listing the 'Available Updates'. Don't know why I didn't saw this before.

So tried to add these missing heading. I hope I made it right...

Some cosmetic fixes:
I also added some space around the text for 'Available Addons' and 'Installed Addons'
because the text lines weren't separated. There is no seen wordwrapping. This required deleting
some unwanted '<br />' in the affected translation strings.

I tried this about 4 years ago, but somehow this patch got lost.

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-12-24 12:00:12 +00:00
Matthias Fischer
f65629dd47 country.cgi: Cosmetic fix for 'Back'-button'
While testing Peter's patch for Bug #12560 I noticed that the standard 'back'-button
at the end of the page - like in 'ipinfo.cgi' - was implemented as a text string.

I just took the code segment with the 'back'-*image* from 'ipinfo.cgi' to make this
link looking similar to the other pages.

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-12-24 11:59:14 +00:00
Peter Müller
4ed49291c2 country.cgi: fix location function call
Fixes: #12560

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-12-24 11:59:08 +00:00
Peter Müller
05f68686a0 remote.cgi: cosmetic changes
- Swap colour generation to improve readability in case of no active SSH logins
- Unify table layout
- Improve German "SSH host key" translation to avoid Deppenleerzeichen

This patch does not introduce functional changes.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-12-23 14:31:56 +00:00
Adolf Belka
9dbf3c4936 Fix for bug 10743
This adds in the option to have "deny known clients" in dhcpd.conf
This is applied to the range command so applies to the dynamic addresses
given.
If you have just a range statement say in blue then if you are not using
vlans you could have the situation where a known host in green might end
up getting a lease from the blue range. Here a deny known-clients makes
sense. Your range in this case would be limited to only unknown clients if
deny known-clients was selected.
dhcp WUI has been modified to add in this command. Error message has been
added to check that a range has been specified if the deny unknown clients
checkbox has been selected.
Language files updated with additional items (English, German & Dutch).

For more information on the history of this please see the bugzilla entry
Signed-off-by: Adolf Belka <ahb.ipfire@gmail.com>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-12-21 16:48:01 +00:00
Michael Tremer
e6575e1a58 Merge branch 'master' into next 2020-12-16 10:33:36 +00:00
Michael Tremer
c4f1f56157 Update contributors
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-12-16 10:33:23 +00:00