# Bad certificate

**URL:** https://community.traefik.io/t/bad-certificate/9024
**Category:** Traefik v2
**Tags:** docker, letsencrypt-acme
**Created:** [December 16, 2020, 1:32pm UTC](https://community.traefik.io/t/bad-certificate/9024 "2020-12-16T13:32:34Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Djeremaille](https://avatars.discourse-cdn.com/v4/letter/d/90db22/32.png) [@Djeremaille](https://community.traefik.io/u/Djeremaille)
#### Post date: [December 16, 2020, 1:32pm UTC](https://community.traefik.io/t/bad-certificate/9024/1 "2020-12-16T13:32:34Z")

</div>

Hi,  
Since today I can't connect to my web sites.  
Docker 20.10.0  
Traefik 2.2.

Web pages were just black. I then realized that my public IP had changed so I updated my domain name.  
I renewed the letsencrypt certificate by deleting letsencrypt/acme.json and restarting traefik.  
Now when I connect, the site is giving a certificate from my ISP.  
I tried a lot of things but nothing works.  
I'm a noob in traefik and configuring it was a pain but it was working good.  
Here are my configs:  
docker-compose.yml

```auto
version: "3.3"

networks:
  traefik:
    external: true

services:

  traefik:
    image: "traefik:v2.2"
    container_name: "traefik"
    command:
      - "--api.insecure=true"
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=false"
      - "--providers.docker.watch=true"
      - "--providers.file=true" 
      - "--providers.file.filename=/etc/traefik/rules.toml"
      - "--providers.file.watch=true"
      - "--entryPoints.web.address=:80"
      - "--entryPoints.websecure.address=:443"
      - "--entryPoints.web.http.redirections.entryPoint.to=websecure"
      - "--entryPoints.web.http.redirections.entryPoint.scheme=https"
      - "--certificatesresolvers.myresolver.acme.dnschallenge=true"
      - "--certificatesresolvers.myresolver.acme.dnschallenge.provider=ovh"
      - "--certificatesresolvers.myresolver.acme.dnschallenge.delayBeforeCheck=10"
      - "--certificatesresolvers.myresolver.acme.email=exampl@gmail.com"
      - "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
    ports:
      - "80:80"
      - "443:443"
      - "8080:8080"
    environment:
      - "TZ=Europe/Paris"
      - "OVH_ENDPOINT=ovh-eu"
      - "OVH_APPLICATION_KEY=################"
      - "OVH_APPLICATION_SECRET=######################"
      - "OVH_CONSUMER_KEY=#########################""
    volumes:
      - "/media/2TO/AppData/traefik/conf/cert:/cert"
      - "/media/2TO/AppData/traefik/conf/letsencrypt:/letsencrypt"
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
      - "/media/2TO/AppData/traefik/conf/rules.toml:/etc/traefik/rules.toml" 
   
    labels:
      - traefik.enable=false

    networks:
      - traefik

    restart: always

```

traefik.yml:

```auto
api:
  dashboard: true

entryPoints:
  web:
    address: ":80"
  websecure:
    address: ":443"

providers:
  docker:
     endpoint: "unix:///var/run/docker.sock"
# endpoint: "tcp://127.0.0.1:2375"
     watch: true    
     exposedByDefault: false

certificatesResolvers:
  http:
    acme:
      email: example@gmail.com
      storage: acme.json
      httpChallenge:
        entryPoint: web

```

And here is my airsonic docker-compose.yml:

```auto
version: "2"
services:
  airsonic:
    image: linuxserver/airsonic
    container_name: airsonic
    environment:
      - PUID=1000
      - PGID=100
      - TZ=Europe/Paris
      - JAVA_OPTS=-Dserver.use-forward-headers=true      
    volumes:
      - /media/2TO/AppData/airsonic:/config
      - /media/nfsnas/Partage/Medias/Musique_320:/music
      - /media/2TO/MEDIA/MUSIQUE/Playlists:/playlists
      - /media/2TO/MEDIA/MUSIQUE/Podcasts:/podcasts
    ports:
      - 4040:4040
    labels:
      - "traefik.enable=true"
      - "traefik.docker.network=traefik"
      - "traefik.http.routers.airsonic.entrypoints=web"
      - "traefik.http.routers.airsonic.rule=Host(`music.example.com`)"
      - "traefik.http.middlewares.https-redirect.redirectscheme.scheme=https"
      - "traefik.http.routers.airsonic.middlewares=https-redirect"

      - "traefik.http.routers.airsonic-secure.entrypoints=websecure"
      - "traefik.http.routers.airsonic-secure.rule=Host(`music.example.com`)"
      - "traefik.http.routers.airsonic-secure.tls=true"
      - "traefik.http.routers.airsonic-secure.tls.certresolver=myresolver"
      
      - "traefik.http.middlewares.airsonic_auth.basicauth.users=#############################################"."
      - "traefik.http.routers.airsonic-secure.middlewares=airsonic_auth@docker"
      - "traefik.http.routers.airsonic-secure.service=airsonic"
      - "traefik.http.services.airsonic.loadbalancer.server.port=4040"

    networks:
      - traefik
      - default
    restart: always

networks:
  traefik: # this is the network provided by traefik
    external:
      name: traefik
  default: # your database should be in this network

```

---

<div class="post-metadata">

### Author: ![cakiwi](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/cakiwi/32/3205_2.png) [@cakiwi](https://community.traefik.io/u/cakiwi)
#### Post date: [December 16, 2020, 1:45pm UTC](https://community.traefik.io/t/bad-certificate/9024/2 "2020-12-16T13:45:32Z")

</div>

> [@Djeremaille](#):
>
> Now when I connect, the site is giving a certificate from my ISP.

If your public ip is directing to somewhere other than your router/pc then you need to talk to your ISP.

---

<div class="post-metadata">

### Author: ![Djeremaille](https://avatars.discourse-cdn.com/v4/letter/d/90db22/32.png) [@Djeremaille](https://community.traefik.io/u/Djeremaille)
#### Post date: [December 16, 2020, 5:02pm UTC](https://community.traefik.io/t/bad-certificate/9024/3 "2020-12-16T17:02:55Z")

</div>

Also I have this in the traefik logs:

```auto
time="2020-12-16T18:01:01+01:00" level=error msg="close tcp [::]:443: use of closed network connection" entryPointName=websecure

time="2020-12-16T18:01:01+01:00" level=error msg="accept tcp [::]:443: use of closed network connection" entryPointName=websecure

time="2020-12-16T18:01:01+01:00" level=error msg="accept tcp [::]:80: use of closed network connection" entryPointName=web

time="2020-12-16T18:01:01+01:00" level=error msg="close tcp [::]:80: use of closed network connection" entryPointName=web

time="2020-12-16T18:01:01+01:00" level=error msg="accept tcp [::]:8080: use of closed network connection" entryPointName=traefik

time="2020-12-16T18:01:01+01:00" level=error msg="close tcp [::]:8080: use of closed network connection" entryPointName=traefik

time="2020-12-16T18:01:05+01:00" level=info msg="Configuration loaded from flags."

```

---

<div class="post-metadata">

### Author: ![Djeremaille](https://avatars.discourse-cdn.com/v4/letter/d/90db22/32.png) [@Djeremaille](https://community.traefik.io/u/Djeremaille)
#### Post date: [December 17, 2020, 3:41pm UTC](https://community.traefik.io/t/bad-certificate/9024/4 "2020-12-17T15:41:15Z")

</div>

My public IP is ok. The cert is from my router.  
Also if I check with: [https://www.sslshopper.com/ssl-checker.html](https://www.sslshopper.com/ssl-checker.html) , they say that's ok, they see letsencrypt cert..  
Of course I tried with different browsers, cleaning cache etc...

---

<div class="post-metadata">

### Author: ![cakiwi](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/cakiwi/32/3205_2.png) [@cakiwi](https://community.traefik.io/u/cakiwi)
#### Post date: [December 17, 2020, 6:55pm UTC](https://community.traefik.io/t/bad-certificate/9024/5 "2020-12-17T18:55:34Z")

</div>

Are you trying the domain name from behind your router that the domain name points to?

---

<div class="post-metadata">

### Author: ![Djeremaille](https://avatars.discourse-cdn.com/v4/letter/d/90db22/32.png) [@Djeremaille](https://community.traefik.io/u/Djeremaille)
#### Post date: [December 18, 2020, 8:23am UTC](https://community.traefik.io/t/bad-certificate/9024/6 "2020-12-18T08:23:53Z")

</div>

Solved. (Sort of)  
The problem is definitely from an update of my router:

> **[Suite au changement de firmware (2.5.10) cette nuit, la fonction loopback ne...](https://communaute.orange.fr/t5/Livebox-5/Suite-au-changement-de-firmware-2-5-10-cette-nuit-la-fonction/m-p/2390162/highlight/true#M9734)**
>
> Le loopback permettait avec un smartphone ou un portable d'accéder à un équipement sur le LAN de la livebox 5 avec l'adresse IP externe (avec un DynDNS et une configuration NAT) en étant connecté directement en WiFi  sur la box sans changer le...

Sorry.  
Thanks a lot!
