TUXANANTES
Formations
+ Initiation
+ Internet et Messagerie
+ Linux
+ Reseau
+ Windows XP
Articles techniques

OpenVpn : une configuration qui fonctionne

Cette article ne se veut pas un HowTo ou un didacticiel , juste la mise à disposition des fichiers de configuration !

L'installation d'openvpn a été réalisé sur une Debian à partir des sources ( ./configure , make , make install ...)

Une vue sur l'arborescence de la configuration coté serveur

# ls -R /usr/local/openvpn
/usr/local/openvpn:
etc log

/usr/local/openvpn/etc:
ca.crt dh1024.pem openvpn.conf openvpn-status.log server.csr status.log
ca.key ipp.txt openvpn.log server.crt server.key

/usr/local/openvpn/log:
openvpn.log openvpn-status.log

Le fichier /usr/local/openvpn/etc/openvpn.conf :
port 1194
proto tcp
dev tun
ca ca.crt
cert server.crt
key server.key # This file should be kept secret
dh dh1024.pem
server 10.8.0.0 255.255.255.0
keepalive 10 120
persist-key
persist-tun
status /usr/local/openvpn/log/openvpn-status.log
log-append /usr/local/openvpn/log/openvpn.log
verb 1
comp-lzo

Le fichier de configuration coté Windows :
client
dev tun
proto tcp
remote 91.121.57.160 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client.crt
key client.key
ns-cert-type server
verb 1


Le script permettant de gérer le service openvpn : ( # cat /etc/init.d/openvpn )

#!/bin/bash
DAEMON=/usr/local/sbin/openvpn
CONF=/usr/local/openvpn/etc/openvpn.conf
CONFIG_DIR=/usr/local/openvpn/etc
DAEMONARG="--daemon openvpn"
PIDFILE=/var/run/openvpn.pid
test -x $­­­­DAEMON || exit 0
test -d $­­­­CONFIG_DIR || exit 0
case "$­­­­1" in
start)
echo -n "Starting openvpn : "
$­­­­DAEMON --writepid $­­­­PIDFILE --config $­­­­CONF $­­­­DAEMONARG --cd $­­­­CONFIG_DIR --chroot /usr/local/openvpn
echo "Done." ;;
stop)
echo -n "Stopping openvpn : "
PID=`cat $­­­­PIDFILE`
kill $­­­­PID
rm $­­­­PIDFILE
echo "Done." ;;
restart) echo "Restarting openvpn : "
echo ""
sh $­­­­0 stop
sh $­­­­0 start
echo ""
echo "Openvpn has restarted." ;;
*) echo "Usage: $­­­­0 {start|stop|restart}" >&2
exit 1 ;;
esac
exit 0

Les commandes :
Dans cette configuration , l'installation des sources a été effectué dans le répertoire /install

cd /install/openvpn-2.0.9/easy-rsa/

Modification des dernières lignes du fichier : vars

export KEY_COUNTRY=fr
export KEY_PROVINCE=drome
export KEY_CITY=valence
export KEY_ORG=boiteinformatique
export KEY_EMAIL=xxxxxxxxx@xxx.com

Initialisation des variables définies dans le shell courant :
. ./vars

Nettoyage de toutes les clés et certificats existants :
./clean-all

Les fichiers qui vont être générés par les étapes suivantes sont créés dans le répertoire :
/install/openvpn-2.0.9/easy-rsa/keys

Création du certificat de l’Autorité de Certification :
./build-ca
Génération d'un certificat et une clé privée pour le serveur :
./buid-key-server server
( Quand le Common Name est demandé, il faut entrer « server » comme le dernier paramètre entré dans la commande précédente )

Génération des certificats et des clés pour un client :
./build-key client1

Les paramètres Diffie Hellman doivent être générés pour le serveur OpenVPN :
./build-dh


Les fichiers clés

Nom de fichier Utile à Utilité Secret
ca.crt Serveur et tous les clients Certificat racine AC NON
ca.key Clé signant la machine seulement Clé racine CA OUI
dh{n}.pem Serveur seulement Paramètres Diffie Hellman NON
server.crt Serveur seulement Certificat serveur NON
server.key Serveur seulement Clé serveur OUI
client1.crt Client1 seulement Certificat Client1 NON
client1.key Client1 seulement Clé Client1 OUI
client2.crt Client2 seulement Certificat Client2 NON
client2.key Client2 seulement Clé Client2 OUI

L’étape finale dans ce processus de génération de clés est de copier tous les fichiers sur la machine qui en a besoin, en prenant soin de les copier à l'aide d'un media sûr.



Date de création : 11/04/2008 @ 20:18
Dernière modification : 11/04/2008 @ 22:24
Catégorie :
Page lue 5848 fois


Prévisualiser la page Prévisualiser la page     Imprimer la page Imprimer la page

Réactions à cet article


Réaction n°9 

par bethanne le 13/02/2019 @ 02:03

