opensnitch icon indicating copy to clipboard operation
opensnitch copied to clipboard

Upgrading from Ubuntu 20.04 to 21.10 breaks the rule tab

Open Ileca opened this issue 3 years ago • 3 comments

I upgraded from Ubuntu 20.04 to 21.10 and now I feel like my OpenSnitch is a mess. One sure bug is that when I open OpenSnitch and go to the rules tab, a lot of my rules are missing from the Permanent subsection because only 50 are displayed. You have to change of subsection (like click on Temporary) for them to reappear. You can see something is missing at the end because the numbering keeps going... in the wrong order. I honestly don't remember how it was before tho... It comes back to 50 if you change tab and come back.

Screenshot from 2022-02-08 21-54-40

Also, new rules were made after the upgrade. 21.10 uses a new node. Before, it was unix:/local, now it's unix:/tmp/osui.sock. I have twice the rules now. The problem is that I can't edit the old ones because it throws me an error about how unix:/local is not connected. I have no idea what is a node btw haha. Sure it can't connect because it appears to not exist anymore. I guess it shouldn't matter too much and I should just remove them. Anyway, another thing is that the old node doesn't appear below the Nodes filter as you can see on my screenshot.

I think that OpenSnitch should at least warn you when it created new rules like that (not that I complain about the new rules being automatically made). With the first bug, I had no idea what was going on because my new rules didn't appear anymore and the ones using Python3.8 were obsolete because now I have Python3.9 (a way to mass overwrite filters would be good, maybe I should open a feature request later). I didn't notice I changed node because I only use the Permanent subsection and couldn't edit anything... thought everything was broken. *sweat*

  • OpenSnitch version: ??? > 1.5-0rc2
  • OS: Ubuntu
  • Version: 20.04 > 21.10
  • Window Manager: GNOME Shell 36.6 > 40.4.0
  • Kernel version: ??? > 5.13.0-28-generic

To Reproduce Upgrade from Ubuntu 20.04 to 21.10 (good luck to reproduce that). Click on the Rules tab.

Ileca avatar Feb 08 '22 21:02 Ileca

Hey @Ileca ,

Thank you for reporting this :+1:

You can see something is missing at the end because the numbering keeps going... in the wrong order.

Yes, I'm aware of this bug. It's just that the view scrolls down beyond the total number of rows. This behaviour varies among PyQt versions. Not only scrolling up/down, but also when selecting rows: https://github.com/evilsocket/opensnitch/issues/565#issuecomment-1000887490

I didn't find a way of solving it.

Before, it was unix:/local, now it's unix:/tmp/osui.sock.

That seems to be caused by the python3-grpcio update :/ Old versions of python3-grpcio didn't report correctly the address of a node: https://github.com/evilsocket/opensnitch/blob/feaf8de5081f1acf638e279772b83467860d49d9/ui/opensnitch/nodes.py#L137

What you can do right now:

  • Apply "old" rules to the "new" node: select the wanted rules (you can filter them by typing "unix:/local" on the search box) -> right click -> Apply to -> unix:/tmp/osui.sock
  • Delete the "old" rules.

the old node doesn't appear below the Nodes filter

You're right, The nodes are added to the Nodes filter when they connect to the GUI. We need to add them also if they're stored on the DB, regardless if they're connected or not.

gustavo-iniguez-goya avatar Feb 08 '22 23:02 gustavo-iniguez-goya

I didn't find a way of solving it.

That's a shame because this is quite the issue. If you need me to test things, just ask.

What you can do right now:

No need for that. When I upgraded, the rules were automatically cloned and applied to the new node.

I also noticed another bug. I have temporary "until reboot" rules that were not removed after reboot. Four old ones I can't edit for aforementioned reason but they are named "until-restart". And four ones with one dating from 02-07. I shut down my computer every day.

Ileca avatar Feb 09 '22 20:02 Ileca

Hi @gustavo-iniguez-goya, I read the other issue and I am not sure this is the same problem and that we are on the same page. My scrolling is not that unstable. It's just that the view is stuck at 50 rules. I noticed something new: the select on the bottom right that decide how many results you display. I changed it because I didn't see enough events. And the rules started displaying 100 rules too. I just noticed today. Shouldn't this select only be for events as the cross next to it is about deleting events? Anyway, this is the thing that appears to bug my interface.

Ileca avatar Feb 11 '22 19:02 Ileca

There has been many changes since February. If this issue still applies, try latest v1.6.0rc3 and see if it's solved.

gustavo-iniguez-goya avatar Dec 31 '22 16:12 gustavo-iniguez-goya