Merge #513 first. This branch is stacked on it, so the diff shows both commits until then.
What and why
The profiles set net.ipv4.conf.all.accept_redirects=0 only. With forwarding off, an interface whose own value is 1 still accepts ICMP redirects.
Every profile now sets accept_redirects=0 for all, default and every interface (*), over IPv4 and IPv6, and secure_redirects=0 for all and default over IPv4.
The sysctl list accepts * in key names. The role applies it live to the interfaces that exist, and systemd-sysctl applies it at boot.
IPv6 keys are skipped live when the kernel has no IPv6.
A consumer who overrides the list must add the new keys to it.
Local --check runs of the task file in a throwaway network namespace: a differing value, a second run without changes, a mistyped key, IPv6 missing.
Writes by hand in such a namespace, in the form the role uses, including a VLAN interface and a missing one.
Molecule: see the CI run of this pull request.
Not verified
A real write by the role itself: the molecule containers have a read-only /proc/sys.
A reboot that loads the drop-in.
The role on Debian 13.
An interface that disappears in the middle of a write.
I confirm third-party material is recorded in NOTICE and REUSE.toml, or there is none.
Assisted-by: Claude Code:claude-opus-5-5
**Merge #513 first.** This branch is stacked on it, so the diff shows both commits until then.
## What and why
The profiles set `net.ipv4.conf.all.accept_redirects=0` only. With forwarding off, an interface whose own value is 1 still accepts ICMP redirects.
- Every profile now sets `accept_redirects=0` for `all`, `default` and every interface (`*`), over IPv4 and IPv6, and `secure_redirects=0` for `all` and `default` over IPv4.
- The sysctl list accepts `*` in key names. The role applies it live to the interfaces that exist, and `systemd-sysctl` applies it at boot.
- IPv6 keys are skipped live when the kernel has no IPv6.
A consumer who overrides the list must add the new keys to it.
Closes #511
## Verified
- The pre-commit hooks passed on the commit.
- Local `--check` runs of the task file in a throwaway network namespace: a differing value, a second run without changes, a mistyped key, IPv6 missing.
- Writes by hand in such a namespace, in the form the role uses, including a VLAN interface and a missing one.
- Molecule: see the CI run of this pull request.
## Not verified
- A real write by the role itself: the molecule containers have a read-only `/proc/sys`.
- A reboot that loads the drop-in.
- The role on Debian 13.
- An interface that disappears in the middle of a write.
---
- [x] I confirm third-party material is recorded in `NOTICE` and `REUSE.toml`, or there is none.
Assisted-by: Claude Code:claude-opus-5-5
systemd-sysctl on Debian 13 does not read /etc/sysctl.conf, so the
hardened values were lost on reboot. The role now applies the live values
on their own, writes them to a drop-in under /etc/sysctl.d and removes its
keys from /etc/sysctl.conf.
Refs #510
Assisted-by: Claude Code:claude-opus-5-5
With forwarding off the kernel accepts redirects when either `all` or the
interface's own value is 1, and over IPv6 only the interface's value counts.
The profiles now also set `default` and, with a wildcard, every existing
interface, over IPv4 and IPv6.
Refs #511
Assisted-by: Claude Code:claude-opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Merge #513 first. This branch is stacked on it, so the diff shows both commits until then.
What and why
The profiles set
net.ipv4.conf.all.accept_redirects=0only. With forwarding off, an interface whose own value is 1 still accepts ICMP redirects.accept_redirects=0forall,defaultand every interface (*), over IPv4 and IPv6, andsecure_redirects=0forallanddefaultover IPv4.*in key names. The role applies it live to the interfaces that exist, andsystemd-sysctlapplies it at boot.A consumer who overrides the list must add the new keys to it.
Closes #511
Verified
--checkruns of the task file in a throwaway network namespace: a differing value, a second run without changes, a mistyped key, IPv6 missing.Not verified
/proc/sys.NOTICEandREUSE.toml, or there is none.Assisted-by: Claude Code:claude-opus-5-5