Este tutorial leva em consideração um ambiente configurado pelos padrões da Intesys Consultoria em software livre.
Para a criação de novos certificados e chaves para autenticação no OpenVPN em sistemas baseados em RedHat, CentOS ou Fedora. Está sendo levado em consideração que ja foi criado algum certificado/chave para algum cliente inicialmente:
[root@gateway ~]# cd /etc/openvpn/easy-rsa
[root@gateway easy-rsa]# /etc/openvpn/easy-rsa
[root@gateway easy-rsa]# . ./vars
NOTE: when you run ./clean-all, I will be doing a rm -rf on /etc/openvpn/keys
[root@gateway easy-rsa]# ./build-key novousuario1
Generating a 1024 bit RSA private key
………………………………………….++++++
…………….++++++
writing new private key to ‘novousuario1.key’
—–
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter ‘.’, the field will be left blank.
—–
Country Name (2 letter code) [BR]:
State or Province Name (full name) [RS]:
Locality Name (eg, city) [PORTO ALEGRE]:
Organization Name (eg, company) [OpenVPN-exemplo]:
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server’s hostname) []:novousuario1
Email Address [abuse@exemplo.com.br]:
Please enter the following ‘extra’ attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
Using configuration from /etc/openvpn/easy-rsa/openssl.cnf
Check that the request matches the signature
Signature ok
The Subject’s Distinguished Name is as follows
countryName :PRINTABLE:’BR’
stateOrProvinceName :PRINTABLE:’RS’
localityName :PRINTABLE:’PORTO ALEGRE’
organizationName :PRINTABLE:’OpenVPN-exemplo’
commonName :PRINTABLE:’novousuario1′
emailAddress :IA5STRING:’abuse@exemplo.com.br’
Certificate is to be certified until Jun 18 06:43:33 2019 GMT (3650 days)
Sign the certificate? [y/n]:y
1 out of 1 certificate requests certified, commit? [y/n]y
Write out database with 1 new entries
Data Base Updated
[root@gateway easy-rsa]#
Neste ponto, basta copiar os arquivos novousuario1.crt e novousuario1.key localizados em /etc/openvpn/keys para a máquina client e configurar o cliente openvpn windows com os certificados/chaves recém criados.
Deixe seu comentário: