Commit Graph

1283 Commits

Author SHA1 Message Date
Michael Tremer
c825fcef40 firewall: Always restore all connection marks
This was done by tc only when QoS was enabled

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-13 11:46:23 +00:00
Michael Tremer
ce31144c62 firewall: Only check relevant bits for NAT fix rules
In order to use the highest two bits for surciata bypass, we will need
to make sure that whenever we compare any other marks, we do not care
about anything else.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-13 11:45:48 +00:00
Arne Fitzenreiter
02fadedf8d initskrips: leds: add nanopi r2s support 2021-10-10 06:45:09 +00:00
Arne Fitzenreiter
3c691bcc7c Revert "client175: Convert python2 modules in source tarball to python3"
This reverts commit 6d11cd4375.

At my tests the server will not start because missing deps of cherrypy and not all files are properly converted yet.
2021-09-12 14:51:10 +00:00
Adolf Belka
6d11cd4375 client175: Convert python2 modules in source tarball to python3
- Patch created to convert all python modules to python3 compatibility that need it.
   2to3 converter used for this.
- Start initscript changed to use python3
- No change required in rootfile
- Execution of patch added to lfs file
- Tested in vm machine. WUI page showed the same as with the python version.
   scan of directory for mp3 (.flac) files was successful. Could not test actual audio
   playing capability as my vm testbed does not have any audio setup at this time.
  I believe that the purpose of client175 is to provide the WUI page and for that my
   testing seemed to show everything working as expected.

Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-09-05 18:00:25 +00:00
Michael Tremer
0c7ba6523f initscripts: Add switch to start processes in background
Since systemd, many programs no longer behave like a well-behaved
daemon. To avoid any extra solutions, this patch adds a -b switch which
will start a program in the background and throw away any output.

The behaviour remains unchanged for any other programs.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-09-05 17:39:14 +00:00
Michael Tremer
f8447c9d23 dbus: Add reload to initscript
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-07-23 06:15:23 +00:00
Michael Tremer
40a3053a67 libvirtd: Enable required cgroups
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-07-19 18:13:55 +00:00
Michael Tremer
10a2b80cce mountkernfs: Mount cgroup2 hierarchy
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-07-19 18:13:46 +00:00
Michael Tremer
618b9f3a76 aws: Enable serial console by default
AWS for some time now has a serial console feature which is enabled by
default on all systems. The VGA console is not enabled for any new
non-x86 instance types and not interactive.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-07-14 08:24:30 +00:00
Arne Fitzenreiter
1746b394f3 firewall: remove conntrack_gre helper
this is not exist in kernel-5.10

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-07-05 07:42:40 +02:00
Arne Fitzenreiter
aafdd71b04 switch arm 32 bit arch from armv5tel to armv6l
we have no supported armv5tel board left so we can switch to the higher
arch. This now can use the vpu (still in softfp calling convention to
not break existing installations.)
this fix many compile problems, also boost is now working again.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-07-05 07:42:39 +02:00
Arne Fitzenreiter
0115483c4a swconfig: update lamobo r1 init for kernel 5.10.x
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-07-05 07:42:38 +02:00
Arne Fitzenreiter
66acb7f166 initskripts: networking: fix dhcpcd shutdown
with kernel 5.10 dhcpcd hung at shutdown if red was a wireless client
becuase there was two running instances. This change repeat the
dcpcd -k call.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-07-05 07:42:37 +02:00
Arne Fitzenreiter
f087f88837 initskripts: leds: remove obsolete kirkwood devices
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-07-05 07:42:37 +02:00
Arne Fitzenreiter
0db334029e initskripts: leds: add new pcengines apu1 led name.
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-07-05 07:42:37 +02:00
Arne Fitzenreiter
604945c060 initskripts: leds: update for new upstream netdev-trigger
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-07-05 07:42:37 +02:00
Michael Tremer
de6fd0881f Drop obsolete files from bluetooth package
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-06-18 16:17:27 +00:00
Peter Müller
c62adbc448 Drop unmaintained add-on lcd4linux
This package has not received any updates or attention within the last
three years. It's sole known upstream URL (https://ssl.bulix.org/projects/lcd4linux/)
returns a HTTP error 404 nowadays, and the author was unable to locate
any upstream source that appears to be still maintained today.

Given the status quo, bugs in lcd4linux cannot be reported properly,
security issues won't be addressed (by anybody else then ourselves), and
technical questions cannot be clarified aside a reverse engineering
approach.

We should not allow such an add-on to be installed on a firewall system.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Reviewed-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-06-03 09:16:13 +00:00
Michael Tremer
839451c527 dnsdist: Improve initscript to prevent reload on config error
start, restart and reload will now be prohibited if the configuration
file has an incorrect syntax. This avoids killing a running daemon and
is showing an indication to the user instead of having the daemon dying
silently in the background.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-06-01 11:39:09 +02:00
Matthias Fischer
ceb5733c59 Deleted no longer used 'if' clauses (ALG) from firewall init
In https://git.ipfire.org/?p=ipfire-2.x.git;a=commit;h=ffafaa71a6970a8c3d0942247feb37facfe24d25
all ALGs were removed from UI.

