Commit Graph

104 Commits

Author SHA1 Message Date
Michael Tremer
97b1857ba4 random: Initialise the kernel's PRNG earlier
Since more processes depend on good randomness, we need to
make sure that the kernel's PRNG is initialized as early as
possible.

For systems without a HWRNG, we will need to fall back to our
noisy loop and wait until we have enough randomness.

This patch also removes saving and restoring the seed. This
is no longer useful because the kernel's PRNG only takes any
input after it has successfully been seeded from other sources.

Hence adding this seed does not increase its randomness.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-05-17 07:46:32 +00:00
Michael Tremer
65cb935200 random: Launch rngd earlier in the boot process
We should initialise the kernel's PRNG as early as we can.

Starting rngd very early will seed the random number generator
when RDRAND or other hardware random number generators are available.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-05-17 07:45:30 +00:00
Michael Tremer
6b3b3a32ab swap: Start swap after mounting filesystems
When using a swap file, it is not being activated correctly
when the filesystem it is residing on is not mounted, yet.

The root file system is mounted read-only here before
S40mountfs is being executed.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-03-21 16:19:54 +00:00
Arne Fitzenreiter
592be1d206 bluetooth: drop outdated bluetooth addon
The cgi support only rfcomm modem dialup. This is not used by modern hardware.
Also the used bluez stack version is outdated long time.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
Acked-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-03-21 15:41:22 +00:00
Michael Tremer
8893881160 lvm2: Add initscript for lvmetad
This daemon needs to be launched in order to use LVM
devices in IPFire.

It will run on all installations after this patch has been
merged but only consumes very little memory.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-01-16 18:23:30 +00:00
Arne Fitzenreiter
7c30831ad2 initskripts: move unbound down after network down
this remove a bunch of unbound errors at shutdown because
network down try to reconfigure unbond. (e.g. disable forwarders)

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-08-11 11:09:40 +02:00
Michael Tremer
ffb37e51d4 Rename AWS initscript to cloud-init
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-07-01 07:53:58 +01:00
Michael Tremer
6a83dbb451 SMT: Apply settings according to configuration
SMT can be forced on.

By default, all systems that are vulnerable to RIDL/Fallout
will have SMT disabled by default.

Systems that are not vulnerable to that will keep SMT enabled.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-05-20 21:30:26 +01:00
Stefan Schantl
8117fff863 IDS: Call helper script when red interface gets up
The helper script will be automatically called when the red interface gets up
and will re-generate the HOME_NET file, to take care if the IP-address of this
interface has changed.

Fixes #11989

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-02-06 15:40:19 +01:00
Stefan Schantl
c1a3401235 Merge branch 'next' of ssh://git.ipfire.org/pub/git/ipfire-2.x into next-suricata 2019-01-21 13:04:13 +01:00
Michael Tremer
7d5caee6bd Add initscript for conntrackd
The daemon will be started by default when a configuration
file exists.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-01-06 08:59:25 +00:00
Stefan Schantl
a13ddf04d9 Merge branch 'next' of ssh://git.ipfire.org/pub/git/ipfire-2.x into next-suricata
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2018-12-12 09:27:59 +01:00
Michael Tremer
f354601bbe initscripts: Import pakfire keys before importing AWS configuration
This is useful when the user-data script is installing
packages. For that it will need valid keys for course.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-12-07 11:38:55 +00:00
Stefan Schantl
cb52183c6a Fix merge conflicts during merge of next and the suricata branch 2018-08-23 10:34:17 +02:00
Michael Tremer
84cd9b9162 Drop the network-trigger script
This is done at boot time and doesn't normally need to be done again.

