We are going to have some kind of secure VoIP implementation. We have come into make decision between VPN-based methods like PPTP or L2TP/IPsec and TLS-based methods. The question is which one is better; more secure and more efficient for VoIP applications? If we had both in work, could we obtain more security (confidentiality, authenticity, and integrity)? Thank you very much in advance.
Which one is more secure and efficient for VoIP: PPTP, L2TP, or TLS...
Here is some general information related to the question... VoIP can use dynamic compression codes and codecs, so they can be insecure regardless of the underlying encryption technology. See, for example, Spot me if you can: Uncovering spoken phrases in encrypted VoIP conversations.
Also, the NSA produces a phone for the US government using commodity hardware. The phones use two layers of encryption. The first is a traditional IPSec VPN. The second is a encrypted VoIP using stream SRTP tunneled through the VPN. So you have both network layer and application layer security. See, for example, Fishbowl (secure phone).
Also, the question is kind of vague (but in non-obvious ways)... We don't know what your security model is, and we don't know what your threat model is, so its hard to say which will (or will not) meet your goals and objectives. Apparently, NSA's threat model includes a cryptanalysis that VPN alone cannot contain :)
Regarding architecture, considering the options in each of the two dimensions separately:
Secured tunnel vs secure connection:
- In a VoIP scenario, usually there are many connections involved. VoIP clients register with a VoIP server, but for the actual call, the clients directly connect.
- Establishing a secured connection involves a huge overhead as compared to establishing insecure connections, which a secure tunnel avoids.
- Conceptually, some attacks are possible only during the connection phase, so a tunnel reduces the number of points in time where such attacks can take place.
- Regarding setup and maintenance, I prefer a VPN connection. E.g. no unnecessary server exposure and easier filter rules for acceptance of connections (only local IP addresses). Also, you'll primarily have to monitor security advisories for the tunnel alone, rather than having to monitor them for all exposed services.
- Regarding security, a secured tunnel will keep an observer from seeing how your two LANs interact, so he'll gain much fewer information and have fewer points to attack.
Two-layer tunnel with secure higher layer vs secure lower layer:
- Although there are conceptual differences regarding possible attacks, the degree of security is comparable.
- In practice, securing the tunnel allows for higher flexibility (see below).
Regarding the specific solutions you mention:
- PPTP is flawed and insecure and does not provide any reasonable amount of security.
- L2TP/IPsec is an approach with an (in itself) insecure tunnel over a secured connection.
- Security is very high and no leaks are known, although it has been indicated that intelligence agencies have tried to introduce vulnerabilities.
- A fixed port and protocol is required, and any usage of IPv6 cannot be hidden in the tunnel but is obvious to the outside. This means that all infrastructure between the VPN endpoints must support this particular setup.
- OpenVPN is an approach with a secured tunnel over an (in itself) insecure connection.
- With TLS, security is very high and no security leaks are known.
- The tunnel can use any IP infrastructure, including the port of your choice and hiding internal details of the tunnel, such that you can route IPv6 packets through the tunnel even though the infrastructure between the VPN endpoints supports only IPv4.
- IPsec offers a tunnel mode where the encrypted data packets are wrapped into new data packets. This mode differs from L2TP/IPsec in the authentication methods which it provides. Whenever you need a kind of logon, this mode cannot be used easily.
- Go for a tunnel approach due to higher overall security (likelihood) and fewer headaches.
- Given that security is comparable, I'd favour OpenVPN due to its higher flexibility. But study the details of the security aspects of both approaches; if users can set up OpenVPN connections it may become much less secure.
- If performance is more important than flexibility, some have claimed OpenVPN is faster but honestly I'd do my own test under given circumstances, because if there are performance differences worth mentioning, then I'd not expect them to be based on the software alone (just a gut feeling).