Clearing IP Do-Not-Fragment in Firewall Normalizations causes issues
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
- [X] I have read the contributing guide lines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md
- [X] I am convinced that my issue is new after having checked both open and closed issues at https://github.com/opnsense/core/issues?q=is%3Aissue
Describe the bug
Clearing the DF-Bit using normalisation causes service disruptions.
Sites like Reddit or Github wont work any longer when "no-df" is set.
Tip: to validate your setup was working with the previous version, use opnsense-revert (https://docs.opnsense.org/manual/opnsense_tools.html#opnsense-revert)
To Reproduce
Steps to reproduce the behavior:
- Go to: "Firewall: Settings: Normalization"
- Click on "IP Do-Not-Fragment"
- Browse to https://github.com/opnsense/core/ or try to read a reddit post.
- Sites dont function as expected
Expected behavior
Clear DF-bit if set and reassemble packets if needed.
Describe alternatives you considered
As described in https://docstore.mik.ua/manuals/openbsd/faq/pf/scrub.html there are other scrubbing options that are missing in the config options. Like: "fragment reassemble".
I expect that "no-df" can be configured together with "fragment reassemble". So that no matter what MTU size the packets have or whether the df-bit is set or not the packets are reassembled and everything works.
Also add missing config options: "fragment crop", "fragment drop-ovl", "reassemble tcp"
Environment
OPNsense 23.7.12-amd64 FreeBSD 13.2-RELEASE-p7 OpenSSL 1.1.1w
relevant man page (containing available options) https://man.freebsd.org/cgi/man.cgi?pf.conf(5)
and section explaining why "fragment reassemble" is not available:
fragment reassemble
Using scrub rules, fragments can be reassembled by normalization.
In this case, fragments are buffered until they form a complete
packet, and only the completed packet is passed on to the filter.
The advantage is that filter rules have to deal only with com-
plete packets, and can ignore fragments. The drawback of caching
fragments is the additional memory cost.
This is the default behaviour unless no fragment reassemble is specified.
Then I don't understand why deactivating "IP Do-Not-Fragment" solves the problem and the websites work again.
debugging your setup goes beyond my community support time, I'm merely pointing you into the right direction here.
Then I don't understand why deactivating "IP Do-Not-Fragment" solves the problem and the websites work again.
By disabling "IP Do-Not-Fragment," you are most likely breaking Path MTU Discovery.
Somewhere between you and the website, an MTU is smaller than your local network. Some packets are too large to traverse the link and get dropped.