Bug 1108651

Summary: firewalld update seems to break mdns
Product: [openSUSE] openSUSE Tumbleweed Reporter: Vincent Untz <vuntz>
Component: NetworkAssignee: Markos Chandras <mchandras>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Vincent Untz 2018-09-17 11:06:45 UTC
I updated tumbleweed from 20180820 to 20180915, and rebooted. Since then, I can't resolve .local DNS names.

I went ahead and flushed iptables (iptables -F), and that solved it. I then reloaded the firewalld config, and the issue is back.

Note that I have the mdns "service" enabled in firewalld, but I think I see no iptables rule matching this...
Comment 1 Vincent Untz 2018-09-17 11:17:10 UTC
I see this:

Chain IN_public_allow (1 references)
target     prot opt source               destination         
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:22 ctstate NEW


On a Leap 15.0 machine, I can see this additional rule:

ACCEPT     udp  --  0.0.0.0/0            224.0.0.251          udp dpt:5353 ctstate NEW
Comment 2 Vincent Untz 2018-09-17 11:22:26 UTC
Last note: if I uncheck/check the ssh service in firewall-config for runtime, I can see the ssh rule move out and in again; if I do the same for the mdns service, nothing never happens.
Comment 3 Markos Chandras 2018-09-17 12:04:22 UTC
Is this a duplicate of http://bugzilla.opensuse.org/show_bug.cgi?id=1105899 ? Right you your best option would be to ensure that you are using the iptables backend.
Comment 4 Vincent Untz 2018-09-17 13:09:43 UTC
(In reply to Markos Chandras from comment #3)
> Is this a duplicate of http://bugzilla.opensuse.org/show_bug.cgi?id=1105899
> ? Right you your best option would be to ensure that you are using the
> iptables backend.

Oh, interesting. I see that in my /var/log/firewalld

2018-09-17 10:02:10 ERROR: Invalid option: 'FirewallBackend=iptables'
Comment 5 Vincent Untz 2018-09-17 13:14:52 UTC
(In reply to Vincent Untz from comment #4)
> (In reply to Markos Chandras from comment #3)
> > Is this a duplicate of http://bugzilla.opensuse.org/show_bug.cgi?id=1105899
> > ? Right you your best option would be to ensure that you are using the
> > iptables backend.
> 
> Oh, interesting. I see that in my /var/log/firewalld
> 
> 2018-09-17 10:02:10 ERROR: Invalid option: 'FirewallBackend=iptables'

False positive: was probably before the new rpm got fully installed.
Comment 6 Vincent Untz 2018-09-17 13:31:19 UTC
So at least the config points to iptables. Any other way to check which backend is used?
Comment 7 Markos Chandras 2018-09-17 13:35:01 UTC
(In reply to Vincent Untz from comment #6)
> So at least the config points to iptables. Any other way to check which
> backend is used?

No, the config option alone should be enough. You can also check the 'nft list ruleset' to ensure that there are no nftables rules out there.
Comment 8 Vincent Untz 2018-09-17 13:49:37 UTC
(In reply to Markos Chandras from comment #7)
> (In reply to Vincent Untz from comment #6)
> > So at least the config points to iptables. Any other way to check which
> > backend is used?
> 
> No, the config option alone should be enough. You can also check the 'nft
> list ruleset' to ensure that there are no nftables rules out there.

Ok, "nft list ruleset" is empty.
Comment 9 Vincent Untz 2018-09-17 14:08:28 UTC
I edited /usr/lib/firewalld/services/mdns.xml and removed
  <destination ipv4="224.0.0.251" ipv6="ff02::fb"/>

When reloading firewalld, I see it adding a rule for mdns now. So it looks like something is wrong with the handling of that destination tag.
Comment 10 Vincent Untz 2018-09-17 14:09:35 UTC
(In reply to Vincent Untz from comment #9)
> I edited /usr/lib/firewalld/services/mdns.xml and removed
>   <destination ipv4="224.0.0.251" ipv6="ff02::fb"/>

Removing ipv6="ff02::fb" is actually enough to trigger the creation of the iptables rule.
Comment 13 Markos Chandras 2018-09-17 14:30:19 UTC
(In reply to Vincent Untz from comment #10)
> (In reply to Vincent Untz from comment #9)
> > I edited /usr/lib/firewalld/services/mdns.xml and removed
> >   <destination ipv4="224.0.0.251" ipv6="ff02::fb"/>
> 
> Removing ipv6="ff02::fb" is actually enough to trigger the creation of the
> iptables rule.

That makes sense because the upstream fix was about not building the correct rules on both families. So if you had ipv6 configured on the service, it's very likely that it only built the right rule for ipv6. I was hoping that by now there would be a new 0.6.X release which would include the fix but I will just go ahead and commit the backport to OBS for now.
Comment 14 Markos Chandras 2018-09-17 14:34:39 UTC
I am closing this as duplicate anyway since the underlying problem is the same. The fix is on its way to Factory. Thank you for the report

*** This bug has been marked as a duplicate of bug 1105899 ***
Comment 15 Vincent Untz 2018-09-17 14:45:08 UTC
Thanks for the fast action!