OpenVPN Client & Server Configuration HOWTO

Giusto per non scordarmele di nuovo e visto che le usero’ molto spesso d’ora in avanti, ecco alcuni step per configurare un client e un server Linux ma anche Mac OS X per parlarsi in VPN con OpenVPN.

Installazione certificati

. ./vars
./clean-all
./build-ca

Copiare i file ca.* su entrambi i computer (client/server)

Creazione certificati client/server

. ./vars
./build-key-server <common-name-server>
./build-dh
./build-key <common-name-client>

Copiare i file <common-name-client>.* sul computer client

Configurazione Server

port 1194
proto udp
dev tun
ca ca.crt
cert server.crt
dh dh1024.pem
#Subnet for the VPN, this computer will get the first ip (10.10.100.1)
server 10.10.100.0 255.255.255.0
ifconfig-pool-persist ipp.txt
keepalive 10 120
persist-key
persist-tun
status openvpn-status.log
verb 3

Configurazione Client

client
dev tun
proto udp
# This is the remote ip address and port of the VPN Server
remote 1.2.3.4 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client1.crt
key client1.key
verb 3



Leave a Comment