IPSec VPN accepts any peer certificate when specific certificate given
Hi All,
Setting up IPSec VPN (IKEv2) between two 5.4.1 FortiGates. Works fine with PSK (after working around GUI bug that saves wrong IP if you use named addresses for the VPN).
When I changed over to using certificates I found the tunnels went up just fine, but the peer certificate wasn't getting verified as I would have expected. Meaning, I could (and did) list a non-existent peer certificate name of GARBAGE_T with or without cn and subject set, and the tunnel would still go up with no complaints. Not exactly secure.
Both devices have their peer certificates signed by my local CA root vpn ca certificate.
Both devices have imported the root vpn ca cert.
Both devices have the private version of their own cert (signed by the root vpn ca cert).
Both devices have the public version of the other devices cert (signed by the root vpn ca cert).
The phase1 settings on both sides specify that they authenticate with a signature and list their own certificate by name.
The phase1 settings on both sides specify IKEv2 and that they accept only a peer certificate, with the peer certificate name referring (I believe) not to the certificate, but to the name of the peer that refers to the cert (config user peer). As mentioned above, I can change the user peer here to be a dummy peer referring to a non-existent certificate and the tunnel still goes up. Scary.
Any ideas on what's going on here? I'm really hoping this is some simple mistake on my part.
