Follow

```sh
# sysctl -a --pattern "net.ipv4.conf.*\.rp_filter"
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.eno1.rp_filter = 1
net.ipv4.conf.eno2.rp_filter = 1
# /lib/systemd/systemd-sysctl <(echo 'net.ipv4.conf.*.rp_filter=2')
# sysctl -a --pattern "net.ipv4.conf.*\.rp_filter"
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.default.rp_filter = 2
net.ipv4.conf.eno1.rp_filter = 2
net.ipv4.conf.eno2.rp_filter = 2
```

1) You don't need grep to filter the output of sysctl

2) systemd-sysctl can use wildcards!

Sign in to participate in the conversation
Infosec Exchange

A Mastodon instance for info/cyber security-minded people.