]> git.ipfire.org Git - ipfire-2.x.git/commit
sysctl.conf: Enable Loose Reverse Path Filter according to RFC 3704
authorPeter Müller <peter.mueller@ipfire.org>
Sun, 16 Jan 2022 14:47:25 +0000 (14:47 +0000)
committerPeter Müller <peter.mueller@ipfire.org>
Wed, 19 Jan 2022 17:45:04 +0000 (17:45 +0000)
commitd21e6d94cb7d0b6faba8e6b4cf8ae14d431fe554
treee9a52b9c9086f1c5b70ae0efbbe57153f3fb197f
parentdf0635abb584b4598e269efacd6650bfb9831ca7
sysctl.conf: Enable Loose Reverse Path Filter according to RFC 3704

For historical reasons, we were always reluctant to reverse path
filtering, since configuration changes were tricky to evaluate for a
larger userbase, IPFire permits a number of complex scenarios, and due
to limited resources.

As a compromise, this patch suggests to enable Loose Reverse Path
Filtering, as specified in RFC 3704 (section 2.4), to gain at least some
security achievement on this end.

To quote from that:

   Loose Reverse Path Forwarding (Loose RPF) is algorithmically similar
   to strict RPF, but differs in that it checks only for the existence
   of a route (even a default route, if applicable), not where the route
   points to.  Practically, this could be considered as a "route
   presence check" ("loose RPF is a misnomer in a sense because there is
   no "reverse path" check in the first place).

   The questionable benefit of Loose RPF is found in asymmetric routing
   situations: a packet is dropped if there is no route at all, such as
   to "Martian addresses" or addresses that are not currently routed,
   but is not dropped if a route exists.

There is no legitimate reason why we cannot enable this: If IPFire
receives a packet on some interface it cannot route on _any_ interface
at all, there is no sense in processing it.

While testing this change, I was unable to produce a situation where it
actually causes any harm. In theory, it shouldn't do so anyways.

In the future, we will hopefully be able to set these sysctl's to "1",
using Strict Reverse Path Filtering, as specified in RFC 3704 (section
2.2). Doing so was found to work fine in my testing environment as well,
but there is no asymmetric routing in place there.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
config/etc/sysctl.conf