Getting ssl certificate of router instead of server
TL;DR: I'm getting sporadically the router ssl cert, when requesting a service hosted behind the router. And I'm asking how it's possible, and why it can happen.
I have a service (seafile), behind an apache reverse proxy in a server.
The client resides within the local network, and presumably connects to https://seafile.mydomain.tld. This is the third time a client shows an ssl error message, complaining about the cert not being of trust "The computer name did not match any of the valid computers for this certificate". First time 2 internal clients complained at the same time, this time only complained one.
I checked, and is the certificate of my router. It happens during a time frame very short. I immediately restart the client, or check the cert on the browser and is the server one.
Right now, I'm questioning all my knowledge of networks. How it's possible to get the router cert instead of the server?
I took a look on the scarce log of the router. And nothing is strange.
I thought of conflicts with forwarding rules, but there is only rules for this server on 80 and 443 ports, dmz disabled, and all services provided by the router are disabled, except for internal web interface.
My instincts tell me that is the router miss-translating. But I don't know what to search for.
Posted Dec 16, 2020, 3:55 AM UTC
Is your router a combination box with your modem? Sometimes ISPs will force people through a portal this way to accept the ToS.
Can you share the hostnames the cert is claiming?
It's a router-modem, but it's not the ISP router, and only acts as router. It's in bridge mode to the ISP router. It's a tplink Archer C5 V4.
Basically tplinkwifi.net and my_public_ip
This is very strange, I've seen this happen with AV tools that want to do cert substitution attacks to scan TLS connections but including that on a router seems unheard of and dangerous.
I would lean more towards the router is behaving improperly through some sort of bug. Do you see any options in the menu for something like ssl offload / broker / proxy that you can disable?
Nothing about ssl offload, broker or proxy.