Generating a Unique DH (Diffie-Hellman) Group

Due to a recent D(iffie)H(ellman) attack possibility called LogJam on lower paramter lengths like 512 bit and maybe, in short future, 768 bit, here the command to create a real strong parameter of 4096 bit:

openssl dhparam -out dhparams.pem 4096

 

Please be aware that this key creation can take up to 20 minutes and evern longer depending on your CPU.

Most software (apache, postfix, sendmail, dovecot etc) have config parameters where you can set the Diffie-Hellman group file. The DH algorithm is used to create secure keys when using connections over SSL/TLS.

More information about configuring different servers can be found here.