JonathonReinhart / linux-netns-sysctl-verify

Linux network namespace sysctl safety verifier.
11 stars 1 forks source link

Error writing 'nfnetlink_log' > /proc/sys/net/netfilter/nf_log/0: [Errno 2] No such file or directory #4

Open JonathonReinhart opened 3 years ago

JonathonReinhart commented 3 years ago

Error writing 'nfnetlink_log' > /proc/sys/net/netfilter/nf_log/0: [Errno 2] No such file or directory
Error writing 'nfnetlink_log' > /proc/sys/net/netfilter/nf_log/1: [Errno 2] No such file or directory
Error writing 'nfnetlink_log' > /proc/sys/net/netfilter/nf_log/10: [Errno 2] No such file or directory
Error writing 'nfnetlink_log' > /proc/sys/net/netfilter/nf_log/11: [Errno 2] No such file or directory
Error writing 'nfnetlink_log' > /proc/sys/net/netfilter/nf_log/12: [Errno 2] No such file or directory
Error writing 'nfnetlink_log' > /proc/sys/net/netfilter/nf_log/2: [Errno 2] No such file or directory
Error writing 'nfnetlink_log' > /proc/sys/net/netfilter/nf_log/3: [Errno 2] No such file or directory
Error writing 'nfnetlink_log' > /proc/sys/net/netfilter/nf_log/4: [Errno 2] No such file or directory
Error writing 'nfnetlink_log' > /proc/sys/net/netfilter/nf_log/5: [Errno 2] No such file or directory
Error writing 'nfnetlink_log' > /proc/sys/net/netfilter/nf_log/6: [Errno 2] No such file or directory
Error writing 'nfnetlink_log' > /proc/sys/net/netfilter/nf_log/7: [Errno 2] No such file or directory
Error writing 'nfnetlink_log' > /proc/sys/net/netfilter/nf_log/8: [Errno 2] No such file or directory
Error writing 'nfnetlink_log' > /proc/sys/net/netfilter/nf_log/9: [Errno 2] No such file or directory```
JonathonReinhart commented 3 years ago

This happens if nfnetlink_log is not loaded.

https://github.com/JonathonReinhart/linux-netns-sysctl-verify/blob/664dd5fc0ca66b3cb68b4f51ec39fbd4e74c05f6/verify.py#L142

Fix with: modprobe nfnetlink_log

We should try to figure out the set of available nf_log "providers" (?) and choose one, and warn if there aren't any (and make a suggestion)