-
Notifications
You must be signed in to change notification settings - Fork 20
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
Can we make rules in opensnitch to deny/allow incoming stuff? #124
Comments
Right now is not possible to create rules for incoming connections. But anyway, it wouldn't much effort to add this functionality. We only need:
And we would get pop-ups like this one (real pop-up): The text of the pop-up could be: |
Thank you very much for your answer. I do not need the possibility to create INPUT rules and get INPUT pop-ups with opensnitch. It is quite enough for me to drop any incoming connections with iptables. Actually I only want to use opensnitch for privacy purposes to have control over the outgoing stuff. Maybe it's better to improve the functionality of the OUTPUT rules in opensnitch instead of implementing in addition support for INPUT rules. I only asked this question, because I was under the impression that opensnitch can only control the OUTPUT and wanted confirmation. Thank you. Nevertheless:
Suggestion: |
oops, this has been requested many times evilsocket/issues/116 evilsocket/issues/283
I'm not sure. From a security point of view yes. But I think that all the others (GUI) firewalls use an ACCEPT policy by default, and let it the users to configure a more restrictive policy. You can use /etc/opensnitchd/system-fw.json to insert system rules, but I didn't add the possibility to configure global policies. |
It could be great to have this feature, currently we can do it with ufw/gufw, but It would be better to just have to use OpenSnitch. |
ok, I've got this working. Before commit it. I'll review how it plays with the nftables rules, in order to reuse it when we migrate it. It would be great if we could only use the same configuration. On the other hand, these are the features currently supported:
Anything else? |
It's not a priority, but it could be great to have the ufw's capability to simplify the configuration of incoming stuff (in command line). Personnaly, I configure incoming connections with ufw in a postinstall script with very few command lines : ufw --force reset && \
ufw default deny incoming && \
ufw default allow outgoing && \
ufw allow $SSHPORT/tcp && \
ufw logging high && \
ufw --force enable where SSHPORT is a non default port for SSH. |
So, basically a command line tool to handle configurations. I understand that it'd be useful in order to automate tasks from scripts, like the the one you described. It wouldn't be much effort, all the code is already written. We should only have to handle .json files, without connecting to the daemon, because the daemon already monitor configurations for changes. |
@NRGLine4Sec @Golddouble could you make me a favor? Can you post the output of the following command? We suspect that that rule is useless, and should be removed. In all the systems where I've looked it has no hits: |
@gustavo-iniguez-goya Yes I confirm, there is no hits. |
Any updates on this ? |
not yet. The code is written but I wanted to add support for nftables first, because that could change the current system-fw.json format and I didn't want to introduce new changes that I'd have to remove later. |
No problem ! Thank you very much for the update ! |
Ok, I thought that the nftables go lib was not ready for use, but I've just written a simple PoC and it works just fine. |
sure, here you have: nftables.go.txt The PoC is only to add nftables rules using the nftables lib. Last night I integrated it with opensnitch (basic interception, no support for "system rules"), but it still needs a lot of work. I hope to work on this in the comming weeks, in parallel with the release of v1.4.0. |
nftables support added to the main repo: evilsocket@da23c82 Now it's turn for this request, allow to configure chains policies. Already done for iptables, but nftables is a little bit trickier. |
If you use nftables, the default policy can be configured by using the file /etc/nftables.conf: |
branch published to allow configure system firewall (nftables) from the GUI: https://github.com/evilsocket/opensnitch/tree/firewall-policies Please, if you can compile it from sources, do it and report any problem. It needs to be tested. For more information and ideas: evilsocket#592 (comment) |
Finally v1.6.0rc1 is out, with this feature added https://github.com/evilsocket/opensnitch/releases/tag/v1.6.0-rc.1 |
Wonderful, can barely wait to test it... |
I have a simple personal desktop computer. No server or something complicated.
iptables can control outgoing stuff (OUTPUT-chain) and incoming stuff (INPUT-chain).
Question:
A) Can opensnitch only deny/allow traffic that goes from my desktop PC out to the internet/into another network?
B) Or can opensnitch also deny/allow traffic, that comes from the internet (INPUT) into the PC, to protect the PC? In short: Can opensnitch also create something similar to INPUT-chain rules?
Thank you.
The text was updated successfully, but these errors were encountered: