| | 1 | [[PageOutline]] |
| | 2 | |
| | 3 | = OpenVPN with no "server-bridge" = |
| | 4 | * OpenVPN 2.1.0 with Ubuntu lucid |
| | 5 | |
| | 6 | |
| | 7 | = making certs = |
| | 8 | * vpnserver:~$ sudo aptitude install -R openvpn bridge-utils -y |
| | 9 | * vpnserver:~$ sudo cp -av /usr/share/doc/openvpn/examples/easy-rsa/2.0/ /etc/openvpn/easy-rsa |
| | 10 | |
| | 11 | * vpnserver:~$ sudo vim /etc/openvpn/easy-rsa/vars |
| | 12 | |
| | 13 | * root@vpnserver:/etc/openvpn/easy-rsa# . ./vars |
| | 14 | * root@vpnserver:/etc/openvpn/easy-rsa# ./clean-all |
| | 15 | * root@vpnserver:/etc/openvpn/easy-rsa# ./build-ca |
| | 16 | {{{ |
| | 17 | writing new private key to 'ca.key' |
| | 18 | ----- |
| | 19 | |
| | 20 | The Subject's Distinguished Name is as follows |
| | 21 | countryName :PRINTABLE:'JP' |
| | 22 | stateOrProvinceName :PRINTABLE:'Ibraki' |
| | 23 | localityName :PRINTABLE:'Tsukuba' |
| | 24 | organizationName :PRINTABLE:'example.org' |
| | 25 | organizationalUnitName:PRINTABLE:'OpenVPN Server' |
| | 26 | commonName :PRINTABLE:'vpnserver' |
| | 27 | emailAddress :IA5STRING:'vpn@example.org' |
| | 28 | }}} |
| | 29 | * root@vpnserver:/etc/openvpn/easy-rsa# ./build-key vpnclient |
| | 30 | {{{ |
| | 31 | writing new private key to 'vpnclient.key' |
| | 32 | ----- |
| | 33 | |
| | 34 | The Subject's Distinguished Name is as follows |
| | 35 | countryName :PRINTABLE:'JP' |
| | 36 | stateOrProvinceName :PRINTABLE:'Ibraki' |
| | 37 | localityName :PRINTABLE:'Tsukuba' |
| | 38 | organizationName :PRINTABLE:'example.org' |
| | 39 | organizationalUnitName:PRINTABLE:'OpenVPN Client' |
| | 40 | commonName :PRINTABLE:'vpnclient' |
| | 41 | emailAddress :IA5STRING:'vpn@example.org' |
| | 42 | }}} |
| | 43 | * root@vpnserver:/etc/openvpn/easy-rsa# ./build-dh |
| | 44 | |
| | 45 | == copy files for server == |
| | 46 | * root@vpnserver:/etc/openvpn/easy-rsa# cp -a keys/ca.crt keys/dh1024.pem keys/vpnserver.crt keys/vpnserver.key /etc/openvpn/ |
| | 47 | |
| | 48 | == copy files for client == |
| | 49 | * root@vpnserver:/etc/openvpn/easy-rsa# mkdir ~/client |
| | 50 | * root@vpnserver:/etc/openvpn/easy-rsa# cp -a keys/ca.crt keys/vpnclient.crt keys/vpnclient.key ~/client/ |
| | 51 | |
| | 52 | * root@vpnserver:~# tar czf client.tar.gz client/ |
| | 53 | * client.tar.gz => vpnclient with sftp |