Create CA-/self-signed certificates with OpenSSL

Hey, here are a few steps to create your own CA-signed certificates with your own CA:

Create your CA:

Generate the key:

openssl genrsa -out CA.key 2048
openssl genrsa -out CA.key 2048 -des3 (with password protection)

​Please note that if someone gets this key and it’s not password protected he can generate valid certificates in your name, which is really really bad, so keep it secret!

Generate your CA certificate:

openssl req -new -x509 -extensions v3_ca -key CA.key -days 10000 -out CA.crt

​This creates a valid CA certificate wich is valid for 10000 days. Why so long? Because when this CA expires you have to revoke and regenerate all the certificates based on this one which could be timeconsuming, but feel free to set a lower number. In order to recognize your self-signed certificates this CA must be installed on your computer which calls the website or alike. which varies between operating systems and programs.

Generate the server certificate signing request (CSR):

openssl req -new -newkey rsa:2048 -key server.key -out server.csr -addext "subjectAltName=DNS:www.domain.com,DNS:alt.dom.com,IP=1.2.3.4"​

Please note that you need to specify the normal domain too (domain.com) in this file and as CommonName when generating the CSR.

Sign your certificate with a CA:

openssl x509 -req -in server.csr -CA CA.crt -CAkey CA.key -out server.crt -days 365 -copy_extensions copy

Quick generate a self-signed certificate:

In case you want the to do quickly a certificate including multiple names and IP addresses, you can do it also in one line:

openssl req -new -newkey rsa:2048 -days 365 -nodes -keyout server.key -out server.crt -addext "subjectAltName=DNS:name1,DNS:name2.dom.tld,IP:192.168.182.14"

​All you have to do now is copy the server.key and server.crt onto your machine and configure your application to use this certificates.

Here are some useful sites if found about SSL:
http://www.chainsawonatireswing.com
http://phaseshiftllc.com
http://blog.didierstevens.com
http://shib.kuleuven.be

Change network driver for ESX(i) guest OS to VMXNET

Hello,

On the VMWare ESXi server you can specifiy your network card driver when adding a network device to your virtual machine, but once installed you cannot change it through the GUI. So here are a few steps to make the change simple:

  1. Login to ESXi server through your terminal
  2. Go to your VM folder
  3. Connect to your VM and shut it down.
  4. Open your VM .vmx file with vi
  5. Look for the line ethernetX.virtualDev (X: interface number)
  6. Change this value to vmxnet or vmxnet3
  7. ​Save file and restart your virtual machine

Remark:
Usually you need to install the vm with another driver because vmxnet is not installed on an operating system per default. Before you can use the driver you must install VMWare Tools. It is important that you shut down the VM otherwise your modified .vmx file will be overwritten.