Hello,
i've set up traefik with docker and portainer on an ubuntu host and i'm facing a rather uncommon connectivity problem.
When i try to access traefik, portainer or other containers on the host using my laptop running Ubuntu or my android smartphone i get a connection timeout (ERR_TIMED_OUT).
When i switch to my macbook and try to access the same services with the same browser (Brave) it works flawless.
I tried to dig a little deeper to find out if the request are actually arriving at the server and everything comes in, regardless of wich client i use.
Then i tried to access the services using the command line on my linux laptop what apparently worked perfectly. Being surprised of the result i then tried it again with my browser and it worked there to. But it only works for a couple of minutes or until i restart the traefik container. It seems like the request using wget in the linux terminal created some kind of "punch-the-hole" effect.
I can't find any clues in the traefik logs, since the failed request are not shown here.
I hope anybody has expereienced and solved this.
traefik.toml
defaultEntryPoints = ["http", "https"]
[global]
checkNewVersion = true
sendAnonymousUsage = false
[log]
level = "DEBUG"
[accessLog]
[entryPoints]
[entryPoints.web]
address = ":80"
[entryPoints.web.http.redirections.entryPoint]
to = "websecure"
scheme = "https"
[entryPoints.websecure]
address = ":443"
[entryPoints.websecure.http.tls]
certResolver = "lets-encrypt"
[api]
dashboard = true
[certificatesResolvers.lets-encrypt.acme]
email = "my@domain.com"
storage = "acme.json"
[certificatesResolvers.lets-encrypt.acme.httpChallenge]
entryPoint = "web"
[serversTransport]
insecureSkipVerify = true
[providers.docker]
watch = true
network = "proxy"
exposedByDefault = false
[providers.file]
filename = "traefik_dynamic.toml"
traefik_dynamic.toml
[http.middlewares.simpleAuth.basicAuth]
users = [
"basicauthdadada"
]
[http.routers.api]
rule = "Host(`my.domain.com`)"
entrypoints = ["websecure"]
middlewares = ["simpleAuth"]
service = "api@internal"
[http.routers.api.tls]
certResolver = "lets-encrypt"
docker-compose.yml
services:
traefik:
image: traefik:v3
container_name: traefik
restart: unless-stopped
ports:
- target: 80
published: 80
protocol: tcp
mode: host
- target: 443
published: 443
protocol: tcp
mode: host
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik.toml:/traefik.toml
- ./traefik_dynamic.toml:/traefik_dynamic.toml
- ./acme.json:/acme.json
networks:
- proxy
networks:
proxy:
external: true