MàJ d'après la dernière version de shellpki
This commit is contained in:
parent
6e5c4993cd
commit
c5d83da248
|
@ -82,6 +82,8 @@ cert /etc/shellpki/certs/fw.vpn.example.com.crt
|
|||
key /etc/shellpki/private/fw.vpn.example.com-1621504035.key
|
||||
dh /etc/shellpki/dh2048.pem
|
||||
|
||||
crl-verify /etc/shellpki/crl.pem
|
||||
|
||||
server 192.0.2.0 255.255.255.0
|
||||
|
||||
push "route 192.0.3.0 255.255.255.0"
|
||||
|
@ -99,7 +101,7 @@ port 1194
|
|||
proto udp
|
||||
dev tap0
|
||||
dev-type tap
|
||||
verb 4
|
||||
verb 3
|
||||
|
||||
user nobody
|
||||
group nobody
|
||||
|
@ -128,13 +130,18 @@ dh /etc/openvpn/ssl/ca/dh2048.pem
|
|||
cert /etc/openvpn/ssl/files/fw.vpn.example.com-1278421834/fw.vpn.example.com.crt
|
||||
key /etc/openvpn/ssl/files/fw.vpn.example.com-1278421834/fw.vpn.example.com.key
|
||||
|
||||
log /var/log/openvpn.log
|
||||
crl-verify /etc/shellpki/crl.pem
|
||||
|
||||
log-append /var/log/openvpn.log
|
||||
status /var/log/openvpn-status.log
|
||||
|
||||
cipher AES-128-CBC # AES
|
||||
|
||||
#fragment 1350
|
||||
#mssfix
|
||||
|
||||
# Management interface (used by check_openvpn for Nagios)
|
||||
management 127.0.0.1 1195 /etc/openvpn/management-pwd
|
||||
~~~
|
||||
|
||||
Pour créer automatiquement une interface `TUN` au démarrage de la machine et démarrer OpenVPN :
|
||||
|
@ -262,49 +269,37 @@ Certificate:
|
|||
Pour une nouvelle connexion VPN, il faudra créer un nouveau certificat :
|
||||
|
||||
~~~
|
||||
# cd /etc/openvpn/ssl
|
||||
# sh shellpki.sh create
|
||||
# shellpki create <commonName>
|
||||
~~~
|
||||
|
||||
* Choisir un _Common Name_ unique pour la machine (ex : `client1.vpn.example.com`)
|
||||
|
||||
* Récupérer le certificat et la clé dans `/var/www/htdocs/vpn/ssl`
|
||||
* Récupérer la configuration client dans `/etc/shellpki/openvpn/`
|
||||
|
||||
### Renouveller un certificat avec shellpki
|
||||
|
||||
Il faut le révoquer, puis en recréer un :
|
||||
|
||||
~~~
|
||||
# cd /etc/openvpn/ssl
|
||||
# sh shellpki.sh revoke
|
||||
# sh shellpki.sh create
|
||||
# shellpki revoke <commonName>
|
||||
# shellpki create <commonName>
|
||||
~~~
|
||||
|
||||
Si c'est le certificat du serveur OpenVPN, il faut en plus modifier la configuration puis relancer le démon.
|
||||
|
||||
### Révoquer un certificat avec shellpki
|
||||
|
||||
Il faut regénérer une CRL après chaque révocation de certificat :
|
||||
|
||||
~~~
|
||||
# cd /etc/openvpn/ssl
|
||||
# sh shellpki.sh revoke
|
||||
# sh shellpki.sh crl
|
||||
~~~
|
||||
|
||||
Le fichier `/etc/openvpn/ssl/crl.pem` est alors créé. La configuration d'OpenVPN doit être ajustée pour vérifier la CRL :
|
||||
|
||||
~~~
|
||||
crl-verify /etc/openvpn/ssl/crl.pem
|
||||
# shellpki revoke <commonName>
|
||||
~~~
|
||||
|
||||
#### Vérifier les certificats révoqués
|
||||
|
||||
~~~
|
||||
# openssl crl -inform PEM -text -noout -in /etc/openvpn/ssl/crl.pem
|
||||
# openssl crl -inform PEM -text -noout -in /etc/shellpki/crl.pem
|
||||
~~~
|
||||
|
||||
L'association entre le numéro de série indiqué et le CN du certificat correspondant peut être faite à l'aide du fichier `/etc/openvpn/ssl/ca/index.txt`
|
||||
L'association entre le numéro de série indiqué et le CN du certificat correspondant peut être faite à l'aide du fichier `/etc/shellpki/index.txt`
|
||||
|
||||
### Client sous Linux
|
||||
|
||||
|
|
Loading…
Reference in a new issue