To enable certificate authentication for IPSec, server certificates and corresponding CA-signed certificates must be imported. Optionally, you can use an open-source command-line tool such as OpenSSL to generate CA-signed certificates.
Prerequisites
OpenSSL must be installed.
Procedure
- On a Linux or Mac machine where OpenSSL is installed, open the file: /opt/local/etc/openssl/openssl.cnf or /System/Library/OpenSSL/openssl.cnf.
- Ensure that dir = ..
- Run the following commands:
mkdir newcerts
mkdir certs
mkdir req
mkdir private
echo "01" > serial
touch index.txt
- Run the command to generate a CA-signed certificate:
openssl req -new -x509 -newkey rsa:2048 -keyout private/cakey.pem -out cacert.pem -days 3650
- On NSX Edge1, do these steps:
- Generate a certificate signing request (CSR).
- Copy the privacy-enhanced mail (PEM) file content, and save it in a file in req/edge1.req.
- Run the following command to sign the CSR:
sudo openssl ca -policy policy_anything -out certs/edge1.pem -in req/edge1.req
- On NSX Edge2, generate a CSR, copy the PEM file content, and save it in a file in req/edge2.req.
- Run the following command to sign the CSR:
sudo openssl ca -policy policy_anything -out certs/edge2.pem -in req/edge2.req
- Upload the PEM certificate at the end of the file certs/edge1.pem to Edge1.
- Upload the PEM certificate at the end of the file certs/edge2.pem to Edge2.
- Import the signed certificate (cacert.pem) to Edge1 and Edge2 as CA-signed certificates.
- In the IPSec global configuration for Edge1 and Edge2, select the uploaded PEM certificate and the CA certificate and save the configuration.
- Navigate to . Select the signed certificate that you imported and record the DN string.
- Reverse the DN string to the format C=IN,ST=ka,L=blr,O=bmware,OU=vmware,CN=edge2.eng.vmware.com and save it for Edge1 and Edge2.
- Create IPSec VPN sites on Edge1 and Edge2 with Local ID and Peer ID as the distinguished name (DN) string in the specified format.
Results
Check the status by clicking Show Statistics or Show IPSec Statistics. Click the channel to see the tunnel status. The channel status should be enabled and the tunnel status should be Up.