On Centos 7 I want Docker containers to be able to reach the host so I tried to add docker0 to trusted zone:
# firewall-cmd --permanent --zone=trusted --add-interface=docker0
The interface is under control of NetworkManager and already bound to 'trusted'
The interface is under control of NetworkManager, setting zone to 'trusted'.
success
# firewall-cmd --get-zone-of-interface=docker0
no zone
This used to work but not on this server for whatever reason. I also tried firewall-cmd --reload
, nothing. As if firewalld commands are completely ignored. That NetworkManager message seems suspicious, is it possible that firewalld and NetworkManager are in some kind of conflict?
Out of desperation I also tried:
nmcli connection modify docker0 connection.zone trusted
which correctly set the ZONE=trusted
in the interface config but firewalld still shows that interface is not in the trusted zone.
What is going on here?