-
-
Notifications
You must be signed in to change notification settings - Fork 521
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
mount nfs/cifs is blocked despite no deny rules #753
Comments
Hi @carpii , Probably opensnitch is not discovering the process of those connections at kernel level. There has been a change in kernel 5.19 that breaks our interception of VPNs (#454 ), but last time I tried nfs worked fine. Could you post the output of the following commands?
As a workaround you can enable |
Thanks for the quick reply. [Edit: This reply was edited from earlier, as I noticed I did not have
Still unable to mount or unmount while opensnitch UI is running and enabled |
If you didn't restart the daemon do it now (and try again): If you already did it, could you review the log |
I hadnt restarted the daemon, but have now (a few times) Unfortunately there's very little in the logs....
This covers stopping and restarting daemon, aswell as trying to mount then disabling UI, mounting and then re-enabling UI I think my problem now is that opensnitchd seems to be exiting shortly after starting...
I'll test again after a reboot tomorrow, and report back. Thanks for the help so far |
Yes, it seems that it's not starting.There should be errors in the journalctl, but try launching it manually as root, it'll output more errors: be sure that it's not running: |
oh by the way, 1) once it's started and running, and 2)
If enabling |
I've been troubleshooting this a bit more... The opensnitchd service was terminating shortly after a start, due to a segfault. I noticed I was still using 1.52 so upgraded to the git version from AUR (1.6x). I also enabled the DEBUG connections option. At this point, it did start prompting me for kernel level connections, although they were listed as 'unknown process' and I still could not use mount. I'm a little confused on whether the process monitor is working properly (still ebpf). When opensnitchd is started, I now see an error in the logs....
This is odd, because the system rules display ok in the UI (I dont think my previous version had a section to show system rules). But it appears to have a knock-on effect, that none of my user rules appear in the UI anymore, even though they still exist in /etc/opensnitchd/rules/ I've had to disable opensnitchd for the time being, as it now seems to prevent me logging into xfce (it was just shows a black screen with mouse pointer after logging in - maybe a system connection being blocked, I'm not sure). Is there a way to just reset /etc/opensnitchd/system-fw.json to initial state, so that I don't get a parser error anymore? |
The system-fw.json error message shouldn't be there really. That field is not being used right now, so you can ignore it.
hmm, applications rules should appear in the GUI. If there're any errors loading them there should be a warning message in the log /var/log/opensnitchd.log:
If you create a new rule, is it added to the list of rules? is it loaded after reboot?
If you've been prompted to allow kernel connections, the monitor method is ebpf for sure, but you can grep the logs for this trace:
You can try to set the DefaultAction to allow in Probably it'll be caused by |
Please, check (as root) if the file
If On the other hand, if it's an intercepted kernel connection, the pop-up should say it (instead of "unknown"): |
Appreciate the help, thanks. I'll do some more testing over the next few days, so I've something useful to report. But yes, after installing the git version, I was using the command you suggested earlier..
and this was returning an xmit line (whereas previously it wasnt). |
@carpii sorry :( usually using opensnitch is very straightforward, but in some cases...
That's good. At least your kernel supports it. Please, set log level to DEBUG, try to reproduce it again and post the logs. |
I'm having this issue as well on Arch Linux, opensnitch version 1.6.0rc2.r48.a3538a7. I know NFS only uses port 2049 so I have an allow from any process to 10.42.42.4:2049 (10.42.42.4 being the IP of my NFS server) rule. I know this used to work before Sept 12th or so. But for me, when I run I do have debug invalid connections checked and ebpf set as the process monitor method. What's interesting is that when I try the NFS connection, I see this in the logs
|
Update: I thought I had the ebpf module installed, but it turns out I did not. After installing it and restarting opensnitchd,
I still get the same couldn't find process by its pid error |
works for me when I edit /etc/opensnitchd/system-fw.json to say
|
hey @bingobr @seonwoolee @carpii could any of you try out this module? udp_tunnel_xmit_skb.zip Now instead of hooking
The zipped module has been compiled against kernel 5.8, tested with kernels 5.15 (wireguard + nfs were already intercepted) and 5.19 (wireguard and nfs were not intercepted, needed to be compiled against kernel 5.19), and with both kernels nfs and vpns are intercepted (ubuntu 22). Just backup your module ( After stop and start opensnitch, there should be an entry like this both in the module and kprobe_events file: $ objdump -h opensnitch.o | grep udp_tunnel
7 kprobe/udp_tunnel_xmit_skb 00000400 0000000000000000 0000000000000000 00000c98 2**3
$ sudo grep udp_tunnel /sys/kernel/debug/tracing/kprobe_events
p:kprobes/pudp_tunnel_xmit_skb udp_tunnel_xmit_skb |
hmm, so yesterday I was able to insert a kprobe for If the kprobe is not added to $ sudo grep udp_tunnel /sys/kernel/debug/tracing/available_filter_functions On a 5.19 Debian kernel there're 27 functions related to udp_tunnel. On ubuntu (today...?) 0. I need to investigate this behaviour. |
Ok, found the problem: you need to load the module So, before start the daemon and after copy the new module, load it: all the steps: $ sudo service opensnitch stop
$ sudo mount udp_tunnel
$ unzip udp_tunnel_xmit_skb.zip
$ sudo cp /etc/opensnitchd/opensnitch.o /etc/opensnitchd/opensnitch.o.bak
$ sudo cp opensnitch.o /etc/opensnitchd/opensnitch.o
$ sudo grep udp_tunnel_xmit /sys/kernel/debug/tracing/available_filter_functions
udp_tunnel_xmit_skb [udp_tunnel]
$ sudo service opensnitch start
$ sudo grep udp_tunnel_xmit /sys/kernel/debug/tracing/kprobe_events
p:kprobes/pudp_tunnel_xmit_skb udp_tunnel_xmit_skb both greps must output the above lines. |
Regarding this issue, latest v1.6.0rc5 is compiled against 5.19, so nfs should work again. On the other hand, for < 5.19 kernels there're precompiled binaries that you can use: https://github.com/evilsocket/opensnitch/actions/runs/4276068016 |
hi! I've changed the way we compile the ebpf modules: #942 Could you download and test the precompiled binaries to see if there's any errors before the next release? (links at the bottom of that discussion) Thank you! |
Describe the bug
opensnitch is configured to deny connections when 'GUI is disconnected'
Also configured to prompt for new rules, if GUI is running and enabled
I have no deny rules at all in my opensnitch UI
If I try to mount remote NFS or CIFS it blocks indefinitely (no GUI prompt, even though GUI is running and enabled).
If I keep the GUI running, but choose to disable it, the issue is resolved but Im confused why it's being blocked to begin with?
Versions
Steps to reproduce the behavior
Post error logs:
No relevant logs as far as I can see
Expected behavior (optional)
If GUI is disconnected I woudl expect it to deny
If GUI is running and enabled, then I would expect it to prompt me (since there are no deny rules in the UI)
The text was updated successfully, but these errors were encountered: