modul 5 vpn-mpls - openvpn

Upload: badra-sapta-kusuma

Post on 16-Oct-2015

153 views

Category:

Documents


3 download

TRANSCRIPT

  • Dokumen Laboratorium Teknik Informatika UMM @ 2012 Modul Praktikum VPNMPLS

    PRAKTIKUM VPNMPLS

    MODUL 5

    Building Open Source Virtual Private Network (VPN) with OpenVPN

    LABORATORIUM INTERNET DAN JARINGAN KOMPUTER

    TEKNIK INFORMATIKA

    FAKULTAS TEKNIK

    UNIVERSITAS MUHAMMADIYAH MALANG

    20122013

  • Dokumen Laboratorium Teknik Informatika UMM @ 2012 Modul Praktikum VPNMPLS

    I. TUJUAN 1. Mahasiswa mampu memahami konsep dan cara kerja VPN 2. Mahasiswa mampu membangun jaringan VPN dan menggunakan aplikasi VPN 3. Mahasiswa mampu memahami troubleshoting jaringan VPN

    II. APLIKASI DAN HARDWARE YANG DIBUTUHKAN1. Operating Sistem :

    Ubuntu 12.04 OS Windows

    2. Aplikasi : OpenVPN packages (update from repositories) OpenVPN2.0.9gui1.0.3install Wireshark

    3. Hardware : PC / Laptop : 3 / 4 unit Switch, Kabel LAN (Straight) : 3 / 4 unit @ 1 Meter

    III. DASAR TEORI

    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 serta bersifat multiplatform yang bisa dijalankan pada Linux ataupun Windows. OpenVPN merupakan aplikasi untuk Virtual Private Network (VPN), dimana aplikasi tersebut dapat membuat koneksi pointtopoint tunnel yang telah terenkripsi. OpenVPN menggunakan private keys, certificate, atau username/password untuk melakukan authentikasi dalam membangun koneksi. Dimana untuk enkripsinya menggunakan OpenSSL.

    Gambar 1. Model jaringan VPN

  • Dokumen Laboratorium Teknik Informatika UMM @ 2012 Modul Praktikum VPNMPLS

    Gambar 2. Langkahlangkah VPN

    Langkahlangkah membangun jaringan VPN adalah :

    1. VPN gateway/server membuat shared key dan certificate 2. Mengirimkan key tersebut kepada client yang akan melakukan koneksi 3. Membangun koneksi dengan menggunakan key yang telah didapat dari suatu VPN

    Gateway/server

    IV. TUGAS PENDAHULUAN 1. Jelaskan dengan singkat apa kegunaan dari VPN secara umum ? 2. Jelaskan proses pertukaran kunci/key clientserver pada aplikasi VPN !

    V. KEGIATAN PRAKTIKUM / PERCOBAAN A. Persiapan Jaringan LAN

    1. Bangunlah topologi jaringan seperti berikut (Internal Network) :

    Gambar 1. Topologi jaringan percobaan

  • Dokumen Laboratorium Teknik Informatika UMM @ 2012 Modul Praktikum VPNMPLS

    2. Spesifikasi dan konfigurasi awal:

    VPN Server : Client : OS : Ubuntu 12.04 OS : Ubuntu 12.04 Real IP/Ethernet : 192.168.100.1 / 24 Real IP/Ethernet : 192.168.100.xxx / 24 VPN IP : 10.8.0.1

    VPN Client : OS : Windows XP Real IP/Ethernet : 192.168.100.xxx / 24 VPN IP : 10.8.0.x (Server Assigned)

    B. Instalasi dan konfigurasi OpenVPN

    luqman@IsyKarima:~$ sudo i [sudo] password for luqman:

    root@IsyKarima:~# aptget install openvpn

    1. Public Key Infrastructure Setup

    Langkah pertama dalam membangun sebuah konfigurasi OpenVPN adalah untuk membentuk PKI (Public Key Infrastructure). PKI tersebut terdiri dari :

    Sertifikat terpisah (juga dikenal sebagai publik key) dan private key untuk server dan setiap klien

    Certificate Authority (CA) certificate/Otoritas Sertifikat Induk dan key (kunci) yang digunakan untuk menandatangani setiap server dan sertifikat klien.

    OpenVPN mendukung otentikasi dua arah berbasis sertifikat, yang berarti bahwa klien harus mengotentikasi sertifikat server dan server juga harus mengotentikasi sertifikat klien sebelum saling percaya dibentuk/didirikan antara OpenVPN server dan OpenVPN client.

    Keduanya, server dan klien akan mengotentikasi yang lainnya dengan terlebih dahulu memverifikasi bahwa sertifikat yang diberikan telah ditandatangani oleh otoritas sertifikat induk (CA), kemudian dengan menguji/mengecek informasi dalam header sertifikat nowauthenticated, seperti nama sertifikat umum/certificate common name atau tipe sertifikat (client atau server).

    2. Certificate Authority Setup

    Untuk mensetup Certificate Authority (CA) certificate, yang akan men generate/ menghasilkan sertifikatsertifikat (certificates) dan kuncikunci (keys) untuk server OpenVPN dan untuk multiple client, dengan memanfaatkan bantuan tools easyrsa, dimana tools tersebut terdapat di directory /usr/share/doc/openvpn/examples. Maka langkah pertama yang harus dilakukan adalah copy /easyrsa directory ke dalam direktori /openvpn. Tujuan dari copy directory /easyrsa ini adalah adalah untuk memastikan bahwa setiap perubahan pada script tidak akan hilang ketika paket

  • Dokumen Laboratorium Teknik Informatika UMM @ 2012 Modul Praktikum VPNMPLS

    diperbarui. Yang digunakan dalam modul ini adalah versi 2.0, karena ada versi lain atau yang sebelumnya yaitu 1.0.

    root@IsyKarima:~# mkdir /etc/openvpn/easyrsa/

    root@IsyKarima:~# cp r /usr/share/doc/openvpn/examples/easyrsa/2.0/* \ /etc/openvpn/easyrsa/

    Langkah berikutnya, edit /etc/openvpn/easyrsa/vars

    Rubahlah informasi yang dibutuhkan dibawah ini dengan menyesuaikan data/informasi yang akan dipakai :

    export KEY_COUNTRY="ID" export KEY_PROVINCE="JATIM" export KEY_CITY="MALANG" export KEY_ORG="ITUMM" export KEY_EMAIL="luqman@IsyKarima export [email protected] export KEY_CN=changeme export KEY_NAME=changeme export KEY_OU=changeme export PKCS11_MODULE_PATH=changeme export PKCS11_PIN=1234

    Kemudian masuk kedalam directory /easyrsa, dan masukkan perintah berikut ini untuk mengenerate CA certificate dan key : root@IsyKarima:~# cd /etc/openvpn/easyrsa/ root@IsyKarima:/etc/openvpn/easyrsa# source vars Konfigurasi dasar root@IsyKarima:/etc/openvpn/easyrsa# ./cleanall Hapus konfigurasi lama di keys root@IsyKarima:/etc/openvpn/easyrsa# ./buildca Membuat sertifikat baru di keys

    Berikut ini contoh dari konfigurasinya :

    root@IsyKarima:/etc/openvpn/easyrsa# ./buildca

    Generating a 1024 bit RSA private key

    ....++++++

    ......................++++++

    writing new private key to 'ca.key'

    You are about to be asked to enter information that will be incorporated

    into your certificate request.

  • Dokumen Laboratorium Teknik Informatika UMM @ 2012 Modul Praktikum VPNMPLS

    What you are about to enter is what is called a Distinguished Name or a DN.

    There are quite a few fields but you can leave some blank

    For some fields there will be a default value,

    If you enter '.', the field will be left blank.

    Country Name (2 letter code) [ID]:

    State or Province Name (full name) [JATIM]:

    Locality Name (eg, city) [MALANG]:

    Organization Name (eg, company) [ITUMM]:

    Organizational Unit Name (eg, section) [changeme]:VPNMPLS Praktikum OpenVPN

    Common Name (eg, your name or your server's hostname) [changeme]: luqman hakim

    Name [changeme]:abu ukasyah

    Email Address [[email protected]]:

    3. Server Certificates

    Selanjutnya, kita akan mengenerate certificate dan private key untuk server :

    root@IsyKarima:/etc/openvpn/easyrsa# ./buildkeyserver VPNServer

    Seperti dalam langkah sebelumnya, parameter bisa diisikan secara default. Setelah memasukkan parameter, akan dua pertanyaan lain yang memerlukan respons positif, "Sign the certificate? [y / n]?" Dan "1 out of 1 certificate requests certified, commit? [y/n]"..

    Berikut ini contoh konfigurasinya :

    Country Name (2 letter code) [ID]:

    State or Province Name (full name) [JATIM]:

    Locality Name (eg, city) [MALANG]:

    Organization Name (eg, company) [ITUMM]:

    Organizational Unit Name (eg, section) [changeme]:VPNMPLS Praktikum OpenVPN

    Common Name (eg, your name or your server's hostname) [VPNServer]:

    Name [changeme]:abu ukasyah

  • Dokumen Laboratorium Teknik Informatika UMM @ 2012 Modul Praktikum VPNMPLS

    Email Address [[email protected]]:

    Please enter the following 'extra' attributes

    to be sent with your certificate request

    A challenge password []:luqman hakim

    An optional company name []:

    Using configuration from /etc/openvpn/easyrsa/openssl.cnf

    Check that the request matches the signature

    Signature ok

    The Subject's Distinguished Name is as follows

    countryName :PRINTABLE:'ID'

    stateOrProvinceName :PRINTABLE:'JATIM'

    localityName :PRINTABLE:'MALANG'

    organizationName :PRINTABLE:'ITUMM'

    organizationalUnitName :PRINTABLE:'VPNMPLS Praktikum OpenVPN'

    commonName :PRINTABLE:'VPNServer'

    name :PRINTABLE:'abu ukasyah'

    emailAddress :IA5STRING:'[email protected]'

    Certificate is to be certified until Sep 10 02:23:05 2022 GMT (3650 days)

    Sign the certificate? [y/n]:y

    1 out of 1 certificate requests certified, commit? [y/n]y

    Write out database with 1 new entries

    Data Base Updated

    Parameter Diffie Hellman juga harus digenerate untuk server OpenVPN, Parameter ini digunakan oleh 2 pengguna untuk melakukan pertukaran key rahasia melalui media yang tidak aman. Ini dikarenakan antara server dan client memiliki key sendirisendiri sehingga perlu saling dipertukarkan yang nantinya akan menghasilkan key yang sama diantara client dan server.

    Berikut perintah untuk mengenerate parameter Diffie Hellman :

    root@IsyKarima:/etc/openvpn/easyrsa# ./builddh

    Semua certificates dan keys telah dibuat/dihasilkan dalam subdirectory keys/. Kemudian copy certificates dan keys yang telah di generate/dihasilkan di dalam subdirectory keys/ kedalam directory openvpn/ :

  • Dokumen Laboratorium Teknik Informatika UMM @ 2012 Modul Praktikum VPNMPLS

    root@IsyKarima:/etc/openvpn/easyrsa# cd keys/ root@IsyKarima:/etc/openvpn/easyrsa/keys# cp VPNServer.crt VPNServer.key ca.crt \ dh1024.pem /etc/openvpn/

    Berikut ini adalah key dan certificate yang disimpan di dalam directory /keys :

    ca.crt (root certificate) ca.key (private key untuk certificate)

    server.crt (certificate X509 milik server) server.csr (certificate request)

    server.key (priva te key untuk server) client.crt (certificate X509 milik client)

    client.csr (certificate request) client.key (private key untuk client)

    dhxxxx.pem, dimana xxxx adalah jumlah enkripsi yang digunakan

    Tabel 1. Daftar keys dan certivicates

    4. Client Certificates

    Client VPN juga membutuhkan sertifikat untuk mengotentikasi dirinya ke server. Biasanya seorang admin jaringan/server membuat sertifikat yang berbeda untuk setiap klien. Untuk membuat sertifikat yang akan dipakai oleh client VPN, ketikkan perintah berikut :

    root@IsyKarima:/etc/openvpn/easyrsa/keys# cd /etc/openvpn/easyrsa/ root@IsyKarima:/etc/openvpn/easyrsa# source vars root@IsyKarima:/etc/openvpn/easyrsa# ./buildkey VPNClient

    Berikut ini contoh konfigurasinya :

  • Dokumen Laboratorium Teknik Informatika UMM @ 2012 Modul Praktikum VPNMPLS

    root@IsyKarima:/etc/openvpn/easyrsa# ./buildkey VPNClient

    Generating a 1024 bit RSA private key

    ..............++++++

    ......................++++++

    writing new private key to 'VPNClient.key'

    You are about to be asked to enter information that will be incorporated

    into your certificate request.

    What you are about to enter is what is called a Distinguished Name or a DN.

    There are quite a few fields but you can leave some blank

    For some fields there will be a default value,

    If you enter '.', the field will be left blank.

    Country Name (2 letter code) [ID]:

    State or Province Name (full name) [JATIM]:

    Locality Name (eg, city) [MALANG]:

    Organization Name (eg, company) [ITUMM]:

    Organizational Unit Name (eg, section) [changeme]:luqkimVPNClient

    Common Name (eg, your name or your server's hostname) [VPNClient]:client1

    Name [changeme]:ukasyah

    Email Address [[email protected]]:[email protected]

    Please enter the following 'extra' attributes

    to be sent with your certificate request

  • Dokumen Laboratorium Teknik Informatika UMM @ 2012 Modul Praktikum VPNMPLS

    A challenge password []:

    An optional company name []:

    Using configuration from /etc/openvpn/easyrsa/openssl.cnf

    Check that the request matches the signature

    Signature ok

    The Subject's Distinguished Name is as follows

    countryName :PRINTABLE:'ID'

    stateOrProvinceName :PRINTABLE:'JATIM'

    localityName :PRINTABLE:'MALANG'

    organizationName :PRINTABLE:'ITUMM'

    organizationalUnitName:PRINTABLE:'luqkimVPNClient'

    commonName :PRINTABLE:'client1'

    name :PRINTABLE:'ukasyah'

    emailAddress :IA5STRING:'[email protected]'

    Certificate is to be certified until Sep 10 02:49:40 2022 GMT (3650 days)

    Sign the certificate? [y/n]:y

    1 out of 1 certificate requests certified, commit? [y/n]y

    Write out database with 1 new entries

    Data Base Updated

    Langkah selanjutnya, copy file berikut ini ke client VPN dengan cara aman/using a secure mothod :

    /etc/openvpn/ca.crt

    /etc/openvpn/easyrsa/keys/VPNClient.crt

    /etc/openvpn/easyrsa/keys/VPNClient.key

  • Dokumen Laboratorium Teknik Informatika UMM @ 2012 Modul Praktikum VPNMPLS

    Certificates dan keys tersebut hanya dibutuhkan oleh mesin client VPN, maka certificates dan keys tersebut bisa dihapus dari server VPN

    5. Simple Server Configuration

    Seiring dengan instalasi dan konfigurasi OpenVPN, dalam software OpenVPN sudah mempunyai contoh filefile konfigurasi (dan lebih banyak lagi jika mau memeriksanya) :

    root@IsyKarima:/etc/openvpn/easyrsa# cd

    root@IsyKarima:~# ls l /usr/share/doc/openvpn/examples/sampleconfigfiles/

    total 68 rwrr 1 root root 3427 20110704 15:09 client.conf rwrr 1 root root 4141 20110704 15:09 server.conf.gz

    Dua baris informasi diatas adalah point penting yang kita butuhkan saat ini untuk melanjutkan konfigurasi yang sudah dilakukan sebelumnya

    Kita mulai dengan copy dan unpacking server.conf.gz ke directory /openvpn.

    root@IsyKarima:~# cp /usr/share/doc/openvpn/examples/sampleconfig \ files/server.conf.gz /etc/openvpn/

    root@IsyKarima:~# gzip d /etc/openvpn/server.conf.gz

    Berikutnya, edit file server.conf yang sudah di copy dan unpacking tersebut untuk memastikan bahwa konfigurasinya sudah sesuai / menunjuk ke certificates dan keys yang sudah dibuat sebelumnya.

    ca ca.crt cert VPNServer.crt key VPNServer.key dh dh1024.pem

    Untuk saat ini, cobalah memulai menjalankan server OpenVPN. Maka akan ditemukan logging dan pesan kesalahan dalam syslog server VPN. Perintah untuk cek syslog :

    grep i vpn /var/log/syslog

    Sebelum mengaktifkan server VPN, cobalah untuk mengecek konfigurasi interface dengan mengetikkan perintah :

    root@IsyKarima:~# ifconfig

    eth0 Link encap:Ethernet HWaddr 00:1d:72:2c:85:a0

    inet6 addr: fe80::21d:72ff:fe2c:85a0/64 Scope:Link

    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

    RX packets:28 errors:0 dropped:0 overruns:0 frame:0

    TX packets:114 errors:0 dropped:0 overruns:0 carrier:0

  • Dokumen Laboratorium Teknik Informatika UMM @ 2012 Modul Praktikum VPNMPLS

    collisions:0 txqueuelen:1000

    RX bytes:6557 (6.5 KB) TX bytes:25987 (25.9 KB)

    Interrupt:16

    lo Link encap:Local Loopback

    inet addr:127.0.0.1 Mask:255.0.0.0

    inet6 addr: ::1/128 Scope:Host

    UP LOOPBACK RUNNING MTU:16436 Metric:1

    RX packets:328 errors:0 dropped:0 overruns:0 frame:0

    TX packets:328 errors:0 dropped:0 overruns:0 carrier:0

    collisions:0 txqueuelen:0

    RX bytes:30380 (30.3 KB) TX bytes:30380 (30.3 KB)

    wlan0 Link encap:Ethernet HWaddr 00:1f:3a:a3:06:11

    UP BROADCAST MULTICAST MTU:1500 Metric:1

    RX packets:0 errors:0 dropped:0 overruns:0 frame:0

    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

    collisions:0 txqueuelen:1000

    RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

    Disamping informasi yang muncul setelah memasukkan perintah ifconfig, harusnya sudah ada/terbentuk interface baru selain interface standard (ethernet, wlan) yaitu tun0/interface tunnel (terowongan), karena interface tunnel ini (tun0) sudah dibuat pada langkahlangkah konfigurasi sebelumnya. Namun akan berbeda setelah mulai menjalankan/mengaktifkan server(OpenVPN), maka pasti akan ada informasi baru yang terbentuk yaitu interface tunnel tersebut (tun0). Sekarang cek apakah OpenVPN sudah membuat interface tunnel (tun0), dengan mengetikkan perintah berikut :

    Perintah untuk mengaktifakan server OpenVPN :

    root@IsyKarima:~# /etc/init.d/openvpn start

    * Starting virtual private network daemon(s)...

    * Autostarting VPN 'server'

    root@IsyKarima:~# ifconfig

    eth0 Link encap:Ethernet HWaddr 00:1d:72:2c:85:a0

    inet6 addr: fe80::21d:72ff:fe2c:85a0/64 Scope:Link

    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

  • Dokumen Laboratorium Teknik Informatika UMM @ 2012 Modul Praktikum VPNMPLS

    RX packets:29 errors:0 dropped:0 overruns:0 frame:0

    TX packets:114 errors:0 dropped:0 overruns:0 carrier:0

    collisions:0 txqueuelen:1000

    RX bytes:6815 (6.8 KB) TX bytes:25987 (25.9 KB)

    Interrupt:16

    lo Link encap:Local Loopback

    inet addr:127.0.0.1 Mask:255.0.0.0

    inet6 addr: ::1/128 Scope:Host

    UP LOOPBACK RUNNING MTU:16436 Metric:1

    RX packets:328 errors:0 dropped:0 overruns:0 frame:0

    TX packets:328 errors:0 dropped:0 overruns:0 carrier:0

    collisions:0 txqueuelen:0

    RX bytes:30380 (30.3 KB) TX bytes:30380 (30.3 KB)

    ppp0 Link encap:PointtoPoint Protocol

    inet addr:10.224.117.76 PtP:10.20.31.3 Mask:255.255.255.255

    UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1

    RX packets:99089 errors:0 dropped:0 overruns:0 frame:0

    TX packets:92742 errors:0 dropped:0 overruns:0 carrier:0

    collisions:0 txqueuelen:3

    RX bytes:138985100 (138.9 MB) TX bytes:5632022 (5.6 MB)

    tun0 Link encap:UNSPEC HWaddr 00000000000000000000000000000000

    inet addr:10.8.0.1 PtP:10.8.0.2 Mask:255.255.255.255

    UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1

    RX packets:0 errors:0 dropped:0 overruns:0 frame:0

    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

    collisions:0 txqueuelen:100

    RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

    wlan0 Link encap:Ethernet HWaddr 00:1f:3a:a3:06:11

    UP BROADCAST MULTICAST MTU:1500 Metric:1

    RX packets:0 errors:0 dropped:0 overruns:0 frame:0

    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

  • Dokumen Laboratorium Teknik Informatika UMM @ 2012 Modul Praktikum VPNMPLS

    collisions:0 txqueuelen:1000

    RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

    Lebih spesifik lagi hanya untuk menampilkan informasi pada interface tunnel tun0, ketiklah perintah berikut ini :

    root@IsyKarima:~# ifconfig tun0

    tun0 Link encap:UNSPEC HWaddr 00000000000000000000000000000000

    inet addr:10.8.0.1 PtP:10.8.0.2 Mask:255.255.255.255

    UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1

    RX packets:0 errors:0 dropped:0 overruns:0 frame:0

    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

    collisions:0 txqueuelen:100

    RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

    6. Simple Client Configuration

    Ada berbagai perbedaan dalam implementasi client OpenVPN baik yang menggunakan GUIs atau yang tidak menggunakan. Silahkan di explore lagi tentang client OpenVPN, tentunya pada kesempatan yang lainnya. Untuk saat ini yang digunakan adalah client OpenVPN untuk OS Windows. Jika menggunakan client OpenVPN untuk Ubuntu juga, maka package openvpn harus di install pada mesin client VPN seperti instalasi pada server VPN.

    Langkah pertama yang harus dilakukan pada sisi client VPN adalah instalasi aplikasi OpenVPN. Silahkan lakukan instalasi aplikasi OpenVPN2.0.9gui1.0.3install pada komputer yang digunkan sebagai client VPN.

    Langkah berikutnya yaitu copy client keys dan CA certivicate yang sudah dibuat pada server VPN. Kemudian simpan file client keys dan CA certivicate tersebut pada directory OpenVPN, tepatnya pada folder config : C:\Program Files\OpenVPN\config.

    Kemudian langkah terakhir yang harus dilakukan adalah membuat file konfigurasi OpenVPN. Untuk mempermudah dan mempercepat maka seperti halnya yang dilakukan pada server VPN, silahkan memanfaatkan contoh konfigurasi yang sudah di sediakan oleh OpenVPN. File tersebut berada pada directory OpenVPN yaitu di dalam folder sampleconfig. Copy paste ke dalam folder yang sama dengan file client keys dan CA certivicate disimpan. Edit sample konfigurasi tersebut untuk memastikan beberapa baris konfigurasi berikut menunjuk ke file client keys dan CA certivicate yang sudah dibuat dan disimpan dalam folder config.

    ca ca.crt cert VPNClient.crt key VPNClient.key

  • Dokumen Laboratorium Teknik Informatika UMM @ 2012 Modul Praktikum VPNMPLS

    Langkah terakhir yaitu menentukan nama server VPN atau IP Address dari server VPN, pastikan kata kunci/baris client ada dalam konfigurasi file sample tersebut.

    client remote IPAddressserverVPN 1194

    Jalankan OpenVPN GUI, kemudian klik kanan pada icon di notification area dan pilih connect untuk menghubungkan dengan server VPN yaitu dengan menggunakan interface tunnel yang sudah dibuat. Untuk membuktikannya, silahkan buka CMD dan ketikkan perintah ipconfig. Pastikan bahwa interface baru yang berfungsi sebagai tunnel sudah terbentuk. Pada OS Windows, driver yang digunakan untuk interface tunnel/network adapter adalah TAPWin32 Adapter.

    Client VPN akan mendapatkan IP Address secara otomatis dari server, default IP Address pada interface tun0 server VPN di dalam contoh file konfigurasi client yang dipakai untuk menghubungkan dengan server VPN adalah 10.8.0.1, karena server OpenVPN selalu menggunakan alamat IP nomor pertama yang digunakan dalam jaringan client dan hanya IP yang pingable saja. Misalnya jika netmask untuk jaringan client yang dipakai adalah /24, maka alamat IP .1 yang akan digunakan oleh server OpenVPN.

    Buktikan bahwa client VPN bisa melakukan koneksi, ping IP Address server VPN.

    Untuk mengecek routing table pada jaringan, ketikkan perintah :

    C:\> netstat rn , atau

    C:\> route print

    C. Tugas Praktikum / Lembar Analisa

    1. Gambarlah topologi jaringan beserta dengan IP Addressnya, berilah penjelasannya.

    KONFIGURASI PADA Server VPN

    2. Catat hasil pembuatan certificate authority (CA)

    3. Catat hasil pembuatan certificate dan keys untuk server VPN

    4. Catat hasil pembuatan certificate dan keys untuk client VPN

    5. Beri pendapat kelompok anda tentang proses yang terjadi ketika OpenVPN dijalankan di server VPN

    6. Catat hasil dari perintah ifconfig pada pada server VPN setelah terbentuk interface tun0

    KONFIGURASI PADA Client VPN

    7. Beri pendapat kelompok anda tentang proses yang terjadi waktu OpenVPN dijalankan di client VPN

    8. Catat hasil dari perintah ipconfig pada pada client VPN setelah terbentuk interface tunnel / interface yang terbentuk dari konfigurasi OpenVPN

  • Dokumen Laboratorium Teknik Informatika UMM @ 2012 Modul Praktikum VPNMPLS

    TES KONEKSI SERVER VPN CLIENT

    9. Tes koneksi dengan perintah ping pada sisi client ke server VPN, bandingkan hasilnya antara ping menggunakan interface eth0 dengan interface tun0

    TES KONEKSI SERVER VPN CLIENT VPN

    10. Tes koneksi dengan perintah ping pada sisi server VPN dan client VPN, bandingkan hasilnya antara menggunakan interface eth0/Ethernet adapter Local Area Connection dengan interface tun0

    11. Tes koneksi dengan meremote server VPN (interface eth0 dan tun0) dari client VPN menggunakan perintah telnet, kemudian bandingkan hasilnya dari proses pengamatan di aplikasi wireshark

    C:\> telnet 192.168.100.1

    Amati prosesnya di wireshark.

    C:\> telnet 10.8.0.1

    Amati prosesnya di wireshark, capture di bagian eth0, jangan di tun0.

  • Dokumen Laboratorium Teknik Informatika UMM @ 2012 Modul Praktikum VPNMPLS

    Referensi :

    1. OpenVPN, http://www.openvpn.net 2. Wikipedia, http://www.wikipedia.org, OpenVPN 3. Ebook, OpenVPN Building and Integrating Virtual Private Networks 4. And the others