But they remained - somehow - in the initscript (firewall).

I tried to remove the remnants - hopefully in the correct way.

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Acked-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-05-31 12:41:52 +00:00
Peter Müller
9d0b7c1a78 Delete the remainings of libupnp and upnpd
These include rootfiles, firewall menue entries that have been
unmaintained for a long time, and firewall chains which were never used
in recent time.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-05-20 09:42:55 +00:00
Peter Müller
5f16813c8a miniupnpd: Delete files that would have become orphaned after deletion of miniupnpd add-on as well
This patch requires
https://patchwork.ipfire.org/project/ipfire/list/?series=2059 to be
applied in the first place.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-05-20 09:32:33 +00:00
Peter Müller
a5ee98176c Drop miniupnpd add-on
As discussed in https://wiki.ipfire.org/devel/telco/2021-05-03.

Frankly, if you need or use UPnP, you probably do not even need to _think_
about running a firewall...

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-05-20 09:31:43 +00:00
Peter Müller
e55b268a4b Drop SANE add-on
As discussed in https://wiki.ipfire.org/devel/telco/2021-05-03.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-05-20 09:31:18 +00:00
Peter Müller
a0dbbb73a9 Zut alors, delete motion initiscript as well :-/
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-05-20 09:31:12 +00:00
Peter Müller
a326c9a623 Drop Asterisk add-on
As discussed in https://wiki.ipfire.org/devel/telco/2021-05-03.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-05-20 09:30:48 +00:00
Adolf Belka
7300386bab pmacct: New addon
- What is it?
   pmacct is a monitoring tool for network management tasks. Data collected
   can be used for analysis and troubleshooting purposes to maintain the
   health of the network. pmacct can collect, replicate and export network
   information. It can cache in memory tables, store persistently to SQLite3
   and output to flat-files like CSV, formatted, and JSON.
- Why is it needed?
   To monitor data usage (IP-based or MAC-based data accounting) down to the
   client level. Net-Traffic will monitor traffic for the entire RED, GREEN,
   etc. networks, but it cannot pinpoint which client is using lots of data.
   Connections will take a snapshot but not show day by day sums. pmacct can
   help admins keep tabs on users that use too much data.
- What are the use cases?
   An ISP may implement data caps and if the limit is over-run then you have
   to pay for every additional xxGB of data used. Typical charges can be
   around $10 per 50GB. With pmacct you can identify the high users and take
   action, hopefully before the limit is breached.
- This is being introduced as a command line only tool. However, at a later
   date, if it is useful to enough additional users a WUI page could be
   developed as discussed in the development mailing list
   https://lists.ipfire.org/pipermail/development/2021-January/009174.html
- Changes in V2 version
-   Initscript is using IPFire template and installed with IPFire method.
-   All other daemons except pmacct and pmacctd have been removed from the install.
-   Example conf files have been removed from /etc/pmacct
      Both example conf files are described in the pmacct wiki draft.

Tested-by:     Jon Murphy <jon.murphy@ipfire.org>
Signed-off-by: Jon Murphy <jon.murphy@ipfire.org>
Signed-off-by: Erik Kapfer <ummeegge@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-05-11 16:44:46 +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
Michael Tremer
1d681743eb hostapd: Drop custom configuration from initscript
The initscript it setting a lot of options which are set by hostapd
which will fail to start the AP instead of using fire-and-forget.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-04-16 10:03:57 +00:00
Michael Tremer
af8964d236 rpcbind: Update initscript for moved binary
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-04-10 13:49:47 +00:00
Thomas Cekal
5b17fea8e7 BUG12445: Fix for Hyper-V stuck 8 minutes at boot
Fix for Bug 12445: There is no proper way to distinguish between MS Azure and a local
Hyper-V installation Procedure: try to get the metadata info from the
internal MS metadata service at IP 169.254.169.254 If this fails the system
is running on an local Hyper-V instance wget takes too long to exit if the IP
is not reachable Added --timeout and --tries param to wget to reduce the
duation from 8 minutes to 9 seconds 9 seconds at one try should be enough

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Thomas Cekal <admin@cekal.org>
2021-04-02 15:38:02 +00:00
Michael Tremer
f78eb45c09 suricata: Use iptables lock to ensure rules are being inserted
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-04-02 15:33:42 +00:00
Michael Tremer
55209df391 wlanclient: Do not force using legacy interface to talk to the kernel
"wireless extensions" is the old interface to speak to the kernel.

