Bug 2016864
Summary: | Masquerade fails to work on F35 | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Peter Hutterer <peter.hutterer> | ||||||
Component: | firewalld | Assignee: | Eric Garver <egarver> | ||||||
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | unspecified | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | 35 | CC: | egarver, hkario, mrsam, psutter | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | If docs needed, set a value | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2021-10-26 22:59:19 UTC | Type: | Bug | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
Peter Hutterer
2021-10-25 01:02:51 UTC
F35 saw a major version bump for firewalld. See this F35 Change: https://www.fedoraproject.org/wiki/Changes/firewalld-1.0.0#Detailed_Description Can your share your zone config? The required changes depend on how your interfaces/sources are assigned to zones. # firewall-cmd --list-all-zones # firewall-cmd --list-all-policies Created attachment 1837016 [details]
firewall-cmd --list-all-policies
After looking at those files, I suspect the "forward: no" in the FedoraWorkstation zone may be the issue. And indeed, if I switch the zone to "trusted" (after enabling masquerading) it works fine. But at least in the firewall UI I can't figure out where the toggle is for enabling forwarding - any idea what is enabling that? (In reply to Peter Hutterer from comment #4) > After looking at those files, I suspect the "forward: no" in the > FedoraWorkstation zone may be the issue. And indeed, if I switch the zone to > "trusted" (after enabling masquerading) it works fine. But at least in the > firewall UI I can't figure out where the toggle is for enabling forwarding - > any idea what is enabling that? It's exposed in the CLI as `--add-forward`. There is currently no config knob in the GUI (firewall-config). `forward` defaults to `yes` in v1.0.0+. Prior to that it defaulted to `no`. Since your configuration was carried over from a old firewalld it retained the setting of `no`. If your scenario was fixed by setting `--add-forward`, then I'm guessing you were unknowingly relying on this bug's behavior: https://github.com/firewalld/firewalld/issues/177. This was fixed by upstream commit: https://github.com/firewalld/firewalld/commit/f2896e43c3a548a299f87675a01e1a421b8897b8 As such, I don't think there is a bug here. You need to fix your configuration by setting `--add-forward` in the relevant zone (i.e. FedoraWorkstation). I'll wait on your reply before closing this as NOTABUG. [1]: https://firewalld.org/2020/01/allowzonedrifting Confirming that firewall-cmd --add-forward fixes the issue here, and forward: yes now shows up in the FedoraWorkstation zone. Thanks heaps! *** Bug 2020974 has been marked as a duplicate of this bug. *** Actually, just setting forward on the internal zone is not sufficient, there's also a need to create a policy that allows the forwarding between zones: // create new policy firewall-cmd --permanent --new-policy int_to_ext_fwd firewall-cmd --permanent --policy int_to_ext_fwd --add-ingress-zone internal firewall-cmd --permanent --policy int_to_ext_fwd --add-egress-zone external firewall-cmd --permanent --policy int_to_ext_fwd --set-priority 100 firewall-cmd --permanent --policy int_to_ext_fwd --set-target ACCEPT // Enable masquerade on external (this should already be the case if the setup worked on F34); 'forward' does not need to be set firewall-cmd --permanent --zone=external --add-masquerade // Enable forward on internal (this is a new setting) firewall-cmd --permanent --zone=internal --add-forward // restart firewalld systemctl restart firewalld.service (In reply to Hubert Kario from comment #8) > Actually, just setting forward on the internal zone is not sufficient, > there's also a need to create a policy that allows the forwarding between > zones: Correct. If the two interfaces are in THE SAME ZONE (intra-zone forwarding), then --add-forward is sufficient. If the two interface are in DIFFERENT zones, then you need an explicit policy to allow the inter-zone forwarding. |