[FUG-BR] Openvpn - problemas com build-ca

Marcelo Gondim gondim em bsdinfo.com.br
Sexta Março 16 15:05:32 BRT 2012


Em 16/03/2012 14:41, Marcelo Gondim escreveu:
> Em 16/03/2012 14:09, Christiano Liberato escreveu:
>> Ricardo,
>>
>> ja tinha conferido isso. As variáveis estao sendo carregadas inclusive os
>> dados inseridos no vars.
>> Ja fiz de tudo e o pior que no google nao tem nada. Aliás tem várias
>> pessoas reportando o mesmo problema.
>> Isso acontece utilizando o easy-rsa\2.0.
>> Utilizando o easy-rsa\1.0 o processo avança.
>> Alguem poderia dizer qual diferença do 1.0 para 2.0?
> Eu rodei o 2.0 sem problemas mas fiz embaixo do bash.

Vamos lá acabei de instalar aqui e fiz os seguintes procedimentos 
embaixo do bash:

Em easy-rsa/2.0:

# . ./vars
# chmod +x build-ca build-dh build-inter build-key build-key-pass 
build-key-pkcs12 build-key-server build-req build-req-pass pkitool 
clean-all inherit-inter list-crl revoke-full sign-req whichopensslcnf
# ./clean-all
# ./build-ca
Generating a 1024 bit RSA private key
....................++++++
....................++++++
writing new private key to 'ca.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) [US]:BR
State or Province Name (full name) [CA]:RJ
Locality Name (eg, city) [SanFrancisco]:Araruama
Organization Name (eg, company) [Fort-Funston]:Intnet
Organizational Unit Name (eg, section) [changeme]:TI
Common Name (eg, your name or your server's hostname) [changeme]:bart
Name [changeme]:bart
Email Address [mail em host.domain]:suporte em gmail.com

O resto é a mesma coisa.  :)

