Virtual Private Network (VPN) adalah solusi koneksi private melalui jaringan publik. Dengan VPN maka kita dapat membuat jaringan di dalam jaringan atau biasa disebut tunnel. Solusi VPN ada beberapa macam. Antara lain:

VPN Server :
OS : CentOS Linux V5.3/kernel 2.6.18-128.EL5
Real IP : 192.168.48.200
VPN IP : 10.8.0.1
VPN Client :
OS : Windows XP
Real IP : 192.168.48.1
VPN IP : 10.8.0.x (server assigned)
==============
VPN Server
==============
1. Download paket-paket yang diperlukan.
Sebelum memulai instalasi sebaiknya Anda menginstal repository berikut ini.
Bila dependencies diatas telah terinstall, ikutilah langkah berikut ini untuk memulai instalasi:
3. Copy contoh file konfigurasi berikut. Hal ini untuk mempercepat proses konfigurasi OpenVPN
4. Konfigurasi Certificate Authority (CA)
5. Build root Certificate Authority (CA)
6. Build Server Key dan Server Certificate
7. Build parameter Diffie Hellman parameters
8. Copy file CA
9. Konfigurasi server untuk OpenVPN
10. Startup service
==============
VPN Client
==============
1. Download dan install OpenVPN GUI untuk Windows
2. Konfigurasi CA
6. Kembali pada client, install file CA (seperti vpnclient.crt dan ca.crt)
Copy file crt (vpnclient.crt)yang telah dibuat di server dan file ca.crt dari server ke direktori Program Files/OpenVPN/config pada client.
- IPSEC, solusi VPN via IP Secure Protocol. Solusi yang sudah distandarisasi tapi paling susah dikonfigurasi. Tingkat keamanan yang cukup baik namun dalam implementasinya cukup rumit. Aplikasi yang digunakan yang berbasis open source yaitu Open/Free Swan.
- PPPT, solusi VPN versi awal. Merupakan solusi VPN dengan feature standar dimana jaringan dibangun dengan point to point seperti halnya anda melakukan dial up pada internet dirumah. Pada saat dial up ke provider internet ada maka akan dibangun point to point tunnel melalui jaringan telepon. Aplikasi OpenSource yang menggunakan PPPT adalah PopTop.
- VPN with SSL, merupakan solusi VPN dengan menerapkan protocol Secure Socket Layer(SSL) pada enkripsi jaringan tunnel yang dibuat. Solusi ini diawali dengan aplikasi OpenVPN. Selain gratis karena open source juga memiliki kemudahan implementasi. Saya lebih memilih menggunakan OpenVPN karena kemudahan implementasinya serta bersifat multiplatform dapat dijalankan pada Linux ataupun Windows.

