Score:1

UFW Delete 1 (or more) Rule(s) (silently)?

cn flag

Is there a way to make Ubuntu Fire Wall delete a rule without asking if I really want to delete it?

Just like you "pre-yes" apt install [package] by -y.

I want to be able to read out only the DENY IN rules, sort them numerically by IP, delete those specific existing rules and then reapply them in the sorted order.

I have spent a long time to create my script (more less finised), to realise that I can't delete rules without saying: Yes, I really want to delete it.

I am aware, that I could read out all of my rules (not only DENY IN ones), and reset UFW and then reapply all of them, but I don't want to reset the firewall. The other rules never change, so I want to leave them alone.

Even if I first do sudo -i, UFW will still ask that question.

So, are any of you aware of a way to make UFW delete a rule without asking if I really want to delete it?

I also can't find an option like that on the man page.

Chris avatar
gh flag
Check here https://superuser.com/q/1564138/275918
Andras avatar
cn flag
That is Great.. Thank you.
Andras avatar
cn flag
@Chris I finally had time to try it, and it worked perfectly.. Thanks
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.