mens basketball shoes
nmd shoes
fjallraven kanken backpack
north face vest
converse shoes
new balance femme
geox sneakers
bose
adidas eqt
timberland boots
nine west outlet
air max 95
fila
nike shoes
stussy
nike basketball
supreme shirt
vans old skool femme
bose speakers
jordan 11
jordan 11
salomon boots
ecco
skechers shoes
ecco sandals
nike air max 2019
mizuno running shoes
converse homme
stan smith shoes
nmd
adidas shoes women
levis outlet
skechers shoes
ultra boost
nike air max
jordan space jams
north face outlet
zx flux
puma sneakers
basket balenciaga
jordan retro 12
levis outlet
nike air max 270
nine west boots
kate spade purses
nike air max 2019
fjallraven backpack
kd 11
kate spade


Réaction n°8 

par kathy le 12/01/2019 @ 22:51

bose
Levis
kate spade purses
salomon speedcross
bose
clarks sandals
stussy
ecco sandals
levis jeans
adidas eqt
kate spade handbags
timberland
salomon speedcross
stussy sweatshirt
kate spade purses
ecco


Réaction n°7 

par rutian18 le 05/01/2019 @ 14:43

ugg boots
adidas nmd
skechers outlet
lebron 15
jordan retro 11
ugg bottes
adidas originals nmd
adidas yeezy
yeezy boost 750
ugg boots
bijoux pandora
adidas shoes
nike air max 270
mizuno wave rider
jordan,jordan 13
yeezy boost
adidas ultra boost
balenciaga trainers
skechers
louboutin
doudoune moncler
new jordans
philipp plein
curry
air jordan
kate spade purses
nike uk
adidas stan smith
yeezy boos
ugg
balenciaga canada
adidas
jordan 12
golden goose sneakers
philipp plein t shirt
pandora earrings
off white shoes
chaussure louboutin
jordan 7
giuseppe zanotti sneakers
yeezy boost 350
adidas nmd
mizuno
salomon boots
birkenstock sale
louboutin shoes
fila sneakers
moncler sale
salomon speedcross 4


Réaction n°6 

par Coach le 06/12/2012 @ 13:58

if we did not

Coach Handbags Outlet

make the last two payments...

Coach Factory Online

which, by the way, were looong overdue, so we

Coach Factory Online

started looking for a new apartment. One morning, while

Coach Factory Store

we were reading the classified ads,

Coach Factory Online

we ran into a very appealing offer. Needless to say,

Coach Factory Outlet

we were ecstatic, joyful, exhilarating!

Coach Factory Online

The ad claimed it had enough space for two

Coach Factory Store

tenants to live comfortably. What disillusion we crashed

Coach Factory Online

into! When we got to the premises, the cat was let out of

Coach Outlet Online

the bag:(. It was a tiny sardine box that barely held the two of us upright. As you may well suppose,

Coach Outlet Store

this was enough to set the cat among the pigeons!


Réaction n°5 

par CoachFactoryOutlet le 06/12/2012 @ 08:56

The room went kind of quiet,

Coach Factory Stores

” Pat told me. “There

Louis Vuitton Belts

was like this skipped heartbeat. And then the waiting

Coach Factory Outlet Online

started all

Coach Outlet Online

over again.” Some people may be looking forward to leaving

Coach Outlet

Thanksgiving dinner before

Coach Outlet Store

the pie is served to join the Black Friday rush, which will begin during

Coach Outlet

dinnertime Thursday, earlier than ever, at stores like Sears, Walmart and Lord &

Coach Factory Online

Taylor.Enlarge This Imageoupon sites and apps like RetailMeNot can also help

Coach Outlet

find a discount.But for those who prefer to stay for the pie course, avoid

Coach Outlet Store Online

the lines and freezing temperatures and shop from the comfort of their homes,

Coach Factory Online

there are just as many deals to be found online this year, especially for

Hermes Belts

smart shoppers. Last year, online shoppers spent $­816 million on Black

Coach Factory Online

Friday, an increase of 26 percent from the year before, and an

Coach Outlet Online

additional $­2.3 billion over Thanksgiving weekend and Cyber Monday,

Coach Factory Online

according to comScore. It expects online spending to rise this year. Online, there is no commute, no parking and no

Coach Online Outlet

crowds — and shopping can be done in bed or at the Thanksgiving

Coach Outlet Online

dinner table. Still, you cannot try clothes on, you have to wait for your

Coach Factory Outlet

purchase to arrive and there is always the nagging feeling that

Coach Outlet Store Online

a better price is just one more click away.To find your way

Coach Factory Outlet

around those problems, here are some tips from online shopping pros,

Gucci Belt

retailers and shopping bloggers.BARGAINS START EARLY “Cyber Monday is passé,”

Coach Outlet Online

said Fiona Dias, chief strategy officer for ShopRunner.com, a network of e-commerce sites.


DébutPrécédent [ 1 2 3 4 5 6 7 ] SuivantFin
Calendrier

Recherche




Spécial !
www.portail44.org

L'ouvre-Boites 44.jpg
^ Haut ^


Promouvoir et soutenir le logiciel libre


GuppY - http://www.freeguppy.org/    Site créé avec GuppY v4.5.16 © 2004-2005 - Licence Libre CeCILL   GuppY - http://www.freeguppy.org/

Document généré en 0.37 seconde