Commit Graph

2429 Commits

Author SHA1 Message Date
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
Adolf Belka
d978558809 Fix for bug 12539
The installer recognises cups and cups-filters both as cups and puts
two instances of cups in the add-on services table.
Based on input from Michael Tremer this patch replaces the command
returning the second element between hyphens with one that takes
what comes after "meta-" using Perl code rather than a shell command.
The second find command was changed as per Michael's suggestion.

Tested in my ipfire test bed system and only results in one cups
entry.
Signed-off-by: Adolf Belka <ahb.ipfire@gmail.com>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-12-10 12:59:42 +00:00
Stefan Schantl
00e1105b92 ddns.cgi: Drop static provider list for token based auth.
This is really hard to maintain when adding new or altering existing
providers.

Reference #12415.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-12-08 17:40:03 +00:00
Peter Müller
848911b247 tor.cgi: fix location function call again
This line was accidentially messed up while merging two patchsets
together, causing tor.cgi to crash with an HTTP error 500 in testing.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-12-02 14:56:34 +00:00
Michael Tremer
ebcecb4be4 Revert "OpenVPN: Add start of static routes in client N2N"
This reverts commit 1c612d9e32.

https://lists.ipfire.org/pipermail/development/2020-November/008773.html

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-12-01 16:32:03 +00:00
Leo-Andres Hofmann
5c33a76135 zoneconf.cgi: Add NIC selection highlighting
This improves the usability of the zone configuration by marking assigned
NICs in the zone color. The highlighting is initially applied to the static
HTML output, and JavaScript is used to follow changes made by the user.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-11-27 15:48:02 +00:00
Leo-Andres Hofmann
fc31c28d5c zoneconf.cgi: Improve CSS
- Add an element id so that the styling only affects the zone table
- Alternating row colors are now generated by CSS, remove unneeded Perl code

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-11-27 15:47:59 +00:00
Leo-Andres Hofmann
8797526d36 zoneconf.cgi: Make output HTML 5 standard compliant
This fixes two minor violations of the HTML standard:
- <a> elements may not contain nested <button> elements:
Replace the button with a simple hyperlink, because it was only used as a link anyway.

- "id" attributes may not contain whitespace:
Remove unneeded attribute, use hyphens instead of spaces.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-11-27 15:47:57 +00:00
Leo-Andres Hofmann
96d0c76154 zoneconf.cgi: Clean up HTML output
This adds missing brackets, cleans up the indentation and removes unnecessary CSS.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-11-27 15:47:55 +00:00
Michael Tremer
d6989b4b0b openvpn: Actually apply configured parameters
OpenVPN is an absolute mess. The behaviour of configuration
parameters has been changed over the time; default values have been
changed over time; and it looks like nobody is actually testing
anything any more.

I have been spending hours today on figuring out why OpenVPN
is so damn slow. On a Lightning Wire Labs IPFire Mini Appliance
it achieves about 100 MBit/s in the default configuration when
"openssl speed -evp aes-256-gcm" achieves over 3.5 GBit/s.

Changing any of the cryptography parameters does not change
anything. Throughput remains around 100 MBit/s.

I finally set "cipher none" and "auth none" which disables
encryption and authentication altogether but does not increase
throughput. From here on it was absolutely clear that it was
not a crypto issue.

OpenVPN tries to be smart here and does its own fragmentation.
This is the worst idea I have heard of all day, because that job
is normally done best by the OS.

Various settings which allow the user to "tune" this are grossly
ineffective - let alone it isn't even clear what I am supposed
to configure anywhere. Setting "fragment 1500" weirdly still
does not convince openvpn to generate a packet that is longer
than 1400 bytes. Who'd a thunk?

There is a number of other parameters to set the MTU or which
are related to it (tun-mtu, link-mtu, fragment, mssfix).

On top of all of this we have two "bugs" in ovpnmain.cgi which
are being fixed in this patch:

