OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Archive »
  • 21.7 Legacy Series »
  • OPNsense 21.7.2-amd64: firewall rules order garbled
« previous next »
  • Print
Pages: [1] 2

Author Topic: OPNsense 21.7.2-amd64: firewall rules order garbled  (Read 4903 times)

blblblb

  • Newbie
  • *
  • Posts: 26
  • Karma: 2
    • View Profile
OPNsense 21.7.2-amd64: firewall rules order garbled
« on: September 07, 2021, 06:57:34 pm »
I upgraded to OPNsense 21.7.2-amd64 today. Several rulesets/interfaces have their rules order garbled. This has caused major issues. ex. reject * moved from end/final rule position to somewhere in the middle or higher.

Anyone else experienced this with the update or before?

Logged

blblblb

  • Newbie
  • *
  • Posts: 26
  • Karma: 2
    • View Profile
Re: OPNsense 21.7.2-amd64: firewall rules order garbled
« Reply #1 on: September 07, 2021, 07:34:59 pm »
This manifests when adding a new rule too. The block rules are moved elsewhere.
Edit: when saving, the order is shuffled.
« Last Edit: September 07, 2021, 08:21:13 pm by blblblb »
Logged

rico3

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
Re: OPNsense 21.7.2-amd64: firewall rules order garbled
« Reply #2 on: September 07, 2021, 08:31:06 pm »
Confirm, same problem here after upgrade to 21.7.2
I can restore settings using a XML configuration backup, but when touching any firewall rule the order of rules gets mixed up on all on all interface not just the one being modified.
« Last Edit: September 07, 2021, 08:35:34 pm by rico3 »
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13679
  • Karma: 1176
    • View Profile
Re: OPNsense 21.7.2-amd64: firewall rules order garbled
« Reply #3 on: September 07, 2021, 08:32:54 pm »
Could this be https://github.com/opnsense/core/commit/5993751b74 ?

# opnsense-patch 5993751b74


Cheers,
Franco
Logged

blblblb

  • Newbie
  • *
  • Posts: 26
  • Karma: 2
    • View Profile
Re: OPNsense 21.7.2-amd64: firewall rules order garbled
« Reply #4 on: September 07, 2021, 08:40:18 pm »
I just had a brain stroke when I read that patch and realize it happens in all interfaces...
Jesus. This might be the worst one yet. Time to check which backup has the right config.
Wish me luck!
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13679
  • Karma: 1176
    • View Profile
Re: OPNsense 21.7.2-amd64: firewall rules order garbled
« Reply #5 on: September 07, 2021, 08:58:25 pm »
Is that a confirm on the patch or a random rant? :)

I will prep a hotfix right away if this is confirmed. Looks like we will have to blacklist that contributor now...


Cheers,
Franco
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13679
  • Karma: 1176
    • View Profile
Re: OPNsense 21.7.2-amd64: firewall rules order garbled
« Reply #6 on: September 07, 2021, 09:14:02 pm »
FWIW, either my rules were already botched or I can't see the impact in my ruleset when I save a rule to invoke that sorting code. The patch - or rather - the sorting code is pretty weird by itself so if anyone has a configuration diff to share for rule reordering that would be great.


Thanks,
Franco
Logged

Mondmann

  • Jr. Member
  • **
  • Posts: 73
  • Karma: 7
    • View Profile
Re: OPNsense 21.7.2-amd64: firewall rules order garbled
« Reply #7 on: September 07, 2021, 10:11:22 pm »
@franco
Thanks for providing the fix so quickly:
# opnsense-patch 5993751b74
this has solved the above mentioned problem.
(and no one resents anything especially since the forum
helps at any time )
we are just happy that all developers,
Suporter and helpers so you are there for us...


Greetings from Germany
« Last Edit: September 07, 2021, 10:46:20 pm by Mondmann »
Logged
OPNsense 22.7.9*WG-kmod*OpenSSL*OpenVPN* AdGuardHome*i7-7700*32GB*256SSD*ix0-1, igb0-4, em0*OpenVPN+Wireguard WG0, WG1*NetGear ProSafe XS508*AP Netgear WAX610*alles echtes Blech* Sorry, my English is translated via app*

blblblb

  • Newbie
  • *
  • Posts: 26
  • Karma: 2
    • View Profile
Re: OPNsense 21.7.2-amd64: firewall rules order garbled
« Reply #8 on: September 07, 2021, 10:27:54 pm »
Quote from: franco on September 07, 2021, 08:58:25 pm
Is that a confirm on the patch or a random rant? :)

I will prep a hotfix right away if this is confirmed. Looks like we will have to blacklist that contributor now...


Cheers,
Franco

Never an ill intentioned rant, I don't get to complain about something that is free despite the effort it takes to develop this. And certainly not the kind to make a petty joke.

I genuinely worried this messed up the rules in a system that has *many* of them in specific order (more OCD of my own) to optimize the traffic and keep things sane.

But: I can confirm that this fixes it, or so it seems. The behavior was as follows (I cannot revert/change things up in this system and I dont have a test VM handy):

- Pick any interface
- Go to its ruleset
- Add or modify any rule, make sure you have some already, and one or two blocking rules.
- Save
- The order of the rules should be different now.
- Check a different interface, and the same situation applies.
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13679
  • Karma: 1176
    • View Profile
Re: OPNsense 21.7.2-amd64: firewall rules order garbled
« Reply #9 on: September 08, 2021, 08:47:59 am »
No worries, I was just trying to ask for confirmation in a weird way. :)

So I reverted the patch and published 21.7.2_1 and will look more closely at it later today.


Cheers,
Franco
Logged

Greelan

  • Hero Member
  • *****
  • Posts: 955
  • Karma: 65
    • View Profile
OPNsense 21.7.2-amd64: firewall rules order garbled
« Reply #10 on: September 08, 2021, 11:22:42 am »
No doubt you will figure it out Franco, but it is perhaps understandable the original contributor thought a change was necessary given lines 75 and 77 have the same condition, making 77 and 78 redundant . It just seems they picked the wrong thing to change…
« Last Edit: September 08, 2021, 11:27:04 am by Greelan »
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13679
  • Karma: 1176
    • View Profile
Re: OPNsense 21.7.2-amd64: firewall rules order garbled
« Reply #11 on: September 08, 2021, 11:48:41 am »
Right, that's certainly why it was accepted in the first place, but likely it should have not.


Cheers,
Franco
Logged

Greelan

  • Hero Member
  • *****
  • Posts: 955
  • Karma: 65
    • View Profile
Re: OPNsense 21.7.2-amd64: firewall rules order garbled
« Reply #12 on: September 08, 2021, 11:57:04 am »
The joys (perils) of open source
Logged

madj42

  • Newbie
  • *
  • Posts: 47
  • Karma: 3
    • View Profile
Re: OPNsense 21.7.2-amd64: firewall rules order garbled
« Reply #13 on: September 08, 2021, 01:46:33 pm »
Even though I already think I know the answer to this, I feel I need to ask.  I'm assuming that if we upgraded to this but didn't modify any firewall rules, we're not affected by this bug?
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13679
  • Karma: 1176
    • View Profile
Re: OPNsense 21.7.2-amd64: firewall rules order garbled
« Reply #14 on: September 08, 2021, 01:54:42 pm »
Under the assumption that you can still find a mirror with the wrong version active... yes.


Cheers,
Franco
Logged

  • Print
Pages: [1] 2
« previous next »
  • OPNsense Forum »
  • Archive »
  • 21.7 Legacy Series »
  • OPNsense 21.7.2-amd64: firewall rules order garbled
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2023 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2