Commit Graph

1176 Commits

Author SHA1 Message Date
Arne Fitzenreiter
f23b046318 unbound: try resolve twice before time sync with ipfire server
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-02-03 17:40:55 +00:00
Arne Fitzenreiter
f5fe5f47a1 unbound: add returncode to resolve function
this is used for time fix check.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-02-02 13:40:32 +00:00
Michael Tremer
c3ae88cab9 PPP: Always fetch DNS servers from provider
We will later decide whether we want to use them or not

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-01-31 10:06:34 +00:00
Arne Fitzenreiter
a83bcf914c networking/red: wait only for carrier if device exists
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-01-25 22:22:26 +01:00
Stefan Schantl
ab4ef40f2b unbound: Use recursor mode if no nameservers are configured
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-01-21 19:32:34 +00:00
Michael Tremer
26eab1fe3e azure: Abort script when no instance ID can be retrieved
We cannot reliably determine if a system is running on Hyper-V
on a private server or on the Azure Cloud.

Therefore, we will have to try to retrieve an IP address
with DHCP and try to connect to the metadata service. If either
of those things is not successful, we will just continue with
the setup process as usual.

So cloud instances should be automatically configured now and
all other systems will continue to boot and call the setup
wizard as usual.

Fixes: #12272
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-01-21 19:32:07 +00:00
Michael Tremer
f770492902 cloud-init: Remove importing DNS settings
Those scripts used to import settings from the meta-data services
and wrote them to the local configuration files.

For the DNS settings and Amazon, this is no longer possible because
their DNS servers do not support DNSSEC at all. Therefore we default
to recursor mode.

To be consistent across cloud providers, we are doing the same for
Azure.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-01-19 16:37:03 +00:00
Michael Tremer
c07c3e47f1 modules: Cleanup file
This file has an unsed line for the "fusion" module which
is no longer needed.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-01-19 16:36:59 +00:00
Michael Tremer
a8d1621299 modules: No longer load parallel port modules
These modules are loaded by default on all systems.

They are simply a waste of space since not many systems
have parallel ports any more.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-01-19 16:36:54 +00:00
Arne Fitzenreiter
97f4b51474 partresize: NanoPi R1: copy also a0 config of Ampac AP6212
there is a second hardware version of the AP6212 in some NanoPi R1
boards.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-01-17 11:26:10 +01: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
61cc563558 Merge remote-tracking branch 'ms/next-dns-ng' into next 2020-01-13 21:42:49 +00:00
Michael Tremer
04b7a78140 unbound: Do not reset safe search again
This is now done in the reload stage and we do not need to
take care about it again.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-01-13 21:25:10 +01:00
Michael Tremer
ebc14e8db2 unbound: Drop some unused variables
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-01-13 21:20:32 +01:00
Michael Tremer
24a694d425 unbound: Drop function to reload forwarders on the fly
This is now being done by updating and re-reading forward.conf.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-01-13 21:19:22 +01:00
Michael Tremer
6137797cb3 unbound: Write hosts to unbound configuration file
This will allow us to read more hosts in a shorter time.

Fixes: #11743
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-01-13 21:10:18 +01:00
Michael Tremer
903247fef8 unbound: There is no need to rewrite tuning.conf
The number of CPU cores and memory normally does not change

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-01-13 20:55:59 +01:00
Michael Tremer
f59bc0c55d unbound: Reload own hostname, too
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-01-13 20:55:32 +01:00
Michael Tremer
44cc9a3d57 amazon-ssm-agent: New package
AWS Systems Manager Agent (SSM Agent) is Amazon software that can be
installed and configured on an Amazon EC2 instance, an on-premises
server, or a virtual machine (VM). SSM Agent makes it possible for
Systems Manager to update, manage, and configure these resources. The
agent processes requests from the Systems Manager service in the AWS
Cloud, and then runs them as specified in the request. SSM Agent then
sends status and execution information back to the Systems Manager
service by using the Amazon Message Delivery Service.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-01-11 20:33:36 +00:00
Stefan Schantl
0c1094770a initscripts/unbound: Add support for reload the service
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2020-01-11 19:36:29 +01:00
Michael Tremer
beebf925c3 unbound: Implement setting qname minimisation into strict mode
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-01-07 16:32:35 +00:00
Michael Tremer
a33489a7aa unbound: Try to set time when DNS is not working
Since DNSSEC relies on time to validate its signatures,
a common problem is that some systems (usually those without
a working RTC) are not being able to reach their time server.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-01-07 16:24:35 +00:00
Michael Tremer
a32fd634ce unbound: Do not update the forwarders when we are running in TLS mode
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-01-07 16:02:14 +00:00
Michael Tremer
4b26aac625 unbound: Read configuration globally
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-01-07 15:28:21 +00:00
Michael Tremer
2654c66945 unbound: Update forwarders when system connects/disconnects
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-01-07 15:21:59 +00:00
Michael Tremer
54898bc6c1 unbound: Update setting Safe Search redirects
When the system comes online, we must update entries
in the unbound cache to point to the "safe" IP addresses.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-01-07 15:03:56 +00: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
4e2d3325af unbound: Drop live checks
Those checks have caused us a lot of trouble and are now being dropped.

Users must make sure to choose servers that support DNSSEC or enable
any of the tunneling mechanisms to be able to reach them.

Fixes: #12239
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-01-07 13:11:38 +00:00
Michael Tremer
ee90aa9858 unbound: No longer read old configuration file
The old configuration file in /etc/sysconfig/unbound is no
longer being used and all settings should be in
/var/ipfire/dns/settings.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-01-07 12:58:28 +00:00
Michael Tremer
50005ad1d4 unbound: Write upstream name servers to forward.conf
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-01-07 12:55:35 +00:00
Michael Tremer
94a51c64bb unbound: Remove test-name-server command
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-01-07 11:18:41 +00:00
Michael Tremer
15cf79e3b8 unbound: Convert forward zones to stub zones
It was incorrect to use forward zones here, because that
assumes that unbound is talking a recursive resolver here.

The feature is however designed to be talking to an authoritative
server.

Fixes: #12230
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-01-07 11:14:30 +00:00
Michael Tremer
dea5f34914 unbound: Allow forcing to speak TLS to upstream servers only
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-01-07 11:14:05 +00:00
Michael Tremer
372576e0ab unbound: Set EDNS buffer size to 1232 bytes
Fixes: #12240
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-01-07 11:12:33 +00:00
Stefan Schantl
51b63b4186 IDS: Allow to inspect traffic from or to OpenVPN
This commit allows to configure suricata to monitor traffic from or to
OpenVPN tunnels. This includes the RW server and all established N2N
connections.

Because the RW server and/or each N2N connection uses it's own tun?
device, it is only possible to enable monitoring all of them or to disable
monitoring entirely.

Fixes #12111.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-12-29 19:12:06 +00:00
Michael Tremer
d7190078ce unbound: Configure Safe Search dynamically
The safe search code relied on working DNS resolution, but
was executed before unbound was even started and no network
was brought up.

That resulted in no records being created and nothing being
filtered.

This will now set/reset safe search when the system connects
to the Internet.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-12-29 08:51:21 +00:00
Arne Fitzenreiter
dd12d8c54c leds: use new APUx ACPI Bios leds if exist.
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-12-09 14:50:44 +01:00
Arne Fitzenreiter
bedfda83c9 dhcpcd.exe: remove red.down run on "NOCARRIER"
after "NOCARRIER" the dhcp client always run "EXPIRE" event.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-12-01 18:33:19 +01:00
Arne Fitzenreiter
941520c69c Merge branch 'next' of git.ipfire.org:/pub/git/ipfire-2.x into next 2019-12-01 16:36:43 +01:00
Arne Fitzenreiter
d346d47467 up/down beep: move from ppp ip-up/down to general red.up/down
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-12-01 15:29:59 +01:00
Arne Fitzenreiter
455291f90e 70-dhcpdd.exe: don't run red.down scripts at "PREINIT"
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-12-01 14:43:49 +01:00
Arne Fitzenreiter
fff96e3945 networking red: add delay to wait for carrier
some nic's need some time after link up to get a carrier

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-11-30 22:26:00 +01:00
Arne Fitzenreiter
f938083fb5 dhcpcd: 10-mtu break if carrier was lost
some nic's like Intel e1000e needs a reinit to change the
mtu. In this case the dhcp hook reinit the nic and terminate now
to let the dhcpcd reinit the card in backgrounnd without running the
rest of the hooks.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-11-30 22:21:42 +01:00
Stefan Schantl
c8b068a2b5 red.up: Generate Suricata DNS servers file on reconnect.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-11-13 19:14:20 +00:00
Michael Tremer
cdf373c8fc unbound: Fix whitespace error in initscript
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-11-13 18:53:50 +00:00
Michael Tremer
31a36bb951 initscripts: Tell users to report bugs on Bugzilla
I have been receiving a couple of emails recently directed
at info@ipfire.org with bug reports when a system did not
boot up or shut down properly.

This is obviously not the right way to report bugs, but
we are telling our users to do so.

This patch changes this to report bugs to Bugzilla like
it should be.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-11-13 18:47:38 +00:00
Arne Fitzenreiter
be967dc920 Revert "firewall: always allow outgoing DNS traffic to root servers"
This reverts commit 70cd5c42f0.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-10-18 16:13:49 +02:00
Michael Tremer
a3f4b8c6f7 99-geoip-database: Fix download
This script started a fresh download every time it was called,
which is unnecessary.

The check to skip the download did not work because it was
looking for the old data format.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-10-14 17:47:31 +00:00
peter.mueller@ipfire.org
41fe437400 fix typo in hostapd initscript
Fixes: #11237

Reported-by: Tom Rymes <tomvend@rymes.com>
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-10-14 17:40:25 +00:00
peter.mueller@ipfire.org
70cd5c42f0 firewall: always allow outgoing DNS traffic to root servers
Allowing outgoing DNS traffic (destination port 53, both TCP
and UDP) to the root servers is BCP for some reasons. First,
RFC 5011 assumes resolvers are able to fetch new trust ancors
from the root servers for a certain time period in order to
do key rollovers.

Second, Unbound shows some side effects if it cannot do trust
anchor signaling (see RFC 8145) or fetch the current trust anchor,
resulting in SERVFAILs for arbitrary requests a few minutes.

There is little security implication of allowing DNS traffic
to the root servers: An attacker might abuse this for exfiltrating
data via DNS queries, but is unable to infiltrate data unless
he gains control over at least one root server instance. If
there is no firewall ruleset in place which prohibits any other
DNS traffic than to chosen DNS servers, this patch will not
have security implications at all.

The second version of this patch does not use unnecessary xargs-
call nor changes anything else not related to this issue.

Fixes #12183

Cc: Michael Tremer <michael.tremer@ipfire.org>
Suggested-by: Horace Michael <horace.michael@gmx.com>
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Acked-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-10-08 18:48:40 +00:00