1) mssfix can be configured by the user. However, we always
   enable it in openvpn. The default is on, we only add "mssfix"
   which simply turns it on.
   It is now being disabled when the user has chosen so in the
   web UI. I do not know if this is backwards-compatible.

2) We cap the MTU (tun-mtu) at 1500 bytes when fragment is being
   used. So it becomes pointless that the user can this and the
   user is not being made aware of this when they hit the save
   button.
   This was added when we added path MTU discovery. Since that
   did not work and was removed, we can remove this now, too.

I archived a solid 500-600 MBit/s of goodput with these settings:

* Disable mssfix
* Set "fragment" to 0
* Set MTU to 9000

I am sure the MTU could be further increased to have bigger packets,
but I did not test how badly this will affect latency of the tunnel.

OpenVPN seems to only be able to handle a certain amount of packets
a second - no matter what. With larger packets, the throughput of
the tunnel increases, but latency might as well.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Cc: Erik Kapfer <erik.kapfer@ipfire.org>
Cc: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-11-25 20:03:14 +00:00
Peter Müller
7c507f3d5b Tor: allow enforcing distinct Guard relays or countries
In order to make deanonymisation harder, especially high-risk Tor users
might want to use certain Guard relays only (for example operated by
people they trust), enforce Tor to use Guard relays in certain countries
only (for example countries with very strict data protection laws or
poor diplomatic relations), or avoid Guard relays in certain countries
entirely.

Since Tor sticks to sampled Guards for a long time (usually within the
range of months), restricting those is believed to cause less harm to a
users' anonymity than restricting Exit relays, since their diversity of
a generic Tor user is significantly higher.

This patch extends the Tor CGI for restricting Guard nodes to certain
countries or relays matching certain fingerprints.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-11-25 17:20:51 +00:00
Peter Müller
5efe8957a5 Tor: allow multiple countries to be selected for Exit relays
This extends the functionality of the Tor CGI in order to be able to
select multiple countries for possible Exit relays, which is - in terms
of anonymity - less worse than limiting all Tor circuits to a single
country.

For example, a user might want to avoid Exit relays in more than one
country, and permit Tor to use Exit relays elesewhere, and vice versa.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-11-25 17:20:14 +00:00
Michael Tremer
1a3c53556e ipinfo.cgi: Align flag icon
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-11-17 16:04:10 +00:00
Arne Fitzenreiter
a832b5c2e6 Merge remote-tracking branch 'origin/master' into next
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-11-13 18:21:20 +00:00
Michael Tremer
11b46800a5 Update contributors
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-11-13 11:13:08 +00:00
ummeegge
1c612d9e32 OpenVPN: Add start of static routes in client N2N
Fixes: #12529

- If a client N2N configuration will be imported into IPFire systems,
a line will be added which calls the --up script to restart the
static route initscript. Since this is IPFire specific, i will only be
added via import on IPFire system.
- Deleted unneeded line in CLIENTCONF section.
- Added description to SERVERCONF section.

Signed-off-by: ummeegge <erik.kapfer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-11-13 11:12:39 +00:00
Peter Müller
358e42ffbf langs: add changed strings to German and English translations
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-11-11 16:01:51 +00:00
Peter Müller
4dc8de6f22 ipinfo.cgi: display AS information as well
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-11-11 16:01:49 +00:00
Michael Tremer
65ef52a335 DNS: Make YouTube configurable for Safe Search
When safe search is enabled, it is being enabled on YouTube, too.

This creates problems in some scenarios like schools where politics
is being tought as well as other subjects that might be censored by
YouTube (i.e. election TV spots).

Therefore it is now possible to exclude YouTube from Safe Search
but keep it enabled for the search engines.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-11-11 12:08:21 +00:00
Michael Tremer
1e2c442c9e samba: Add support for custom configuration changes
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-11-09 18:43:15 +00:00
Stefan Schantl
07e42be978 Adjust CGI files to work with latest location-function.pl changes.
Fixes #12515.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-11-09 14:07:21 +00:00