Anda di halaman 1dari 4

OpenVPN

VPN atau Virtual Private Network, Menurut IETF, Internet Engineering Task Force, is an emulation of [a] private Wide Area Network(WAN) using shared or public IP facilities, such as the Internet or private IP backbones.

VPN Client melakukan koneksi ke VPN server menggunakan account UI sebagai autentikasi. Proses autentikasi berdasarkan filtering atribut LDAP masing-masing Fakultas(ou=Fakultas xXx)dan hasAccessTo: vpn.ui.ac.id. Ketika VPN client berhasil melakukan autentikasi, VPN server kemudian akan memberikan IP DHCP untuk VPN client dan mem-push tabel routing yang 'ditentukan' ke client. Setiap fakultas dapat login ke VPN server menggunakan port yang telah ditentukan, misalnya: Fak. Kedokteran : 1188 Fak. Kedokteran Gigi : 1189 Fak. Ilmu Komputer : 1190 Fak. Ilmu Budaya : 1191 Fak. Psikologi : 1192 Fak. Teknik : 1193 Fak. Ekonomi : 1194 Fak. Ilmu Sosial & Politik : 1195 Fak. Hukum : 1196 Fak. Kes.Masyarakatan : 1197 Fak. Ilmu Keperawatan : 1198

Fak. MIPA

: 1199

VPN Client yang yang telah berhasil melakukan autentikasi, akan mendapatkan IP VPN sesuai 'jatah' yang dialokasikan untuk masing-masing fakultas, misalnya: Fak. Ilmu Komputer : 10.10.25.0/24 Fak. Ilmu Budaya : 10.10.40.0/24 Fak. Psikologi : 10.10.64.0/24 Fak. Teknik : 10.10.96.0/24 Fak. Ekonomi : 10.10.112.0/24 Fak. Ilmu Sosial & Politik : 10.10.56.0/24 Fak. Hukum : 10.10.72.0/24 Fak. Kes.Masyarakatan : 10.10.128.0/24 Fak. Ilmu Keperawatan : 10.10.153.0/24 Fak. MIPA : 10.10.160.0/24 Fak. Kedokteran : 10.10.4.0/24 Fak. Kedokteran Gigi : 10.10.16.0/24 VPN client hanya dapat mengakses network yang ada di fakultas masing-masing, misalnya VPN client FASILKOM dengan IP 10.10.25.0/24 hanya dapat mengakses ke network FASILKOM 152.118.25.0/24, 152.118.26.0/24, 152.118.27.0/24,...,152.118.31.0/24. IP network FASILKOM tersebut akan otomatis di-push ketika VPN client berhasil autentikasi. Namun, metode push routing ini masih memiliki kekurangan, terutama jika client menambahkan tabel routing untuk suatu network secara manual, mereka tetap dapat mengakses ke network tersebut. Oleh karena itu, perlu dibuat satu RULES FIREWALL di VPN server agar VPN client hanya dapat mengakses ke network fakultas mereka saja. Setiap client yang akan melakukan koneksi VPN bisa menggunakan certificatenya masing-masing dan certificate ini di-generate oleh admin(PPSI)di mesin server. Meskipun beberapa user sekaligus dapat menggunakan 1 certificate untuk koneksi ke VPN server.

Instalasi OpenVPN
Bagian ini menjelaskan tutorial mengenai instalasi openvpn server. Kebutuhan: - OpenVPN + Source Code-nya - OpenVPN Auth-LDAP(http://code.google.com/p/openvpn-auth-ldap/) Instalasi: - Install OpenVPN dari repository Debian. root@localhost:# apt-get install openvpn - Download source code openvpn(liat di http://kambing.ui.edu/debian/pool/ main/o/openvpn )

root@localhost:# wget http://kambing.ui.edu/debian/pool/main/o/openvpn/ openvpn_2.0.9.orig.tar.gz - Download OpenVPN Auth-LDAP di http://openvpn-auth-ldap.googlecode.com/ files/auth-ldap-2.0.3.tar.gz - Ekstrak source code OpenVPN dan Auth-LDAP root@localhost:# tar -xzvf openvpn_2.0.9.orig.tar.gz root@localhost:# tar -xzvf auth-ldap-2.0.3.tar.gz - Pindah ke direktori "auth-ldap-2.0.3" dan jalankan perintah berikut: root@localhost:# ./configure --with-openvpn=/path/to/openvpn/sourcecode root@localhost:# make && make install Konfigurasi: - Berikut contoh konfigurasi OpenVPN server: File /etc/openvpn/ppsi.conf local 0.0.0.0 port 1200 proto udp dev tun ca keys/ca.crt cert keys/core.crt key keys/core.key #secret file dh keys/dh1024.pem ;server 192.168.90.0 255.255.255.0 server 152.118.222.0 255.255.255.0 ifconfig-pool-persist /var/log/openvpn/ipp.txt push "route 192.168.35.0 255.255.255.0" push "route 152.118.37.0 255.255.255.0" push "dhcp-option DNS 152.118.24.2" keepalive 10 120 cipher AES-128-CBC # AES comp-lzo user nobody group nogroup persist-key persist-tun status /var/log/openvpn/openvpn-status.log log-append /var/log/openvpn/openvpn.log verb 4 mute 20 client-cert-not-required username-as-common-name plugin /usr/local/lib/openvpn-auth-ldap.so /etc/openvpn/ppsi.auth File /etc/openvpn/ppsi.auth: <LDAP> URL ldap://localhost Timeout 15 FollowReferrals yes </LDAP> <Authorization> BaseDN "ou=PPSI,ou=Universitas

Indonesia,o=Universitas Indonesia, c=ID" SearchFilter "(&(objectClass=posixAccount)(uid=%u)(hasAccessTo=makara.cso.ui.ac.id))" RequireGroup false </Authorization> - Berikut contoh konfigurasi OpenVPN client: client dev tun proto udp remote 152.118.24.58 1194 resolv-retry infinite nobind cipher AES-128-CBC persist-key persist-tun ca keys/ca.crt cert keys/client.crt key keys/client.key comp-lzo verb 3 auth-user-pass - Pembuatan certificate di server bisa menggunakan cara berikut: root@localhost:# cp /usr/share/doc/openvpn/examples/easy-rsa/ /etc/openvpn root@localhost:# cd /etc/openvpn/easy-rsa root@localhost:# . ./vars root@localhost:# ./clean-all root@localhost:# ./build-ca root@localhost:# ./build-key-server server root@localhost:# ./build-key client --> certificate untuk client root@localhost:# ./build-dh - Jalankan service OpenVPN menggunakan perintah /etc/init.d/openvpn start Static Route Untuk Network OpenVPN OpenVPN server akan berfungsi sebagai "router" bagi client VPN, jadi fungsi routing(mungkin lebih tepat forwarder) di VPN server harus diaktifkan: root@localhost:# echo 1 > /proc/sys/net/ipv4/ip_forward Dan semua network VPN harus dirouting static di router(router dalam hal ini adalah mesin router bagi VPN server, jika VPN server memiliki IP 152.118.24.58/24, maka tambahkan static routing di router 152.118.24.1): root@localhost:# vtysh (ini klo pake Quagga) Router# conf t Router(conf)# ip route 152.118.222.0/24 152.118.24.58

Anda mungkin juga menyukai