All newer drivers support nl80211 now.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-02-16 17:44:45 +01:00
Michael Tremer
675c9ca558 ssh: Ignore any errors when stopping daemon
The SSH init script only kills the main daemon which leads to any child
processes (for remaining connections) being untouched.

killproc returns 4 (unknown error) when not all processes were killed
which is not intended here. Therefore we ignore the error and do not
pause the shut down process for a minute.

Fixes: #12544
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-01-13 11:12:03 +00:00
Michael Tremer
80b1dc64f2 AWS: Ensure the product UUID is uppercase
Newer kernels seem to return this in lowercase format which makes the
comparison to "EC2" fail.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-01-13 10:51:58 +00:00
Michael Tremer
baa9712372 AWS: Hypervisor UUID has been dropped from newer kernels
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-01-13 10:51:51 +00:00
Michael Tremer
3403eb308c wireless client: Try using SHA256 over SHA1 when possible
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-01-12 10:39:08 +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
Giovanni Aneloni
2b113aebc4 unbound: make local zone transparent
Change local zone to "trasnparent" instead of "typetrasnparent" to avoid NXDOMAIN when querying local hosts

Fixes: #12391
Signed-off-by: Giovanni Aneloni <giovanni.aneloni@live.com>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
Acked-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-01-07 11:55:03 +00:00
Adolf Belka
c2f02d9d59 bacula: Update to use IPFire initscript
Bacula install used the bacula initscript for starting and stopping bacula.
This works fine but results in no pid or memory input in the addons table
under services.
Using the IPFire initscript also successfully starts and stops bacula with
no problems but also provides the pid and memory information in the services
addons table.
- rootfiles adjusted to remove the reference to bacula-ctl-fd
- lfs/bacula adjusted to remove the init.d/bacula link generation
             remove the "rm -f /root/.rnd" command. This file is not present
             and I have not seen this command in any other lfs file that I
             have looked at.
- new bacula initscript created

Signed-off-by: Adolf Belka <ahb.ipfire@gmail.com>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-12-10 12:28:58 +00:00
Michael Tremer
e704dbe6bd network: Mount/umount network file systems at the correct time
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-11-17 16:35:13 +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
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
Arne Fitzenreiter
58b374c255 samba: remove pid at killproc in initscript
sometime a stale nmbd or smbd process prevent start of samba.
this change should kill all processes.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-11-03 10:36:59 +00:00
Michael Tremer
acc8336f94 OpenSSH: Fix initscript to actually kill the daemon
The SSH daemon was not terminated properly because killproc
tried to terminate all processes with that name. That caused
that the master daemon respawned some processed which were
therefore not killed because killproc determined a list of
PIDs only once before starting sending signals.

This patch only kills the master process which is being
determined by using sshd's pid file.

That results in all established connections not being
interrupted any more.

Furthermore, the loadproc function checks if any processes
with the given name are already running which could be true
if there are any connections still open.
That check is being disabled with the -f switch and sshd
will always be launched.

"/etc/init.d/sshd stop" might now print FAIL if only the
master process, but no connection processes were terminated.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-10-27 14:20:56 +01:00
Peter Müller
3e19f681a1 drop SpamAssassin add-on
This package has not been maintained well and is thereof outdated. At
the time of writing, we neither
(a) have a maintainer for this nor
(b) believe it is wise to run a full-featured content scanner on a
    firewall for security purposes. (We can make do with Postfix, as it
    is known for being a very robust MTA and providess less attack
    surface than something actually inspecting transferred messages.)

Thereof, this patch drops the SpamAssassin add-on. In case it is desired
in future versions of IPFire, it can be easily reverted, restoring the
functionality and behaviour before.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-10-27 11:58:35 +00:00
Peter Müller
6483ec30b9 drop Amavis add-on
This package has not been maintained well and is thereof outdated. At
the time of writing, we neither
(a) have a maintainer for this nor
(b) believe it is wise to run a full-featured content scanner on a
    firewall for security purposes. (We can make do with Postfix, as it
    is known for being a very robust MTA and providess less attack
    surface than something actually inspecting transferred messages.)

Thereof, this patch drops the Amavis add-on. In case it is desired in
future versions of IPFire, it can be easily reverted, restoring the
functionality and behaviour before.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-10-27 11:58:20 +00:00
Michael Tremer
b67f02d512 /var/ipfire/ethernet/settings: Drop BROADCAST variable
This variable is no longer being used and was only used to
assign IP addresses to the individual interfaces.

However, the kernel knows best which IP address to select
as broadcast address for each network. Therefore we depend
on the kernel which allows us to support RFC3021.

Fixes: #12486 - no /31 transfer net available on red
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-10-07 11:46:46 +00:00
Arne Fitzenreiter
b5efeaa092 samba initskript: create needed subdirs for pipes in /var/run/samba
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-10-06 12:18:56 +00:00