Live (re)loading of rules for namespace tracking #1316
-
Two questions
Some background I would like to dynamically update the opensnitch rules in order to track network activity for Linux namespaces (sandboxing). Opensnitch can see the name of the tap device, because on the host you launch slirp4netns like this slirp4netns --configure 24853 tap0 (24853 is the net namespace, tap0 the interface inside 24853) So yes, in theory I could regex filter on tap0 (and use a name that is a bit better than tap0), but the approach feels a bit like duct-taping. But afaik, network device names are heavily restricted. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It should reload the files (unless the rule is malformed). Change the LogLevel to DEBUG, and edit a rule manually from /etc/opensnitchd/rules. There should be log entries similar to these ones in /var/log/opensnitch.log
dropping or deleting rules under /etc/opensnitchd/rules should also reload the ruleset. Regarding filtering by namespaces details, for now it's not possible. I have in my TODO list to obtain the namespaces of a process if any, ideally from the kernel, to offer more context about the connections. So if you created a new uts_namespace along with the net namespace, it should help to filter these connections. |
Beta Was this translation helpful? Give feedback.
It should reload the files (unless the rule is malformed). Change the LogLevel to DEBUG, and edit a rule manually from /etc/opensnitchd/rules. There should be log entries similar to these ones in /var/log/opensnitch.log