Commit Graph

2800 Commits

Author SHA1 Message Date
Leo-Andres Hofmann
4c04960ba0 getrrdimage.cgi: Add default values to parameters
Prevents "use of uninitialized value" warnings when the
CGI is called with broken undefined GET parameters.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2022-04-06 17:16:33 +00:00
Peter Müller
430680f9cc Run ./make.sh update-contributors
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-04-04 20:20:48 +00:00
Adolf Belka
31016a38e6 dhcp.cgi: Add domain-list type info in dhcp options - bug#12819
Fixes: bug#12819
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
2022-04-04 20:09:41 +00:00
Peter Müller
f31cb9a1dd Revert "qos.cgi: Removed last two P2P lines"
This reverts commit 652da33c01.

https://lists.ipfire.org/pipermail/development/2022-April/013014.html
2022-04-04 18:09:29 +00:00
Matthias Fischer
652da33c01 qos.cgi: Removed last two P2P lines
P2P "has left da house"...

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2022-04-04 05:35:52 +00:00
Matthias Fischer
705e948939 Changed notification for reloading firewall rules
I think 'fw rules reload...' is more logical.

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2022-04-03 09:58:25 +00:00
Peter Müller
2188812cb0 credits: Run ./make.sh update-contributors
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-03-22 07:55:16 +00:00
Peter Müller
e90c62b2e3 connections.cgi: Update links to SANS ISC
Fixes: #12783

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-20 15:19:49 +00:00
Matthias Fischer
834227f2c8 ids.cgi: Added topic for ruleset actions
Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-14 15:15:39 +00:00
Matthias Fischer
800290ce2a ids.cgi: Fixed trivial typos in comment
Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-14 15:15:17 +00:00
Stefan Schantl
fad7d1c4c6 ids.cgi: Only read-in ignored hosts, if the ignore file exists.
Otherwise the CGI will crash.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-07 18:46:15 +00:00
Stefan Schantl
8f51b0a4f5 optionsfw.cgi: Add default settings for newly added options.
If no settings for those features can be obtained from the settings
file, set them to the following defaults.

* DROPSPOOFEDMARTIAN -> on (yes)
* DROPHOSTILE -> off (no - because only fresh installed systems should
                     do this)
* LOGDROPCTINVALID -> on (yes)

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>
2022-03-07 18:45:28 +00:00
Michael Tremer
59dc2a4c47 vpnmain.cgi: Select Curve 25519 as default
This was supposed to be enabled by default. Due to a copy-and-paste
error, it was, however, not selected for IKE, but only for ESP.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2022-02-23 15:53:46 +00:00
Michael Tremer
1e5ef7e482 credits: Run ./make.sh update-contributors
This should be run regularly, or ideally just before we close a Core
Update so that we can give credit to everywhere who has contributed to
it.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-02-22 20:10:38 +00:00
Michael Tremer
40124af8de wireless client: Remove option for WEP
This has not been compiled into our version of wpa_supplicant (if it has
been ever) and so there is no danger to disable this without any further
ado.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-02-21 20:56:01 +00:00
Peter Müller
66c3619872 Early spring clean: Remove trailing whitespaces, and correct licence headers
Bumping across one of our scripts with very long trailing whitespaces, I
thought it might be a good idea to clean these up. Doing so, some
missing or inconsistent licence headers were fixed.

There is no need in shipping all these files en bloc, as their
functionality won't change.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-02-18 23:54:57 +00:00
Peter Müller
8269c8319c firewall: Make logging of conntrack INVALIDs configureable
In theory, logging of dropped packets classified by conntrack as being
INVALID should never be disabled, since one wants to have a paper trail
of what his/her firewall is doing.

However, conntrack seems to drop a lot of (at the first glance
legitimate) packets, hence bloating the logs, making spotting the
important firewall hits more difficult.

This patch therefore adds the option to disable logging of packets being
dropped by conntrack due to INVALID state.

Please note:
- This patch does not add this category to the firewall hits graph.
- The variables in this patch ("LOGDROPCTINVALID") should make it clear
  that it is about toggling _logging_, not the actual _dropping_. Other
  variables are still in need of being renamed to clarify this, which
  will be done in a dedicated patch.
- Also, the changes made to update.sh need to take place in
  config/rootfiles/core/164/update.sh for "master", since this patch has
  been developed against "next". Kindly cherry-pick the necessary
  changes.

Partially fixes: #12778

