I have a common setup of two OpenVPN clients (A and B) that are both connected to the server S. According to this question, each client has an encrypted channel with the server, but the server strips down the encryption in order to route the traffic to another client. For my understanding, if the server gets compromised, an attacker can see an unencrypted traffic between A and B from within S. Am I right? If yes, how can I force some kind of end-to-end encryption between A and B, so it will be safe to use telnet(for instance) in this case?
-
Is it more probable that the OpenVPN server gets compromised than that the clients get compromised?– Hauke LagingApr 8, 2018 at 14:10
-
Yes, given the fact that OpenVPN server may reside in some kind of virtual environment at 3rd party hosting. It may be vulnerable to Meltdown/Spectre attacks from malicious entities running on the same hardware, or just over-curious administrators...– disposimiApr 10, 2018 at 7:32
3 Answers
It's in principle possible to use OpenVPN in onion-like layers.
Let's assume that you are forced to keep layer 1 (L1) unchanged:
- S stays the L1 open VPN server
- A and B stay L1 clients of L1 server S
Below L1, we add L2 as follows:
- A acts as the L2 open VPN server
- B acts as a L2 open VPN client of L2 server A
With this setup, assuming that A and B tunnel all the sensitive information trough L2, a compromised S L1 server cannot eavesdrop the L2 traffic.
-
Do you suggest to run one tunnel within another? Why should the clients not talk to each other directly over a separate tunnel? Apr 8, 2018 at 19:28
-
That is what I am trying to achieve. I hope there is a possibility that OpenVPN software will provide some kind of end-to-end security without layering additional tunnels Apr 10, 2018 at 7:37
Yes, if server is compromised traffic is at risk. What you ask for is to have a secure channel between hosts instead of routers, which means you have to setup tunne; on them (one as server, other as client) and set port forwarding if the one that is server is behind some NAT.
The simple answer is: If you want to pretend any compromised in-the-middle system to read cleartext traffic then there must not be any in-the-middle system. You need (non-routing) point-to-point VPN tunnels between every pair of systems which you want to be able to communicate this way. Of course, you must use either certificates or different pre-shared secrets for each tunnel.
-
Why is that? I can still use a possibly-compromised system as a router, and communicate via secure channel (SSH) with some kind of key-exchange algorithms (Diffie-Hellmann). Apr 10, 2018 at 7:28
-
@disposimi But if you use SSH (correctly) then there is no cleartext system in the middle. SSH is point-to-point. The systems which are passed with encrypted data do not matter; we do not care about all the routers and switches on the Internet. Apr 10, 2018 at 8:42