How many types of VPN is out there and in which layer of the OSI model are they working?
Off the top of my head, the most common would be:
- IPSEC (Internet Protocol SECurity)
- SSL (Secure Sockets Layer)
- PPTP (Point-to-Point Tunnelling Protocol)
- L2TPv3 (Layer 2 Tunnelling Protocol)
As for which layers they are each working at, it really comes down to what you mean by "working".
L2TPv3, PPTP and IPSEC all establish and operate over the top of IP connections (Network Layer). PPTP uses TCP and GRE, while L2TP and IPSEC Aggressive-mode rely on UDP (all Transport Layer protocols).
SSL VPN (which isn't really standardised) relies on HTTPS/TLS depending on the implementation, so you could say it operates at the Application Layer.
Having said all this, once the tunnels have been established, they act more like Network layer interfaces, with PPTP allowing certain non-IP protocols to be tunnelled and L2TPv3 which behaves more like a Data-Link Layer interface, allowing pretty much any L2 frame to be encapsulated.
There are several types of VPNs, depending on how you count. Two of the most common are IPSec and SSL VPNs.
VPNs do not fit very well into the OSI model -- they were developed after the model was created. Also, as has been stated many times on this forum, the OSI model is just an idealized model of how things "ought to work." It's not an accurate representation of how things actually work.