Reported-by: Arne Fitzenreiter <arne.fitzenreiter@ipfire.org>
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-02-18 22:40:55 +00:00
Stefan Schantl
0b2d66c7a0 p2p-block.cgi: Drop CGI.
The support for creating P2P based rules has been removed from the
firewall. So this CGI file is not longer needed.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
Acked-by: Michael Tremer <michael.tremer@ipfire.org>
2022-02-15 18:13:17 +00:00
Michael Tremer
6e40963459 ovpnclients.dat: Fix adjusting input dates
This patch changes that we no longer interpret any dates put in by the
user as UTC. They used to be converted into localtime because, although
they have already been in local time.

This went unnoticed since in Europe we are close (enough) to UTC that
there is no significant discrepancy on the report. However, being in
North America is enough to generate confusing reports.

Reported-by: Paul <kairis@gmail.com>
Fixes: #12768
Tested-by: Jon Murphy <jon.murphy@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-02-15 17:59:01 +00:00
Matthias Fischer
b81c77b96b pakfire.cgi: Cosmetic fix
The two text passages for 'pakfire install...' and 'pakfire uninstall...' under
'Available' and 'Installed Addons:' are so close together that the first line
appears as a single line.

This patch separates these two areas a bit from each other so that they are
better readable.

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
2022-02-11 15:21:43 +00:00
Matthias Fischer
57d4e48840 Typo in 'qos.cgi'
'bandwith*' => 'bandwidth*'

Plus: Image button for going back...

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
2022-02-11 15:16:41 +00:00
Alexander Marx
feef6aca68 BUG12301: Iptables “host/network ‘none’ not found”
Fixes: #12301

When using hosts with MAC-addresses in a hostgroup,
the rule won't be generated if those hosts are selected as target.
There is a hint but due to a wrong hashparameter the hint was not shown.

With this patch the hint is shown again.
Additionally the rule is skipped when rules.pl creates rules.

There are no bootmessages with failed target "none" anymore.
Acked-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-02-06 17:18:31 +00:00
Matthias Fischer
ae2d7a3f91 media.cgi: Added missing translation string
Contination from http://patchwork.ipfire.org/project/ipfire/patch/20200513135520.30310-1-matthias.fischer@ipfire.org/

[Thanks Peter, I nearly forgot... ;-) ]

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2022-02-06 13:14:20 +00:00
Matthias Fischer
7e329483a1 backup.cgi: Cosmetic fix - mark backup files bold for better readability
Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Acked-by: Michael Tremer <michael.tremer@ipfire.org>
2022-02-06 11:10:50 +00:00
Leo-Andres Hofmann
d235c1fd79 style.css: Add positive "z-index" to drop-down menu
Some input fields interfere with the menu items and block their use.
A z-index ensures that the menu is always rendered in the foreground.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2022-02-05 12:06:16 +00:00
Peter Müller
1b939d0ecc ids.cgi: Fix unmatched curly bracket and trailing whitespaces
The former causes this CGI to crash with an HTTP error 500.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-01-29 17:07:34 +00:00
Matthias Fischer
8f58e6612b log.dat: Fix an error with 'monit' logging too much data.
Making the regex "non-greedy" fixes an error Jon found.

'monit' logged a whole line from '/var/log/messages' where it should only log the first part.

Reference:
https://www.ultraedit.com/support/tutorials-power-tips/ultraedit/non-greedy-perl-regex.html

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2022-01-25 17:33:00 +00:00
Peter Müller
04581dfb77 Merge branch 'next' into temp-c164-development 2022-01-18 21:12:56 +00:00
Michael Tremer
ca26f73220 qos.cgi: Add control to change link-layer encapsulation
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2022-01-16 15:17:50 +00:00
Michael Tremer
2d42f1df3b qos.cgi: Reindent change bandwidth window
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2022-01-16 15:17:50 +00:00
Leo-Andres Hofmann
219dacef2c pakfire.cgi: Improve HTML output and layout
Add missing closing tags, indentation and CSS styling.
Add link to reboot notice, left-align info list and resize packages
lists for better readability.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Acked-by: Peter Müller <peter.mueller@ipfire.org>
2022-01-14 14:36:22 +00:00
Leo-Andres Hofmann
4d70f59173 pakfire: Implement feedback from mailing list discussion
- Improve lockfile test: Return immediately if lockfile is present,
to prevent unnecessary and expensive "pidof" calls

- Add better explanation to the log file reading command and JS

