Hello all, I'm new to Traefik. I am having problems getting routing to work, but in my testing I noticed that traefik is allowing HTTP traffic over its "websecure" port, 443. This seems like a major vulnerability, so I assume I must have messed something up.
docker-compose.yml
lb-public:
image: traefik:latest
command:
- "--log.level=DEBUG"
- "--accesslog=true"
# Disable the following for "production"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--certificatesresolvers.myresolver.acme.httpchallenge=true"
- "--certificatesresolvers.myresolver.acme.httpchallenge.entrypoint=web"
# For testing you can use acme-staging as it doesn't rate limit you
#- "--certificatesresolvers.myresolver.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory"
- "--certificatesresolvers.myresolver.acme.email=myemail@hotmail.com"
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
ports:
- "0.0.0.0:80:80"
- "0.0.0.0:443:443"
- "0.0.0.0:8080:8080"
volumes:
- "./docker/traefik/letsencrypt:/letsencrypt"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
networks:
backend:
metadata:
whoami:
image: "traefik/whoami"
networks:
backend:
labels:
# Traefix v2
- "traefik.enable=true"
- "traefik.http.routers.whoami-http.entrypoints=web"
- "traefik.http.routers.whoami-http.rule=Host(`${PUBLIC_DOMAIN}`) && PathPrefix(`/whoami`)"
If you docker compose these services up, you can then cURL to port 443 and get HTTP (clear text) output. I would expect traefik to force the client to negotiate TLS -- is this correct port 443 behavior?
clutzer@laptop % curl http://public-domain.com:443/
404 page not found
I used Wireshark to verify that HTTP is being sent unencrypted over port 443.