On AWS or in the setup, renaming any network interfaces is being
handled automatically.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-08-22 14:05:43 +01:00
Stefan Schantl
914cca3d8e initscripts: Link against suricata initscript in runlevels and red.up hook
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2018-08-03 10:02:34 +02:00
Arne Fitzenreiter
1ac0d5c598 Merge branch 'aarch64' into next
Conflicts:
	config/rootfiles/core/121/filelists/acpid
	config/rootfiles/core/121/filelists/apache2
	config/rootfiles/core/121/filelists/apr
	config/rootfiles/core/121/filelists/aprutil
	config/rootfiles/core/121/filelists/armv5tel/files
	config/rootfiles/core/121/filelists/armv5tel/linux-initrd-kirkwood
	config/rootfiles/core/121/filelists/armv5tel/linux-initrd-multi
	config/rootfiles/core/121/filelists/armv5tel/linux-kirkwood
	config/rootfiles/core/121/filelists/armv5tel/linux-multi
	config/rootfiles/core/121/filelists/armv5tel/rpi-firmware
	config/rootfiles/core/121/filelists/armv5tel/u-boot
	config/rootfiles/core/121/filelists/armv5tel/u-boot-kirkwood
	config/rootfiles/core/121/filelists/armv5tel/u-boot-mkimage
	config/rootfiles/core/121/filelists/beep
	config/rootfiles/core/121/filelists/cmake
	config/rootfiles/core/121/filelists/crda
	config/rootfiles/core/121/filelists/dhcp
	config/rootfiles/core/121/filelists/flex
	config/rootfiles/core/121/filelists/i586/grub
	config/rootfiles/core/121/filelists/i586/intel-microcode
	config/rootfiles/core/121/filelists/i586/linux
	config/rootfiles/core/121/filelists/i586/linux-initrd
	config/rootfiles/core/121/filelists/iw
	config/rootfiles/core/121/filelists/jwhois
	config/rootfiles/core/121/filelists/libidn
	config/rootfiles/core/121/filelists/multipath-tools
	config/rootfiles/core/121/filelists/pcre
	config/rootfiles/core/121/filelists/tar
	config/rootfiles/core/121/filelists/unbound
	config/rootfiles/core/121/filelists/wget
	config/rootfiles/core/121/filelists/x86_64/grub
	config/rootfiles/core/121/filelists/x86_64/intel-microcode
	config/rootfiles/core/121/filelists/x86_64/linux
	config/rootfiles/core/121/filelists/x86_64/linux-initrd
	config/rootfiles/core/122/filelists/aarch64/files
	config/rootfiles/core/122/filelists/acpid
	config/rootfiles/core/122/filelists/apache2
	config/rootfiles/core/122/filelists/apr
	config/rootfiles/core/122/filelists/aprutil
	config/rootfiles/core/122/filelists/armv5tel/linux-initrd-kirkwood
	config/rootfiles/core/122/filelists/armv5tel/linux-initrd-multi
	config/rootfiles/core/122/filelists/armv5tel/linux-kirkwood
	config/rootfiles/core/122/filelists/armv5tel/linux-multi
	config/rootfiles/core/122/filelists/armv5tel/rpi-firmware
	config/rootfiles/core/122/filelists/armv5tel/u-boot
	config/rootfiles/core/122/filelists/armv5tel/u-boot-kirkwood
	config/rootfiles/core/122/filelists/armv5tel/u-boot-mkimage
	config/rootfiles/core/122/filelists/beep
	config/rootfiles/core/122/filelists/cmake
	config/rootfiles/core/122/filelists/crda
	config/rootfiles/core/122/filelists/dhcp
	config/rootfiles/core/122/filelists/flex
	config/rootfiles/core/122/filelists/i586/grub
	config/rootfiles/core/122/filelists/i586/intel-microcode
	config/rootfiles/core/122/filelists/i586/linux
	config/rootfiles/core/122/filelists/i586/linux-initrd
	config/rootfiles/core/122/filelists/iw
	config/rootfiles/core/122/filelists/jwhois
	config/rootfiles/core/122/filelists/libidn
	config/rootfiles/core/122/filelists/multipath-tools
	config/rootfiles/core/122/filelists/pcre
	config/rootfiles/core/122/filelists/tar
	config/rootfiles/core/122/filelists/unbound
	config/rootfiles/core/122/filelists/wget
	config/rootfiles/core/122/filelists/x86_64/grub
	config/rootfiles/core/122/filelists/x86_64/intel-microcode
	config/rootfiles/core/122/filelists/x86_64/linux
	config/rootfiles/core/122/filelists/x86_64/linux-initrd
	config/rootfiles/core/123/filelists/unbound
	config/rootfiles/oldcore/121/filelists/acpid
	config/rootfiles/oldcore/121/filelists/apache2
	config/rootfiles/oldcore/121/filelists/apr
	config/rootfiles/oldcore/121/filelists/aprutil
	config/rootfiles/oldcore/121/filelists/armv5tel/files
	config/rootfiles/oldcore/121/filelists/armv5tel/linux-initrd-kirkwood
	config/rootfiles/oldcore/121/filelists/armv5tel/linux-initrd-multi
	config/rootfiles/oldcore/121/filelists/armv5tel/linux-initrd-rpi
	config/rootfiles/oldcore/121/filelists/armv5tel/linux-kirkwood
	config/rootfiles/oldcore/121/filelists/armv5tel/linux-multi
	config/rootfiles/oldcore/121/filelists/armv5tel/linux-rpi
	config/rootfiles/oldcore/121/filelists/armv5tel/rpi-firmware
	config/rootfiles/oldcore/121/filelists/armv5tel/u-boot
	config/rootfiles/oldcore/121/filelists/armv5tel/u-boot-kirkwood
	config/rootfiles/oldcore/121/filelists/armv5tel/u-boot-mkimage
	config/rootfiles/oldcore/121/filelists/beep
	config/rootfiles/oldcore/121/filelists/cmake
	config/rootfiles/oldcore/121/filelists/crda
	config/rootfiles/oldcore/121/filelists/dhcp
	config/rootfiles/oldcore/121/filelists/flex
	config/rootfiles/oldcore/121/filelists/i586/grub
	config/rootfiles/oldcore/121/filelists/i586/intel-microcode
	config/rootfiles/oldcore/121/filelists/i586/linux
	config/rootfiles/oldcore/121/filelists/i586/linux-initrd
	config/rootfiles/oldcore/121/filelists/iw
	config/rootfiles/oldcore/121/filelists/jwhois
	config/rootfiles/oldcore/121/filelists/libidn
	config/rootfiles/oldcore/121/filelists/multipath-tools
	config/rootfiles/oldcore/121/filelists/pcre
	config/rootfiles/oldcore/121/filelists/tar
	config/rootfiles/oldcore/121/filelists/wget
	config/rootfiles/oldcore/121/filelists/x86_64/grub
	config/rootfiles/oldcore/121/filelists/x86_64/intel-microcode
	config/rootfiles/oldcore/121/filelists/x86_64/linux
	config/rootfiles/oldcore/121/filelists/x86_64/linux-initrd
	make.sh
