Openvpn

De WikiMar
Dreceres ràpides: navegació, cerca

Afegir nou client

Al servidor germ2.espai.de

A la carpeta /etc/openvpn/keys/martigenerarcopiatdecube/easy-rsa

source ./vars
./build-key nomPC

A la carpeta /etc/openvpn/ccd

ln -s clientX nomPC
En aquesta carpeta es pot configurar quina ip es dona a cada client en funcio
del certificat que usa. Ex.:

ifconfig-push 10.0.0.2 10.0.0.1


les ips assignades han de acabar en:
[  1,  2] [  5,  6] [  9, 10] [ 13, 14] [ 17, 18]
[ 21, 22] [ 25, 26] [ 29, 30] [ 33, 34] [ 37, 38]
[ 41, 42] [ 45, 46] [ 49, 50] [ 53, 54] [ 57, 58]
[ 61, 62] [ 65, 66] [ 69, 70] [ 73, 74] [ 77, 78]
[ 81, 82] [ 85, 86] [ 89, 90] [ 93, 94] [ 97, 98]
[101,102] [105,106] [109,110] [113,114] [117,118]
[121,122] [125,126] [129,130] [133,134] [137,138]
[141,142] [145,146] [149,150] [153,154] [157,158]
[161,162] [165,166] [169,170] [173,174] [177,178]
[181,182] [185,186] [189,190] [193,194] [197,198]
[201,202] [205,206] [209,210] [213,214] [217,218]
[221,222] [225,226] [229,230] [233,234] [237,238]
[241,242] [245,246] [249,250] [253,254]


Mes info: http://openvpn.net/index.php/documentation/howto.html#policy



En el nou client windows

Desactivar Firewall per aquest dispositiu

How to Set Unidentified Networks to be a Private or Public Network Location: http://www.sevenforums.com/attachments/tutorials/83185d1278258594-unidentified-networks-set-private-public-set_unidentified_networks_private.reg

Mes info: http://www.sevenforums.com/tutorials/71408-unidentified-networks-set-private-public.html

Alternativa si no funciona:

Obrir "Local Group Policy Editor":

gpedit.msc

->Computer Configuration, Windows Settings, Security Settings, and Network List Manager Policies.

Si gpedit.msc no existeix (windows 7 Starter) es pot instalar manualment: http://www.deviantart.com/download/215792914/add_gpedit_msc_by_jwils876-d3kh6vm.zip

Més info: http://www.askvg.com/how-to-enable-group-policy-editor-gpedit-msc-in-windows-7-home-premium-home-basic-and-starter-editions/


  • Desactivar el firewall pel les xarxes de feina.

OpenVPN

Decarregar OpenVPN de http://openvpn.net/index.php/download.html

Instalar-lo a C:\INTERNET\OpenVPN


Editar automaticament.ovpn les lines

ca "c:\\internet\\openvpn\\config\\keys\\ca.crt"
cert "c:\\internet\\openvpn\\config\\keys\\nomPc.crt"      <-----
key "c:\\internet\\openvpn\\config\\keys\\nomPc.key"       <-----

Copiar els seguents fitxers a C:\INTERNET\OpenVPN\config

automaticament.ovpn (cal editar-lo i canviar nomPc.crt i nomPc.key)
keys/ca.crt
keys/nomPc.crt
keys/nomPc.csr
keys/nomPc.key



Crear tasca per autostart

Crear en windows una tasca automatica que executi el perfil automatic: https://www.my-private-network.co.uk/knowledge-base/windows-related-questions/ovpnauto.html

Executant:

C:\INTERNET\OpenVPN\bin\openvpn-gui.exe --connect automaticament.ovpn

Al fer login i amb delay 30 segons perque apareixi la icona.

També Desactivar:

  • "Start the task only if the computer is on AC power"
  • "Stop the task if it runs longer than:"


Assignar baixa prioritat al dispositiu

Opcions avancades i posar el dispositiu al final despres de xarxa inalambrica i de fil.