Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédenteProchaine révisionLes deux révisions suivantes | ||
fr:taf:mmorpg:infrastructure:mercurial [2015/08/03 18:27] – [Création d'un serveur VPN sur vpsweb] Shepeng | fr:taf:mmorpg:infrastructure:mercurial [2015/08/03 19:01] – [Création d'un serveur VPN sur vpsweb] Shepeng | ||
---|---|---|---|
Ligne 62: | Ligne 62: | ||
=== Création d'un serveur VPN sur vpsweb === | === Création d'un serveur VPN sur vpsweb === | ||
- | <pre> | + | <code> |
apt-get update | apt-get update | ||
apt-get install openvpn easy-rsa | apt-get install openvpn easy-rsa | ||
cp -rp / | cp -rp / | ||
cd / | cd / | ||
- | </pre> | + | </code> |
+ | |||
+ | Modif de vars | ||
+ | |||
+ | < | ||
+ | # These are the default values for fields | ||
+ | # which will be placed in the certificate. | ||
+ | # Don't leave any of these fields blank. | ||
+ | export KEY_COUNTRY=" | ||
+ | export KEY_PROVINCE=" | ||
+ | export KEY_CITY=" | ||
+ | export KEY_ORG=" | ||
+ | export KEY_EMAIL=" | ||
+ | export KEY_OU=" | ||
+ | </ | ||
+ | Création de l' | ||
+ | < | ||
+ | . ./vars | ||
+ | ./ | ||
+ | ./ | ||
+ | </ | ||
+ | |||
+ | Config du serveur | ||
+ | < | ||
+ | root@vps155855:/ | ||
+ | root@vps155855:/ | ||
+ | root@vps155855:/ | ||
+ | root@vps155855:/ | ||
+ | </ | ||
+ | |||
+ | config : | ||
+ | < | ||
+ | ;mute 20 | ||
+ | port 1194 | ||
+ | |||
+ | proto udp | ||
+ | |||
+ | dev tun | ||
+ | ca ca.crt | ||
+ | |||
+ | cert vpsweb.crt | ||
+ | #crl-verify / | ||
+ | |||
+ | key vpsweb.key | ||
+ | |||
+ | dh dh2048.pem | ||
+ | server 10.10.100.0 255.255.255.0 | ||
+ | ifconfig-pool-persist ipp.txt | ||
+ | # | ||
+ | |||
+ | client-to-client | ||
+ | keepalive 10 120 | ||
+ | comp-lzo | ||
+ | persist-key | ||
+ | |||
+ | persist-tun | ||
+ | |||
+ | status openvpn-status.log | ||
+ | verb 3 | ||
+ | |||
+ | </ | ||
+ | |||
+ | Puis redémarrage d' | ||
+ | |||
+ | Exemple de config d'un client | ||
+ | |||
+ | D' | ||
+ | < | ||
+ | client | ||
+ | |||
+ | dev tun | ||
+ | proto udp | ||
+ | remote vpsweb.khaganat.net 1194 | ||
+ | |||
+ | resolv-retry infinite | ||
+ | |||
+ | nobind | ||
+ | |||
+ | persist-key | ||
+ | persist-tun | ||
+ | |||
+ | ca ca.crt | ||
+ | cert client.crt | ||
+ | key client.key | ||
+ | |||
+ | comp-lzo | ||
+ | |||
+ | verb 3 | ||
+ | |||
+ | </code> | ||
{{tag> | {{tag> | ||