- Change user interface: If no errors occurred, the page returns to
the main screen (after a short delay). If an error occurred, the log
output remains and a message is shown.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Acked-by: Peter Müller <peter.mueller@ipfire.org>
2022-01-14 14:36:15 +00:00
Leo-Andres Hofmann
a02f132338 pakfire.cgi: Remove "sleep" after running Pakfire command
The extended lockfile test seems to be sufficient to detect
a running Pakfire process and display the logs.
"Sleep" even proved to be counterproductive, as fast processes
can finish in under a second and are then again not detected.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
2022-01-14 14:36:06 +00:00
Leo-Andres Hofmann
524bbe326d pakfire.cgi: Add new translations
Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
2022-01-14 14:36:02 +00:00
Leo-Andres Hofmann
db9ee62e0a pakfire.cgi: Implement JavaScript log message display
Currently the page becomes unresponsive while Pakfire is busy.
This patch implements a AJAX/JSON driven log output, to provide
continuous information to the user while Pakfire is running.

The output is updated 1x per second, if the load should be too high,
the interval can be change by writing to "pakfire.refreshInterval".

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
2022-01-14 14:35:57 +00:00
Leo-Andres Hofmann
d255e2d1c2 pakfire.cgi: Extend the lockfile test
This implements a function to determine if Pakfire is already running.
It tests the PID and lockfile and can be expanded easily later.
'pidof' checks the full path to avoid confusion.

Removes the unreachable function "refreshpage".

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
2022-01-14 14:35:52 +00:00
Stefan Schantl
b4c9d29971 pakfire.cgi: Bring back old logic for log displaying
Trying to get rid of the system backpipe check if a pakfire is running
does not work very well. It simply makes the code more complex and
only introduced some new problems.

This commit switches back to the old logic which worked well in the
past.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
Tested-by: Bernhard Bitsch <bbitsch@ipfire.org>
2022-01-14 14:35:46 +00:00
Peter Müller
f871a115f4 optionsfw.cgi: Make logging of spoofed/martians packets and the DROP_HOSTILE filter configurable
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-01-14 14:16:47 +00:00
Peter Müller
86cf6898aa Merge branch 'master-IDSv3' into temp-c164-development 2022-01-14 14:05:10 +00:00
Stefan Schantl
f8384fbf8d vpnmain.cgi: Fix extra whitespace in exported pk12 file
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2022-01-04 18:06:12 +01:00
Stefan Schantl
0f1d0b9c3c ids.cgi: Use experimental smartmatch.
This will prevent from spawning the http error log with warnings.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-12-19 13:23:45 +01:00
Stefan Schantl
4d438241c3 ids.cgi: Do not expect a space after the msg tag has been closed while
processing rules.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-12-19 13:23:45 +01:00
Stefan Schantl
14696ced7e ids.cgi: Always write used providers rulefiles file.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-12-19 13:23:45 +01:00
Stefan Schantl
258924ee79 ids.cgi: Add the provider handle if the forced update of a provider
fails.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-12-19 13:23:45 +01:00
Stefan Schantl
969983eba4 ids.cgi: Add some more sanity checks when adding a new provider.
* Check if the system is online.
* Check if enough free disk space is available.
* Abort whith an error message if the ruleset could not be
  downloaded.

In error case the provider now will be removed again from the file which
keeps the configured providers. Sadly it needs to be added first because
otherwise the downloader could not read the required values from it.....

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-12-19 13:23:45 +01:00
Stefan Schantl
214f34ec4e ids.cgi: Use newly intruduced functions when removing a provider.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-12-19 13:23:45 +01:00
Stefan Schantl
63cf95af3f ids.cgi: Introduce remove_provider().
This function is used to remove a configured provider by it's ID.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-12-19 13:23:45 +01:00
Stefan Schantl
697787c930 ids.cgi: Introduce get_provider_handle().
This function is used to get the configured provider handle by a a given ID.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-12-19 13:23:45 +01:00
Stefan Schantl
1e52a25825 ids.cgi: Regenerate ruleset if a provider get re-enabled.
Otherwise it could happen, that there are no rules files for this
specific provider.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-12-19 13:23:45 +01:00
Stefan Schantl
724f98c086 ids.cgi: Fix check when changing the IDS to monitor mode or drop mode.
The test condition was wrong here and therefore oinkmaster never has
been executed when this setting has been changed.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-12-19 13:23:45 +01:00