How does TLS tunnel VPN work?
To understand how VPN tunnel works, you first need to understand TLS and TCP/IP, and also SSL.
To start off we need to take a look at some of the basics before moving on. Before you know it, you will be using VPN tunneling in your everyday life, and even be able to name your children!
What is TLS? The Transmission Layer Protocol, or often called Secure Sockets Layer (SSL) is used to encrypt data between the client and server. By using SSL it was made possible to use public IP address with a private IP address, and allow your IP address be identified by others on the internet even when you are transmitting private data.
How it Works? Encryption is the process where your data, including voice, audio, video, etc. Is converted into a form that cannot be decrypted without the corresponding secret key. The way SSL works is by having the client send an encrypted (random generated) number to the server. If a certain number is then matched on the server it will respond to the original client. The best part of TLS, is that it allows multiple encryption schemes so if one cipher does not work a fall-back system will be implemented. This means when you try to get access to restricted material or a website that is filtered you can still have access. In the event that the encryption scheme fails, the data will now go through a decryption procedure. TLS is actually part of RFC 5246 and there are 3 key stages to how the system works. The first stage is the 'handshake' where the client and server exchange common session information in plaintext. In this stage the cipher text used is derived from the session initialization vector (SIV), which is a combination of session cookies (randomly generated for the session), which only the server knows.
The second stage is the key handshake, where both the client and server use a Diffie-Hellman key exchange algorithm. In this stage the server sends the client a prime number p and it's own value q. On receiving this the client generates a random number g and it's own value and multiplies each together to make the shared secret key, ga.
How do I connect to TLS tunnel?
I need to connect to a third-party system which runs an https server.
The client needs a certificate for the server. I need to provide a PKCS#12 (.pfx) file containing the certificate.
When I try to connect to the server using the browser (using a TLS connection), the client gives an error saying: The certificate contains a public key which isn't in the common name format. Now I know that this is due to the name format of the certificate. So, what should the client be providing to connect to the server? TL;DR. The client needs the public key (a. The certificate) to establish a TLS connection, but only as the part of the distinguished name (DN) when connecting to a server. The certificate is always associated with the server's identity. The same applies to all other certificates.
Why do I need the public key in the certificate? I needed the public key to connect to the server. It was clear that the certificate contains the private key (since the certificate is signed by a private key). But why do I need the public key? How does the client get it?
When connecting to a server, the client must use a certificate chain. When connecting to a server, the client must only have the public key in the certificate which matches the server's public key. When connecting to a server, the client must not have a certificate chain. When connecting to a server, the client needs the public key (from a certificate) to establish a TLS connection, but only as the part of the distinguished name (DN). Let's explain the process of connecting to a server. When the client has no certificate at all, the client connects to the server. The client creates a TLS handshake, asking for a TLS server certificate. The client needs to have a certificate chain, since it is not sure if the server's certificate is trusted. The client sends its certificate (or certificate chain) to the server. The client receives the server's certificate, and the certificate chain. The client verifies the certificate. If the certificate has a signature, the client verifies the signature. If the certificate has a trusted certificate chain, the client verifies the certificate chain.
Related Answers
What is TLS?
TLS is the standard protocol for securing network communication. I...
How does SSL TLS work step by step?
If we take the most used example in a browser (TLS1.2) it goes like thi...
Which is more secure SSL TLS or HTTPS?
and SSL? I know the difference between TCP/IP vs. IP, or S...