Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Block private networks" seems to create a defective firewall rule (cosmetic problem only) #7060

Closed
meyergru opened this issue Dec 7, 2023 · 7 comments
Assignees
Labels
cleanup Low impact changes

Comments

@meyergru
Copy link
Contributor

meyergru commented Dec 7, 2023

The interface setting "block private networks" creates an automatic rule that shows the following networks in it: 10.0.0.0/8, 27.0.0.0/8, 00.64.0.0/10, 72.16.0.0/12, 92.168.0.0/16.

Expected behavior

The networks seem to be shortened, they should be 10.0.0.0/8, 127.0.0.0/8, 100.64.0.0/10, 172.16.0.0/12, 192.168.0.0/16

Additional context

It seems like 23.7.8 did not expose this behaviour. See https://forum.opnsense.org/index.php?topic=37389.0.

I do not know if opnsense/core contains the root cause, because it did not find this in the source.

Environment

OPNsense 23.7.9 (amd64).

@fichtner
Copy link
Member

fichtner commented Dec 7, 2023

How was this diagnosed... by trusting pfctl output or by testing the actual rule?

@fichtner fichtner added the support Community support label Dec 7, 2023
@meyergru
Copy link
Contributor Author

meyergru commented Dec 7, 2023

By looking at the automatic rule in the GUI. Try it for WAN, for example and look at the firewall rules.

@fichtner
Copy link
Member

fichtner commented Dec 7, 2023

Screenshot for context please.

@meyergru
Copy link
Contributor Author

meyergru commented Dec 7, 2023

2023-12-07 12_24_48-WAN _ Rules _ Firewall _ OPNsense jmg – Mozilla Firefox

(I could not believe it, either)

@fichtner
Copy link
Member

fichtner commented Dec 7, 2023

Could be cosmetical from the last commit that I did. This isn’t even diagnostics data.

@meyergru
Copy link
Contributor Author

meyergru commented Dec 7, 2023

Yes, sure looks so:

block drop in quick on igc3 inet from 10.0.0.0/8 to any label "1072878c6245b52440bc89c6107a9d0a"
block drop in quick on igc3 inet from 127.0.0.0/8 to any label "1072878c6245b52440bc89c6107a9d0a"
block drop in quick on igc3 inet from 100.64.0.0/10 to any label "1072878c6245b52440bc89c6107a9d0a"
block drop in quick on igc3 inet from 172.16.0.0/12 to any label "1072878c6245b52440bc89c6107a9d0a"
block drop in quick on igc3 inet from 192.168.0.0/16 to any label "1072878c6245b52440bc89c6107a9d0a"

So it is probably bad formatting.

@meyergru meyergru changed the title "Block private networks" creates a defective firewall rule "Block private networks" seems to create a defective firewall rule (cosmetic problem only) Dec 7, 2023
@fichtner fichtner added cleanup Low impact changes and removed support Community support labels Dec 7, 2023
@fichtner fichtner self-assigned this Dec 7, 2023
@fichtner
Copy link
Member

fichtner commented Dec 7, 2023

Not something that is easy to spot... 52f3939

Thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Low impact changes
Development

No branches or pull requests

2 participants