2018-07-03 11:52:05 +01:00
Arne Fitzenreiter
4838034131 random: update initskript for machines with low entropy
the script wait until crng is correct initialized before restore the
random seed and make some disc io to work around low entropy at boot
on some machines. Not really a fix but it should be better than reverting
CVE-2018-1108 fixes from kernel.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2018-06-28 20:48:58 +02:00
Michael Tremer
1c21ebf8d5 Add initscript that automatically configures IPFire on AWS EC2
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-06-21 16:45:40 +01:00
Arne Fitzenreiter
69acde2ecd acpid: build also on arm
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2018-04-14 18:42:00 +02:00
Michael Tremer
eb68e27dd2 pakfire: Import key when system boots up
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-03-19 19:44:50 +00:00
Michael Tremer
fbcb5b749a Drop mediatomb
This didn't build and run in ages and has been removed from
the repositories quite a while ago.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-01-05 13:26:33 +00:00
Michael Tremer
dc7d6b204d make.sh: Cleanup of polluted environment
The build environment is using a number of variables which
occasionally conflicted with some other build systems.

This patch cleans that up by renaming some variables and
later unexporting them in the lfs files.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-05-18 12:02:03 +01:00
Jonatan Schlag
629fcb1d47 Move network initscripts to src/initscripts/networking
Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
2017-02-22 11:57:20 +01:00
Jonatan Schlag
33f53d55cc Move all initscripts for the system to src/initscripts/system
Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
2017-02-22 11:54:00 +01:00
Jonatan Schlag
8bc8c282c9 Move all Initscripts of the system, into an extra directory
Till now all init scripts going into src/initscripts/init.d so they are
installed by the lfs file initscripts. Because of that they also appear
in the rootfile of the "package" initscripts.

This has some disadvantages:
- the initscripts of the packages appear in the 3 rootfiles (one for
each arch) which are annoying because for every package with an
initscript 4 rootfiles (the 3 of the initscript package + the rootfile
of the package) are important.
- The rootfiles for a package are installed by lfs/initscripts but this
should happen only in the build of the package

