Hello,
Rebex TLS Proxy is prepared for such scenario, but we strongly discourage to use it in production environment. Bypassing certificate check lowers the security and in some cases removes purpose of the TLS at all.
To alter certificate validation use validationOptions
setting in the tunnel definition in the config.yaml
file. You can use these values:
IgnoreInvalidTime
- ignores time validity errors - useful for expired certificates.
SkipRevocationCheck
- does not perform certificate revocation check.
IgnoreCommonNameMismatch
- ignores wrong host name errors.
AcceptAll
- does not perform certificate check at all.
I will now describe, how settings 3 and 4 are dangerous:
IgnoreCommonNameMismatch
Let suppose an attacker has a valid domain with a valid and globally trusted certificate mydomain.com
.
You want to connect to mybank.com
, but the attacker redirects the traffic to their fraud site and provides certificate for mydomain.com
. The certificate is perfectly valid, except it was issued for different domain, so a web browser (and TLS Proxy) would abort the connection with appropriate error.
If you use IgnoreCommonNameMismatch
the critical host name error will be ignored and you will be provided with a fraud site without knowing.
AcceptAll
It is basically the same as example above, but in this case the attacker does not need a valid certificate at all. Any certificate would be enough to successfully redirect you to a fraud site without knowing.
Example of configuration:
tunnels:
- name: example
in: { address: 0.0.0.0, port: 8080 }
out: { address: httpbin.org, port: 443, protocol: TLS }
validationOptions: AcceptAll # do not use this in production!