-
-
Notifications
You must be signed in to change notification settings - Fork 528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use iptables trough iptc, enables rootless operation #41
Conversation
is it dependant on this #43 ? |
No it's not |
Question: how do we execute setcap on first run in order not to have the user do it? Maybe we should require root for first run, setcap on ourself and then re-run without root? |
We don't. We would have to do setcap on the whole python interpreter which is bad for obvious reasons. This should also translate fairly well to |
Not sure if I want to merge it on master tbh ... |
I think it's fine to leave this unmerged. It's not a very significant improvement. |
👍 |
I'm closing this, lets keep it in mind as a future reference :) |
absolutely, great job btw 👍 |
Reviving my PR #41 and polishing it up a bit for easier usage
When the daemon is stopped, we need to close opened netfilter recurses. Otherwise we can fall into a situation where we leave NFQUEUE queues opened, which causes opensnitch to not run anymore until system restart or a manual intervention, because there's a NFQUEUE queue already created with the same ID. This is what was happening as a collateral effect of #41.
Related to #38
Provided I do
setcap 'cap_net_raw,cap_dac_override,cap_net_admin=+ep' $(which python2)
I can run opensnitch with an unprivileged user.Needed
cap_net_raw
because of how communication with the kernel happens from iptables.I say we still keep #38 open though, this is a larger issue