To get my work on time schedule, I must bring it as my homework. It is software development. For this purpose, I have to connect my office computer to home computer with VPN.
1st - ISP's Modem
Open firewall or port triggering: 1194 UDP
ThenVirtual Server, forward incoming connection 1194 port to my office computer's IP address.
2dn - Install OpenVPN
Office / Server: Ubuntu 8.04 (Hardy Heron) Server
Home / Client: Ubuntu 8.04 Desktop
Install openvpn in both computers:
“Common Name” - my answer is “server”
“Sign the certificate? [y/n]” - answer “y”
“1 out of 1 certificate requests certified, commit? [y/n]” - answer “y”
Copy key files:
Try:
(server)
1st - ISP's Modem
Open firewall or port triggering: 1194 UDP
ThenVirtual Server, forward incoming connection 1194 port to my office computer's IP address.
2dn - Install OpenVPN
Office / Server: Ubuntu 8.04 (Hardy Heron) Server
Home / Client: Ubuntu 8.04 Desktop
Install openvpn in both computers:
sudo apt-get install openvpn3rd - Configure the server: (see HOWTO for more)
cd /etc/openvpncp -r /usr/share/doc/openvpn/examples/easy-rsa/2.0/ ./easy-rsa/cd easy-rsa(optionals)
nano ./varsChange the values:
export KEY_COUNTRY=ID export KEY_PROVINCE=KEPRIexport KEY_CITY=BATAMexport KEY_ORG="OpenVPN-TEST" export KEY_EMAIL="eshabe@gimail.com"(then):
source ./vars
./clean-all
./build-caPay attention in “Common Name”. Example answer: "myfirstvpn"
./build-key-server serverPay attention in...
“Common Name” - my answer is “server”
“Sign the certificate? [y/n]” - answer “y”
“1 out of 1 certificate requests certified, commit? [y/n]” - answer “y”
./build-key client1
./build-key client2
./build-key client3
./build-dhCopy key files:
cd /etc/openvpn
cp easy-rsa/keys/server.crt .
cp easy-rsa/keys/server.key .
cp easy-rsa/keys/ca.crt .
cp easy-rsa/keys/dh1024.pem .Copy example config file:
gunzip /usr/share/doc/openvpn/examples/sample-config-files/server.conf.gz4th - Configure the client
Copy key files:
cd /etc/openvpn
scp eshabe@125.x.x.x:/etc/openvpn/easy-rsa/keys/client1.crt client.crt
scp eshabe@125.x.x.x:/etc/openvpn/easy-rsa/keys/client1.key client.key
scp eshabe@125.x.x.x:/etc/openvpn/easy-rsa/keys/ca.crt ca.crtCopy example config file:
cp /usr/share/doc/openvpn/examples/sample-config-files/client.conf .Edit config file:
nano client.confChange remote value:
remote 125.1.2.3 11945th - Try and activate
Try:
(server)
openvpn server.conf(client)
openvpn client.confYes!! openvpn is ready….
/etc/init.d/openvpn start