Commit Graph

344 Commits

Author SHA1 Message Date
Stefan Schantl
36331a6a9c update-location-database: Automatically export database after update.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2020-06-10 21:24:58 +02:00
Stefan Schantl
8b58dbf32a Merge branch 'switch-to-libloc' into next-switch-to-libloc 2020-05-25 19:58:54 +02:00
Arne Fitzenreiter
289a86a320 rootfiles: change MACHINE to xxxMACHINExxx
berkeley has a file that nane contain MACHINE wich should not
replaced by the build architecture.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-05-10 17:27:28 +00:00
Michael Tremer
616de0b48c openvpn: Store connection times in ASCII timestamps
This format seems to be a lot easier to handle in SQLite queries.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-05-01 19:18:17 +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
Matthias Fischer
68a6d1053f makegraphs: 'vnstat -u' is no longer supported/needed
Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-04-30 14:56:27 +00:00
Matthias Fischer
bd4f0794d2 consort.sh: Shebang-Typo
Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-03-26 09:41:37 +00:00
Arne Fitzenreiter
c75fd8c8c5 convert-dns-settings: add ppp/settings to list of converted files
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-01-30 12:22:37 +00:00
Michael Tremer
8729316513 convert-dns-settings: Explicitely enable using ISP name servers
The unbound initscript checks if this parameter is on.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-01-29 11:52:02 +01:00
Arne Fitzenreiter
15e3419434 convert-dns-settings: remove DNS settings also if no server config is generated
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-01-28 20:31:22 +00:00
Arne Fitzenreiter
3ee6ac9dad convert-dns-settings: Remove DNS variable from PPP profiles
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-01-28 19:38:16 +00:00
Arne Fitzenreiter
5d6ccc7a43 convert-dns-settings: Refactor reading old configuration
This patch makes the code a lot shorter by removing special
cases for all sorts of files when they can all be treaded
equally.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-01-28 19:34:56 +00:00
Arne Fitzenreiter
d3236de23a convert-dns-settings: Fix call for chmod
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-01-28 19:19:06 +00:00
Stefan Schantl
358bcfdb29 convert-dns-settings: Fix check to prevent doubble-adding the same server
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-01-28 15:38:36 +00:00
Arne Fitzenreiter
8c0ab3d471 filesystem-cleanup: fix "fixed space" type
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-01-25 15:05:38 +00:00
Arne Fitzenreiter
45e1202d27 filesystem-cleanup: add /usr/lib/sse2 folder
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-01-24 19:18:15 +01:00
Stefan Schantl
dcc655efb8 convert-dns-settings: Import all possible PPP dialin profiles.
* Avoid from adding the same imported DNS server multiple times.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-01-19 12:24:23 +00:00
Arne Fitzenreiter
3a380f87c7 Revert "Introduce update-location-database script."
This reverts commit 93a985cc05.
2020-01-15 17:15:25 +00:00
Arne Fitzenreiter
cb1c8f108f set version in backupiso and also pakfire core to 140
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-01-14 21:10:15 +00:00
Arne Fitzenreiter
61cc563558 Merge remote-tracking branch 'ms/next-dns-ng' into next 2020-01-13 21:42:49 +00:00
Daniel Weismüller
1475bc53a4 filesystem-cleanup: Add parameter to show changes
Use --dry-run to only show files that would be deleted, but do
not actually delete them.

Signed-off-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-01-13 21:36:06 +00:00
Michael Tremer
97756e2124 filesystem-cleanup: Automatically remove old libraries
This script runs through /usr/lib and /lib and tries to find
all libraries which are no longer being used and more and
deletes them.

This will help us to free space on root partitions that
are limited to 2GB.

However, the script does not cover 100% of the cases, so that
some files still need to be deleted manually (e.g. boost with
their weird versioning schema).

This script should be executed after a Core Update has been
installed.

Fixes: #12270
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-01-13 21:35:37 +00:00
Michael Tremer
7be4822f3d unbound: Make dhcp-leases.conf readable for everyone
unbound runs as nobody and cannot reload its configuration
when this file is only readable for root.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-01-13 21:43:27 +01:00
Stefan Schantl
c73baee1f0 convert-dns-settings: Set correct ownership after convert is done.
Otherwise it may happen, that the created config files have wrong
permissions and the WUI will break.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2020-01-10 09:29:47 +01:00
Michael Tremer
1434fa0df5 DNS: Write name servers received from ISP to /var/run/dns{1,2}
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-01-07 13:35:45 +00:00
Michael Tremer
ecbf66761f DNS: Add converter to migrate settings
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-01-07 10:43:19 +00:00
Stefan Schantl
9a240b7144 update-location-database: Only reload firewall after successfull update.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-12-10 14:50:35 +01:00
Stefan Schantl
8aea15899b Introduce update-location-database script.
This script obsoletes the old xt_geoip_update script.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-12-09 14:25:51 +01:00
Stefan Schantl
93a985cc05 Introduce update-location-database script.
This script obsoletes the old xt_geoip_update script.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-12-09 14:14:34 +01:00
Daniel Weismüller
a18addb946 xt_geoip_update: Always call the cleanup function when some step fails
Signed-off-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-10-14 17:45:29 +00:00
Daniel Weismüller
7b2d933055 xt_geoip_update: Do not create temporary directories again
These already exist

Signed-off-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-10-14 17:45:27 +00:00
Daniel Weismüller
3cd8d55010 xt_geoip_update: Use /var/tmp for temporary data
Since we have some systems that are restricted to only 2GB of
space on /, we need to move this to where we have enough space.

Signed-off-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-10-14 17:45:23 +00:00
Daniel Weismüller
0df1839239 xt_geoip_update: Perform cleanup after successful operation
The temporary files were never being cleaned up after the script
has finished compiling the database.

Signed-off-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-10-14 17:45:20 +00:00
Arne Fitzenreiter
7739cbf456 sane/stage2: remove sanedloop
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-10-09 08:37:23 +02:00
Arne Fitzenreiter
9e20c024b0 xt_geoip_update: fix date and add maxmind copyright to GeoIP.dat
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-08-24 15:44:23 +02:00
Arne Fitzenreiter
392994dcfb geoip-generator: added to build legacy GeoIP.dat file
program and scripts based on debian geoip packages.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-08-24 11:29:01 +02:00
Stefan Schantl
72ab71969f update-ids-ruleset: Run as unprivileged user.
Check if the script has been launched as privileged user (root) and drop all
permissions by switching to the "nobody" user and group.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-06-05 12:33:58 +01:00
Stefan Schantl
84227f7a1c update-ids-ruleset: Release ids_page_lock when the downloader fails.
Fixes #12085.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-05-20 19:09:47 +01:00
Michael Tremer
0aa21ad307 Fix version information in backupiso script
Fixes: #12083
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-05-17 19:52:27 +01:00
Stefan Schantl
50b35e0f8f update-ids-ruleset: Set correct ownership for the rulestarball.
The script usualy will be executed by cron which will start it with
root permissions, so the downloaded tarball is owned by this user.

This has to be changed to the user which runs the WUI (nobody:nobody) to
allow, changing the ruleset to an other one and to display the ruleset area.

Fixes #12066

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-05-01 18:03:11 +02:00
Michael Tremer
918ee4a4cf strongswan: Manually install all routes for non-routed VPNs
This is a regression from disabling charon.install_routes.

VPNs are routing fine as long as traffic is passing through
the firewall. Traps are not propertly used as long as these
routes are not present and therefore we won't trigger any
tunnels when traffic originates from the firewall.

Fixes: #12045
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-04-08 16:44:57 +01:00
Michael Tremer
3b521c724f ipsec-interfaces: Apply static routes (again) after creating IPsec interfaces
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-03-18 15:25:48 +00:00
Michael Tremer
01604708c3 Merge remote-tracking branch 'stevee/next-suricata' into next 2019-03-14 13:19:35 +00:00
Stefan Schantl
5206a3358d update-ids-ruleset: Lock and Unlock the IDS page during runtime
Reference #11991

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-02-07 08:06:49 +01:00
Michael Tremer
f9dd134645 ipsec-interfaces: Resolve any remote hostnames
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-02-04 18:20:36 +00:00
Michael Tremer
d985ce5ae9 ipsec-interfaces: Move conditional block into the loop
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-02-04 18:20:36 +00:00
Michael Tremer
517683eeb1 ipsec: Drop VPN_IP setting
This is now a per-connection setting

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-02-04 18:20:36 +00:00
Michael Tremer
6826364580 ipsec-*: Name some more configuration variables
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-02-04 18:20:36 +00:00
Michael Tremer
1ca2f88a74 ipsec-interfaces: Uses local IP address from connection first, then default
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-02-04 18:20:36 +00:00
Michael Tremer
c94aa25475 ipsec-interfaces: Fix typo in variable name
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-02-04 18:20:36 +00:00