Skip to content

Firewalld issue with docker on Fedora 35

Sarthak0702 edited this page Jan 18, 2022 · 1 revision

Problem

Issue faced when running "docker-compose pull" on Fedora 35 (fresh install)

Error:

failed to start daemon: Error initializing network controller: Error creating default "bridge" network: Failed to program NAT chain: ZONE_CONFLICT: 'docker0' already bound to 'trusted'

Active firewall zones:

FedoraWorkstation
    interfaces: wlp0s20f3
trusted
    interfaces: docker0 

Issue

Issue was with the friewalld zone configuration. The docker0 interface was under trusted zone instead of docker zone which cased a zone conflict.

Solution

  • Create a new docker zone

    • sudo groupadd docker
  • bound docker0 interface from trusted-zone to docker-zone

    • sudo firewall-cmd --permanent --zone=docker --change-interface=docker0
  • delete docker0 from trusted zone

    • sudo firewall-cmd --permanent --zone=trusted --remove-interface=docker0
  • restart firewalld and docker services

    • sudo firewall-cmd --reload
    • sudo service docker restart
  • Correct Active firewal zones

    • FedoraWorkstation
          interfaces: wlp0s20f3
      docker
          interfaces: docker0
      
Clone this wiki locally