Traefik with podman does not route from lan, but only from localhost

I am finally trying to adopt traefik at home and at same time switching to podman.

But I have some issue getting started with a minimal setup.

I have setup podman and also configured the ports to start from port 80 to be unpriviledged.

I can access traefiks api and it recognizes the container, creates routers etc. it also routes if I have a router for whoami.localhost on the local machine. But if I have the next to identical service with my FQDN traefik doesn’t route the request, the adress can’t be resolved.

But I can reach the api from other clients in my network via server.domain.org:8080. But if I try to go to whoami.server.domain.org it doesn’t work.

I don’t know whether I have to dig more into podman, the debian server, traefik or even my unbound dns server.

Here is the minimal traefik config:

podman run -d \
  --name=traefik \
  --network=web \
  --security-opt label=type:container_runtime_t \
  -v /run/user/1003/podman/podman.sock:/var/run/docker.sock:z \
  -v ./acme.json:/acme.json:z \
  -p 80:80 \
  -p 443:443 \
  -p 8080:8080 \
  docker.io/library/traefik:latest \
  --api.dashboard=true \
  --api.insecure=true \
  --entrypoints.web.address=":80" \
  --entrypoints.websecure.address=":443" \
  --providers.docker=true

And here are the two services I tried to get a minimal working solution:

podman run -d \
        --name whoami \
        --network=web \
        -l traefik.enable="true" \
        -l traefik.http.routers.whoami.rule=Host'(`whoami.localhost`)' \
        -l traefik.http.routers.whoami.entrypoints="web" \
        docker.io/traefik/whoami
podman run -d \
        --name whoami2 \
        --network=web \
        -l traefik.enable="true" \
        -l traefik.http.routers.whoami2.rule=Host'(`whoami.server.domain.org`)' \
        -l traefik.http.routers.whoami2.entrypoints="web" \
        docker.io/traefik/whoami

Okay, I had some dinner break and searched for subdomains and traefik and found out I apparently have to make some configuration in my dns.
After I added a wildcard rule in unbound for host ‘*’ and server ‘server.domain.org’ it seems now to work.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.