I managed to connect via secure port with self-signed certificates to my web-server via SSH tunnel.
In the client computer I do ssh <user>@<ip> -NL 9999:localhost:10443
so I check the server port 10443 in https://locahost:9999. I can see the webpage in the client side but when I type the username and password on the login page, nothing happens. the POST request fails. What am I missing? Here is my code.
static file
[log]
level = "INFO"
filePath = "/var/log/traefik/traefik.log"
[providers]
providersThrottleDuration = "2s"
[providers.file]
directory = "/opt/traefik/routes"
watch = true
[api]
insecure = true
dashboard = true
[entryPoints]
[entryPoints.web]
address = ":10080"
[entryPoints.dashboard]
address = ":8081"
[entryPoints.websecure]
address = ":10443"
[serversTransport]
insecureSkipVerify = true
dynamic file (my certificate CN=localhost)
[[tls.certificates]]
certFile = "/opt/traefik/SSL/mycert.crt"
keyFile = "/opt/traefik/SSL/mycert.key"
[tls.options]
[tls.options.default]
minVersion = "VersionTLS12"
cipherSuites = [
"TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
"TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305",
"TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305"
]
[http.routers]
[http.routers.dashboard]
service = "api@internal"
[http.routers.name]
entryPoints = ["websecure"]
rule = "Host(`localhost`)"
service = "name"
[http.routers.name.tls]
[http.services]
[[http.services.name.loadBalancer.servers]]
url = "http://192.168.128.141:8888"