Cannot edit rules after toggling OFF/ON

Bug #1956171 reported by Hump Tee
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Gufw
Fix Released
Undecided
Unassigned

Bug Description

After clicking off the Firewall(Status) and then clicking it back on,
The Names of all the rules are missing (blank)
If I try to edit any one of them I get;

Immutable Rule
You can't edit a rule added from ufw

I'm having to re-enter all the rules from scratch, just so I can get the names in. And I must remember not to ever turn off the Status.

Revision history for this message
costales (costales) wrote : Re: [Bug 1956171] [NEW] Cannot edit rules after toggling OFF/ON

Hi, it should work, gufw uses a database for check when a rule is from ufw
or gufw. Could you run gufw from the shell and check if there is any dump?
Best regards

Revision history for this message
Hump Tee (humpty) wrote :

The msgs I get at start up is;

ls: cannot access '/usr/lib/python*/site-packages/gufw/gufw.py': No such file or directory

(gufw.py:20236): GLib-GIO-CRITICAL **: 23:32:16.520: g_dbus_proxy_new: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
 (above message displays 10 times)

It is definitely the Status toggle that is resetting the profile.

Before: toggle is ON
root:/etc/gufw> ls -l Home.profile
 -rw------- 1 root root 577 Jan 10 00:11 Home.profile

After: toggle is OFF
root:/etc/gufw> ls -l Home.profile
 -rw------- 1 root root 80 Jan 10 00:26 Home.profile

When the toggle is next switched to ON, the profile has no rules,
so gufw load the rules from UFW (which are un-editable)

Workaround is to save the profile while toggle is ON;
root:/etc/gufw> cp Home.profile Saved

And to overwrite it just before the next toggle to ON;
root:/etc/gufw> cp Saved Home.profile

( I'm using gufw_20.04.1-1 Lubuntu 20.04.02 (with fix_9 patch). )

Revision history for this message
John Ross (johnross-johnross) wrote :

I can confirm this bug on xubuntu 20.04.4 LTS and GUFW 20.04.1.

Revision history for this message
ananke (ananke) wrote :

We began evaluating gufw for a project, and came across the same issue. I'm a bit baffled by the current design, why would enabling/disabling state of a firewall result in complete wipe of the configuration file? What's the goal here?

As it stands, this is fundamentally broken by design.

Revision history for this message
jeff (869606a) wrote :

Using gufw on kde neon. Flicked the gufw status switch off then back on and the name column went blank in the rules view. Before flicking the switch, there were about 6 out of about 30+ rules that had names, e.g., uxplay, as I had just recently created some rules named uxplay. Now the names are gone, and I can't edit the recently created rules per the message "Immutable Rule You can't edit a rule added from ufw", even though I created the rules in gufw not ufw. This looks something described as perhaps being from before 2019 per https://bbs.archlinux.org/viewtopic.php?id=250975

Revision history for this message
Vaessen (peter-vaessen) wrote :

This bug was filed more than a year ago and there is still no root cause investigation?!

I agree with ananke:
Why would enabling/disabling state of a firewall result in complete wipe of the configuration file? Seems very quirky.

Please fix, this defect is very annoying!

What would be the best workaround?
- Saving and restoring the profile (suggestion from Hump Tee)?
- Turning off the firewall via ufw i.s.o. gufw?
- Other ideas?

Revision history for this message
costales (costales) wrote :
Changed in gui-ufw:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.