title: Docker container on Fedora 28 KDE have no internet connection
body: <p>since a couple of weeks I'm trying to fix an issue on my new laptop with fedora 28 KDE desktop!</p>
  
  <p>I have two issues :</p>
  
  <ol>
  <li>The container can't connect to the internet</li>
  <li>The container doesn't see my hosts in /etc/hosts</li>
  </ol>
  
  <p>I tried many solutions, disable firewalld, flusing iptables, accepting all connections in ip tables, enabling firewalld and changing network zones to "trusted"! also disbaled iptables using daemon.json! it still not working!!</p>
  
  <p>please anyone can help, it's becoming a nightmare for me!</p>
  
  <p><strong>UPDATE #1:</strong> </p>
  
  <p>even when I try to build an image it can't access the internet for some reason!, it seems the problem in the level of docker not only containers!
  I tried to disable the firewall or changing zones, I also set all connections to "trusted" zone</p>
  
  <p>anyone can help?</p>
  
  <p><strong>UPDATE #2:</strong></p>
  
  <p>When I turn on firewalld service and set wifi connection zone to 'external' now container/docker is able to access internet, but services can't access each other</p>
  
  <p><strong>Here is my yml file :</strong></p>
  
  <pre><code>version: "3.4"
  services:
    nginx:
      image: nginx
      ports:
      - "80:80"
      - "443:443"
      deploy:
        mode: replicated
        replicas: 1
      networks:
        nabed: {}
      volumes:
      - "../nginx/etc/nginx/conf.d:/etc/nginx/conf.d"
      - "../nginx/etc/nginx/ssl:/etc/nginx/ssl"
  
    api:
      image: nabed_backend:dev
      hostname: api
      command: api
      extra_hosts:
      - "nabed.local:172.17.0.1"
      - "cms.nabed.local:172.17.0.1"
      deploy:
        mode: replicated
        replicas: 1
      env_file: .api.env
      networks:
        nabed: {}
  
    cms:
      image: nabedd/cms:master
      hostname: cms
      extra_hosts:
      - "nabed.local:172.17.0.1"
      - "api.nabed.local:172.17.0.1"
      deploy:
        mode: replicated
        replicas: 1
      env_file: .cms.env
      volumes:
      - "../admin-panel:/admin-panel"
      networks:
        nabed: {}
  
  networks:
    nabed:
      driver: overlay
  </code></pre>
  
  <p>inside API container:</p>
  
  <pre><code>$ curl cms.nabed.local
  curl: (7) Failed to connect to cms.nabed.local port 80: Connection timed out
  </code></pre>
  
  <p>inside CMS container:</p>
  
  <pre><code>$ curl api.nabed.local
  curl: (7) Failed to connect to api.nabed.local port 80: Connection timed out
  </code></pre>
  
  <p><strong>UPDATE #3:</strong></p>
  
  <p>I'm able to fix the issue by putting my hosts in my YAML file in <strong>extra_hosts</strong> options
  then turning my all networks to '<strong>trusted</strong>' mode
  then restarting <strong>docker</strong> and <strong>Networkmanager</strong></p>
  
  <p><strong>Note:</strong> for ppl who voted to close this question, please try help instead</p>