I have two Ubuntu servers with stunnel configured between them. Server A acts as a middleman server and forwards all inbound traffic to Server B (Openvpn server) through stunnel.
Stunnel configurations on server A and on server B are:
server A:
[openvpn_client]
accept = 0.0.0.0:443
connect = <serverB_ip>:993
cert = /etc/stunnel/cert1.pem
client = yes
server B:
client = no
[openvpn_server]
accept = :::993
connect = 127.0.0.1:1194
cert = /etc/stunnel/cert2.pem
Here my question is that should ssl certificates used cert1.pem
and cert2.pem
be identical? I tested the connection with both identical and different ssl certificates and it works fine in both cases.
What is the wise choice then? Should I use the same certificate on server A as the one on server B?
In case the firewall I am passing through can detect ssl fingerprints and block my connection will the difference between certificates become helpful?