VPN Server :
OS : CentOS Linux V5.3/kernel 2.6.18-128.EL5
Real IP : 192.168.48.200
VPN IP : 10.8.0.1
VPN Client :
OS : Windows XP
Real IP : 192.168.48.1
VPN IP : 10.8.0.x (server assigned)
==============
VPN Server
==============
1. Download paket-paket yang diperlukan.
2. Install dan build file download.
Sebelum memulai instalasi sebaiknya Anda menginstal repository berikut ini.
1.#yum install rpm-build2.#yum install autoconf.noarch3.#yum install zlib-devel4.#yum install pam-devel5.#yum install openssl-devel01.#rpm -ivh lzo-2.02-3.el5.kb.i386.rpm02. 03.#rpm -ivh lzo-devel-2.02-3.el5.kb.i386.rpm04. 05.#rpmbuild --rebuild lzo-1.08-4.rf.src.rpm06. 07.#rpm -Uvh /usr/src/redhat/RPMS/i386/lzo-*.rpm08. 09.#rpmbuild -tb openvpn-2.0.9.tar.gz10. 11.#rpm -Uvh /usr/src/redhat/RPMS/i386 openvpn-2.0.9-1.i386.rpm1.#cp -r /usr/share/doc/openvpn-2.0.9/easy-rsa/ /etc/openvpn/2.#cp /usr/share/doc/openvpn-2.0.9/sample-config-files/server.conf /etc/openvpn/01.#cd /etc/openvpn/easy-rsa/02.#vi vars03.export KEY_COUNTRY=ID04.export KEY_PROVINCE=Sulteng05.export KEY_CITY=Palu06.export KEY_ORG="VPNTKJ"07.export KEY_EMAIL="my@vpn.mail"08. 09.#. ./vars10.#./clean-all01.#./build-ca02.......++++++03.writing new private key to 'ca.key'04.-----05.You are about to be asked to enter information that will be incorporated06.into your certificate request.07.What you are about to enter is what is called a Distinguished Name or a DN.08.There are quite a few fields but you can leave some blank09.For some fields there will be a default value,10.If you enter '.', the field will be left blank.11.-----12.Country Name (2 letter code) [ID]:13.State or Province Name (full name) [SULTENG]:14.Locality Name (eg, city) [PALU]:15.Organization Name (eg, company) [VPNTKJ]:16.Organizational Unit Name (eg, section) []:tkj17.Common Name (eg, your name or your server's hostname) []:VPN18.Email Address [my@vpn.mail]:01.#./build-key-server vpnsrv102.Generating a 1024 bit RSA private key03......++++++04.........................++++++05.writing new private key to 'vpnsrv1.key'06.-----07.You are about to be asked to enter information that will be incorporated08.into your certificate request.09.What you are about to enter is what is called a Distinguished Name or a DN.10.There are quite a few fields but you can leave some blank11.For some fields there will be a default value,12.If you enter '.', the field will be left blank.13.-----14.Country Name (2 letter code) [ID]:15.State or Province Name (full name) [SULTENG]:16.Locality Name (eg, city) [PALU]:17.Organization Name (eg, company) [VPNTKJ]:18.Organizational Unit Name (eg, section) []:tkj19.Common Name (eg, your name or your server's hostname) []:VPN20.Email Address [my@vpn.mail]:21. 22.Please enter the following 'extra' attributes23.to be sent with your certificate request24.A challenge password []:25.An optional company name []:26.Using configuration from /etc/openvpn/easy-rsa/openssl.cnf27.Check that the request matches the signature28.Signature ok29.The Subject's Distinguished Name is as follows30.countryName :PRINTABLE:'ID'31.stateOrProvinceName :PRINTABLE:'SULTENG'32.localityName :PRINTABLE:'PALU'33.organizationName :PRINTABLE:'VPNTKJ'34.organizationalUnitName:PRINTABLE:'tkj'35.commonName :PRINTABLE:'VPN'36.emailAddress :IA5STRING:'my@vpn.mail'37.Certificate is to be certified until Jun 27 05:21:29 2017 GMT (3650 days)38.Sign the certificate? [y/n]:y39. 40.1 out of 1 certificate requests certified, commit? [y/n]y41.Write out database with 1 new entries42.Data Base Updated1.#./build-dh2.Generating DH parameters, 1024 bit long safe prime, generator 23.This is going to take a long time4...........1.#cp keys/ca.crt ../2.#cp keys/dh1024.pem ../3.#cp keys/vpnsrv1.key ../4.#cp keys/vpnsrv1.crt ../1.#cd ../2.#vi server.conf3.dev tap4.;dev tun5.ca ca.crt6.cert vpnsrv1.crt7.key vpnsrv1.key # This file should be kept secret1.#service openvpn restart2.#chkconfig openvpn onVPN Client
==============
1. Download dan install OpenVPN GUI untuk Windows
2. Konfigurasi CA
cmd.exe3. Klik dua kali vars.bat atau jalankan file batch ini melalui command-line seperti perintah di bawah ini.
>cd “C:\\Program Files\OpenVPN\easy-rsa”
>init-config.bat
>edit vars.bat
set KEY_COUNTRY=ID
set KEY_PROVINCE=SULTENG
set KEY_CITY=PALU
set KEY_ORG=VPNTKJ
set KEY_EMAIL=my@vpn.mail
(PS. Above must be same as the server)
>vars.bat4. Build CA client key dan client scr
>clean-all.bat
>md keys5. Copy file client csr ke server. Pastikan copy keys/vpnclient.csr dari client ke direktori /etc/openvpn/easy-rsa/keys pada server.
>build-ca
>build-key vpnclient
01.#cd /etc/openvpn/easy-rsa/02.#./sign-req vpnclient03.Check that the request matches the signature04.Signature ok05.The Subject's Distinguished Name is as follows06.countryName :PRINTABLE:'ID'07.stateOrProvinceName :PRINTABLE:'SULTENG'08.localityName :PRINTABLE:'PALU'09.organizationName :PRINTABLE:'VPNTKJ'10.organizationalUnitName:PRINTABLE:'tkj'11.commonName :PRINTABLE:'vpnclient'12.emailAddress :IA5STRING:'my@vpn.mail'13.Certificate is to be certified until Jun 27 06:40:48 2017 GMT (3650 days)14.Sign the certificate? [y/n]:y15. 16.1 out of 1 certificate requests certified, commit? [y/n]y17.Write out database with 1 new entries18.Data Base UpdatedCopy file crt (vpnclient.crt)yang telah dibuat di server dan file ca.crt dari server ke direktori Program Files/OpenVPN/config pada client.
>cd ..\config7. Konfigurasi client untuk OpenVPN
>copy ..\easy-rsa\keys\vpnclient.key .\
>copy ..\sample-config\client.ovpn .\8. Konfigurasi network interface untuk OpenVPN
Right-Click the OpenVPN GUI icon in the bottom right-hand corner, select ‘Edit Config’
dev tap
;dev tun
dev-node VPN_Tap
remote 192.168.48.200 1194
ca ca.crt
cert vpnclient.crt
key vpnclient.key
ns-cert-type server
Pilih “Control Panel” > “Network Connection” > “TAP-Win32#(#)”9. Startup connection pada client
Ganti nama interface tersebut menjadi ‘VPN_Tap’
Pada task-bar, pilih “OpenVPN GUI” > click kiri “Connect”Sampai disini Anda dapat melakukan koneksi ke OpenVPN server melalui VPN client menggunakan UDP connection. Silahkan mencoba!



0 komentar:
Posting Komentar