>
>> Em 16 de março de 2012 08:53, Ricardo Ferreira<
>> ricardo.ferreira em sotechdatacenter.com.br>   escreveu:
>>
>>> On 15-03-2012 23:26, Christiano Liberato wrote:
>>>
>>>> Caros,
>>>>
>>>> gostaria de ajuda pois estou com problemas no openvpn na geração da CA.
>>>> Dentro do shell SH fiz:
>>>> root em fw /usr/local/etc/openvpn/easy-**rsa/2.0 # . ./vars
>>>> NOTE: If you run ./clean-all, I will be doing a rm -rf on
>>>> /usr/local/etc/openvpn/easy-**rsa/2.0/keys
>>>> root em fw /usr/local/etc/openvpn/easy-**rsa/2.0 # ./clean-all
>>>> root em fw /usr/local/etc/openvpn/easy-**rsa/2.0 # ./build-ca
>>>>     Please edit the vars script to reflect your configuration,
>>>>     then source it with "source ./vars".
>>>>     Next, to start with a fresh PKI configuration and to delete any
>>>>     previous certificates and keys, run "./clean-all".
>>>>     Finally, you can run this tool (pkitool) to build certificates/keys.
>>>>
>>>> Sinceramente nao sei como retirar essa mensagem e dar prosseguimento na
>>>> configuração. Já fiz várias buscas e nao encontrei solução.
>>>> Gostaria que alguem desse uma força.
>>>>
>>>> Seguem os arquivos.
>>>>
>>>> cat /usr/local/etc/openvpn/easy-**rsa/2.0/vars
>>>>
>>>> export EASY_RSA="`pwd`"
>>>> export OPENSSL="openssl"
>>>> export PKCS11TOOL="pkcs11-tool"
>>>> export GREP="grep"
>>>> export KEY_DIR="$EASY_RSA/keys"
>>>> echo NOTE: If you run ./clean-all, I will be doing a rm -rf on $KEY_DIR
>>>> export PKCS11_MODULE_PATH="dummy"
>>>> export PKCS11_PIN="dummy"
>>>> export KEY_SIZE=1024
>>>> export CA_EXPIRE=3650
>>>> export KEY_EXPIRE=3650
>>>> export KEY_COUNTRY=BR
>>>> export KEY_PROVINCE=DF
>>>> export KEY_CITY=Brasilia
>>>> export KEY_ORG="EMPRESA"
>>>> export KEY_EMAIL="email em dominio.com.**br<email em dominio.com.br>"
>>>>
>>>> cat /usr/local/etc/openvpn/easy-**rsa/2.0/clean-all
>>>>
>>>> if [ "$KEY_DIR" ]; then
>>>>       rm -rf "$KEY_DIR"
>>>>       mkdir "$KEY_DIR"&&    \
>>>>           chmod go-rwx "$KEY_DIR"&&    \
>>>>           touch "$KEY_DIR/index.txt"&&    \
>>>>           echo 01>"$KEY_DIR/serial"
>>>> else
>>>>       echo 'Please source the vars script first (i.e. "source ./vars")'
>>>>       echo 'Make sure you have edited it to reflect your configuration.'
>>>> fi
>>>>
>>>> cat /usr/local/etc/openvpn/easy-**rsa/2.0/build-ca
>>>>
>>>> export EASY_RSA="${EASY_RSA:-.}"
>>>> "$EASY_RSA/pkitool" --interact --initca $*
>>>> -------------------------
>>>> Histórico: http://www.fug.com.br/**historico/html/freebsd/<http://www.fug.com.br/historico/html/freebsd/>
>>>> Sair da lista: https://www.fug.com.br/**mailman/listinfo/freebsd<https://www.fug.com.br/mailman/listinfo/freebsd>
>>>>
>>>>    Olá...
>>> As variáveis de ambiente necessaŕias para que o build-ca seja executado
>>> não estão sendo exportadas....
>>> Verifique com o comando env após rodar o arquivo .vars.
>>> Caso continue sem exportar as variáveis, rode linha a linha sempre
>>> verificando com o comando env se a variável está ativa que aí deve rodar
>>> sem erros.
>>>
>>> --
>>> Cordialmente,
>>>
>>> Ricardo Ferreira
>>> Telecom, Tecnologia e Segurança da Informação
>>> CCDP, CCNP, CCDA, CCNA, MCSE, MCP
>>> ------------------------------**------------------------------**-------
>>> Sotech Soluções Tecnologicas
>>> Rua da Alfazema, 761, 1o. andar - 102/103
>>> 41820-710 - Caminho das Árvores - Salvador-BA - Brasil
>>> Tel : 55 71 3472.9400 Cel : 55 71 9138 4630
>>>
>>> Email:ricardo.ferreira@**sotechdatacenter.com.br<Email%3Aricardo.ferreira em sotechdatacenter.com.br>
>>> Site: www.sotechdatacenter.com.br
>>>
>>>
>>> Esta mensagem é dirigida apenas ao seu destinatário e pode conter
>>> informações confidenciais, não passíveis de divulgação nos termos da
>>> legislação em vigor. Caso tenha recebido esta mensagem por engano,
>>> solicitamos notificar a Sotech Soluções Tecnológicas e excluí-la de sua
>>> caixa postal.
>>>
>>> This message, including its attachments, may contain confidential
>>> information. If you have improperly received this message, please delete
>>> it from your system and notify immediately the sender. Any form of
>>> utilization, reproduction, forward, alteration, distribution and/or
>>> disclosure of this content in whole or in part, without the prior written
>>> authorization of the sender, is strictly prohibited. Thanks for your
>>> cooperation.
>>>
>>>
>>> -------------------------
>>> Histórico: http://www.fug.com.br/historico/html/freebsd/
>>> Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd
>>>
>>>
>> -------------------------
>> Histórico: http://www.fug.com.br/historico/html/freebsd/
>> Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd
> -------------------------
> Histórico: http://www.fug.com.br/historico/html/freebsd/
> Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd



Mais detalhes sobre a lista de discussão freebsd