To solve this issues all rootfiles for the core system are moved into
src/initscripts/init.d/common. Only the initscript in this directory are
installed by lfs/initscripts. So all initscripts for packages are
located in src/initscripts/init.d and are not installed by
lfs/initscripts.
So only the initscripts of the system appear in the 3 rootfiles of the
initscripts package. The initscript of a package appear only in the
rootfile of the package. This makes the maintaining of initscript
easier.

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
2017-02-22 10:23:10 +01:00
Arne Fitzenreiter
693928d781 unbound: start prior network
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2016-10-12 23:01:51 +02:00
Michael Tremer
811f3d3050 unbound: Start service after network has been brought up
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2016-09-12 21:13:25 +01:00
Michael Tremer
a66c4880d9 unbound: Start service at system boot
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2016-09-12 20:11:47 +01:00
Michael Tremer
61b4250af5 Drop dnsmasq
This will be replaced by unbound

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2016-08-06 19:25:48 +01:00
Arne Fitzenreiter
3917eadc29 initskripts: remove obsolete checkfstab
the file update the bootdevice to uuid in fstab and grub1 config.
this is not needed since we use uuid at default and grub2

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2016-05-06 15:40:38 +02:00
Michael Tremer
ee3dec50a3 ramdisk: Make usage of ramdisk configurable
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2015-12-03 14:41:49 +00:00
Alexander Marx
c4a451eead Remove ramdisks for RRD databases
Ramdisks are very limited in space and as new graphs
are generated for OpenVPN N2N connections, etc. more
space is necessary.

This patch will enable ramdisks for all systems with more
than 490M of memory and allows the user to force using
a ramdisk on systems with less memory.

Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
Acked-by: Arne Fitzenreiter <arne.fitzenreiter@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2015-12-03 13:14:23 +00:00
Michael Tremer
3db584817d Remove old VLAN initscript
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2015-08-05 12:43:53 +01:00
Michael Tremer
600b99fb31 network: Configure device names from /var/ipfire/ethernet/settings
Instead of creating a copy of the configuration values and
for better extensibility, we will have udev execute a script
that parses /var/ipfire/ethernet/settings and will return the
correct name of the corresponding device (green0, blue0, ...).
2015-03-09 16:31:59 +01:00
Michael Tremer
de0ccf8f8c Merge branch 'master' into next
Conflicts:
	make.sh
2015-02-04 13:24:05 +01:00
Arne Fitzenreiter
ffeb717f2d add swconfig for lamobo-r1 switch setup. 2015-01-27 20:21:17 +01:00
Dirk Wagner
f0dd065425 Merge branch 'next' of ssh://git.ipfire.org/pub/git/ipfire-2.x into monit
Conflicts:
	config/etc/logrotate.conf
2015-01-06 15:51:29 +01:00
Dirk Wagner
5ae99dd2d1 Merge branch 'next' of ssh://git.ipfire.org/pub/git/ipfire-2.x into monit 2014-10-15 22:38:13 +02:00
Michael Tremer
722b419dea initscripts: Mount /var/lock after all other FSes have been mounted.
For example /var/lock does not exist, yet when mountkernfs is
called.
2014-09-04 11:12:41 +02:00
Michael Tremer
a24546794d Update auto-resize code to work with any partition number 2014-08-24 13:29:18 +02:00
Michael Tremer
f204a2e649 initscripts: Remove old firewall-reload symlink 2014-08-21 10:47:41 +02:00
Michael Tremer
3756506005 initscripts: Remove old firewall-reload symlink 2014-08-21 10:46:34 +02:00
Timo Eissler
4b12aa414c firewall: fix faulty masquerading packets 2014-08-08 09:53:56 +02:00
Dirk Wagner
6047b2c178 monit addon: Fixed initscript stuff 2014-05-17 18:42:21 +02:00
Michael Tremer
2a07aa9d9c dialctrl: Remove defunct script. 2014-03-17 14:17:44 +01:00
Michael Tremer
66f6b279b0 Reload all firewall rules when /etc/init.d/firewall reload is executed. 2014-02-25 12:23:09 +01:00
Michael Tremer
dfa68452be sysctl: Load variables first thing when booting. 2014-02-14 17:35:37 +01:00
Michael Tremer
7d7740a467 firewall: Initialize basic ruleset before entering runlevel 3. 2014-02-14 12:48:11 +01:00
Michael Tremer
8af8d5d127 rng-tools: New package.
The rng daemon will be installed by default and will
also be installed when a hardware random number generator
is found. It will then read random data from the hardware
random number generator and will feed it into the kernel's
entropy pool.

If no HW RNG is available, a warning will be printed
at boot time.
2014-01-29 17:22:48 +01:00