Hi
trying to delete some previous added rules in GUFW I get an error: "error executing operation" (translated from my Spanish desktop)
is there any other way to delete some user rules?
thanks








jomaweb wrote:sudo ufw delete allow from 192.168.1.128
[sudo] password for jose:
Could not delete non-existent rule
But you know? that rule exists. I can see it in GUFW


To delete a rule, simply prefix the original rule with delete. For
example, if the original rule was:
ufw deny 80/tcp
Use this to delete it:
ufw delete deny 80/tcp
You may also specify the rule by NUM, as seen in the status numbered
output. For example, if you want to delete rule number '3', use:
ufw delete 3
Deleting:
allow 54161/udp
Proceed with operation (y|n)? y

CiaW wrote:Using the syntax above didn't work for me either, but I wasn't trying to delete an IP just a port/tcp -- but it did come up with a help screen which left me confused. So I decided to read the man pages, and here's some of what it says relevant to deleting a rule:To delete a rule, simply prefix the original rule with delete. For
example, if the original rule was:
ufw deny 80/tcp
Use this to delete it:
ufw delete deny 80/tcp
You may also specify the rule by NUM, as seen in the status numbered
output. For example, if you want to delete rule number '3', use:
ufw delete 3
So what I did was type (in a root terminal) 'ufw status numbered' (sans quotes) and got the output with numbers in front of the few rules I have. I then typed ufw delete 6 and it asked me to confirm:Deleting:
allow 54161/udp
Proceed with operation (y|n)? y
and the rule was deleted! I then ran the ufw status numbered again to find the new number for the 2nd one I wanted to delete and realized it might be better to delete the higher number first so that the lower numbers higher on the list don't get renumbered, if you want to delete more than 1 rule. Once again, rtfm saves the day.

Users browsing this forum: Efrum and 5 guests