1. Halo Guest, pastikan Anda selalu menaati peraturan forum sebelum mengirimkan post atau thread baru.

Tutorial VPN - Step by Step (included Screen Shoot)

Discussion in 'Hosting & Domain' started by teguhaditya, Aug 26, 2012.

  1. teguhaditya

    teguhaditya Super Hero

    Joined:
    Jan 23, 2008
    Messages:
    7,503
    Likes Received:
    1,418
    Location:
    _ ▂ ▃ ▅ ▆ █
    Untuk dapat menjalankan aplikasi VPN diperlukan VPS. Sebelum memulai tutorial ini, silahkan beli dulu VPS nya, atau bisa beli VPS Unmanaged lewat saya.

    OK, saya anggap semuanya yang ikut tutorial ini punya VPS yang mengizinkan koneksi tun/tap dari komputer kita ke vps nya.

    Setelah anda membeli VPS, biasanya anda pemperoleh control panel vps, dalam hal ini SolusVM.

    Pada contoh ini saya menggunakan VPS dengan sistem operasi Centos 5.8 x86_64

    Silahkan anda login, lalu aktifkan fitur tun/tap nya

    [​IMG]

    Klik Enable Tun/Tap

    [​IMG]

    Setelah di klik nanti akan muncul notifikasi TUN/TAP Enabled

    Buka aplikasi putty dari komputer anda, jika tidak punya anda bisa download dari sini
    Code:
    http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
    Masukan alamat IP VPS yang telah kita beli ke kolom hostname yang ada di putty

    [​IMG]

    Nanti akan muncul form login as, masukan root sebagai username, dan masukan password sesuai dengan yang kita peroleh dari provider VPS.

    [​IMG]

    ikuti petunjuk berikut

    Code:
    wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
    [​IMG]

    Code:
    rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
    Code:
    rpm -K rpmforge-release-0.5.2-2.el5.rf.*.rpm
    Code:
    rpm -i rpmforge-release-0.5.2-2.el5.rf.*.rpm
    [​IMG]

    Code:
    yum install openvpn
    [​IMG]

    Pas ada pertanyaan download, ketik y, terus enter

    [​IMG]

    OpenVPN dan aplikasi pendukungnya akan otomatis terinstall.

    Lalu ikuti perintah berikut ini


    Code:
    cp -r /usr/share/doc/openvpn-2.2.2/easy-rsa/ /etc/openvpn/
    Code:
    cd /etc/openvpn/easy-rsa/2.0/
    Code:
    chmod +x *
    [​IMG]

    Selanjutnya setup openvpn

    Code:
    source ./vars
    Code:
    ./vars
    Code:
    ./clean-all
    [​IMG]

    Tahap selanjutnya generate ca.crt

    Code:
    ./build-ca
    pada tahap ini, kita cukup enter enter saja, biarkan secara default, kecuali untuk Common Name (eg, your name or your server's hostname) [changeme] isi dengan vpn, dan selanjutnya cukup enter enter saja

    [​IMG]

    Code:
    ./build-key-server server
    Selanjutnya adalah menggenerate server.key

    Pada tahap ini pun sama, cukup enter enter saja
    [​IMG]

    kalau ada pertanyaan, cukup tekan y, setelah itu enter

    [​IMG]

    Selanjutnya build dh

    Code:
    ./build-dh
    nanti muncul titik-titik panjang, sampe akhirnya mentok dan berhenti

    [​IMG]

    Kopi seluruh isi konfigurasi yang telah di generate ke folder key openvpn

    Code:
    cp -r /etc/openvpn/easy-rsa/2.0/keys/ /etc/openvpn/keys/
    pindah ke folder openvpn

    Code:
    cd /etc/openvpn/
    buat file konfigurasi server

    Code:
    cat > server.conf <<END
    dev tun*
    END
    [​IMG]

    buat file konfigurasi port

    Code:
    cat > 443tcp.conf <<END
    port 443
    proto tcp
    dev tun
    ca /etc/openvpn/keys/ca.crt
    cert /etc/openvpn/keys/server.crt
    key /etc/openvpn/keys/server.key
    dh /etc/openvpn/keys/dh1024.pem
    plugin /usr/share/openvpn/plugin/lib/openvpn-auth-pam.so /etc/pam.d/login
    client-cert-not-required
    username-as-common-name
    server 10.9.8.0 255.255.255.0
    ifconfig-pool-persist ipp.txt
    push "redirect-gateway def1"
    push "dhcp-option DNS 203.201.51.4"
    push "dhcp-option DNS 203.201.51.6"
    keepalive 5 30
    comp-lzo
    persist-key
    persist-tun
    status server-tcp.log
    verb 3
    END
    [​IMG]

    aktifkan IPv4 forwarding

    Code:
    echo 1 > /proc/sys/net/ipv4/ip_forward
    seting routing

    Code:
    iptables -t nat -A POSTROUTING -s 10.9.8.0/24 -o venet0 -j SNAT --to 103.23.241.111
    nyalakan openVPN

    Code:
    service openvpn start
    [​IMG]

    OpenVPN sudah aktif.

    sekarang tinggal buat konfigurasi untuk klien

    pindah ke folder keys

    Code:
    cd keys
    buat konfigurasi klien

    Code:
    cat > 443tcp.ovpn <<END
    client
    dev tun
    proto tcp
    remote 103.23.241.111 443
    resolv-retry infinite
    route-method exe
    resolv-retry infinite
    nobind
    persist-key
    persist-tun
    ca ca.crt
    auth-user-pass
    comp-lzo
    verb 3
    END
    
    [​IMG]

    sekarang buat paket tar.gz file konfigurasi tersebut

    Code:
    tar -czvf config.tar.gz ca.crt 443tcp.ovpn
    kopi kan file konfig ke direktori default apache, supaya kita bisa download file konfig tersebut ke komputer klien

    Code:
    cp config.tar.gz /var/www/html/
    kita tinggal download file konfig tersebut dari vps ke komputer dengan url

    Code:
    http://alamatip/config.tar.gz
    misal
    Code:
    http://192.168.1000.1./config.tar.gz
    [​IMG]

    tahap selanjutnya membuat user login

    misalnya kita ingin membuat user login teguh

    Code:
    adduser teguh -m -s /bin/false
    set password untuk login teguh

    Code:
    passwd "teguh"
    masukan password 2 kali

    [​IMG]

    tahap berikutnya, download aplikasi openvpn untuk komputer kita

    Code:
    http://swupdate.openvpn.org/community/releases/openvpn-2.2.2-install.exe
    terus install, next, next, next sampe finish.

    setelah terinstall, download file konfig yang sudah kita siapkan sebelumnya

    Code:
    http://192.168.1000.1./config.tar.gz
    extract konfig tersebut ke \Program Files\OpenVPN\config\

    terus, buka aplikasi openvpn nya, kalau di windows vista atau windows 7 harus run as administrator

    [​IMG]

    sambungkan koneksi ke vps anda

    [​IMG]

    masukan username dan password

    [​IMG]

    tekan ok, dan komputer anda terkoneksi ke vps via VPN
     
    Last edited: Aug 26, 2012
    tigis, wombie, ipank78 and 44 others like this.
  2. supriyadieka

    supriyadieka Super Hero

    Joined:
    Aug 11, 2010
    Messages:
    6,612
    Likes Received:
    377
    Location:
    Gunungkidul
    malam-malam udah kasih panduan lengkap. sipp.. ikut mempelajari dulu suhu.
     
    boboho likes this.
  3. menilajah

    menilajah Super Hero

    Joined:
    Mar 29, 2011
    Messages:
    3,390
    Likes Received:
    582
    Location:
    BE 64 UL BandarLampung-ID
    Keren ah, wajib dikasih like :D
     
  4. rihsano

    rihsano Ads.id Pro

    Joined:
    Mar 5, 2012
    Messages:
    314
    Likes Received:
    9
    Location:
    Depan Kompi Jadul
    mantasp mastah :) .
     
  5. rajawali

    rajawali Super Hero

    Joined:
    Sep 20, 2010
    Messages:
    1,542
    Likes Received:
    82
    Location:
    Kota Semarang, Indonesia
    Nah kalau yang ini lebih cuetho. Gamblang.
     
    Last edited: Aug 27, 2012
  6. Schwarzkophf

    Schwarzkophf Super Hero

    Joined:
    Nov 13, 2008
    Messages:
    2,318
    Likes Received:
    71
    Location:
    Depok
    mantab, ini ane tunggu ..
    sebenernya ane lebih cari cara setting VPNnya di VPS sih :senyum:

    Btw, VPSnya pake RAM brp om yg bagus?
     
  7. Brave Puree

    Brave Puree Newbie

    Joined:
    Aug 27, 2012
    Messages:
    32
    Likes Received:
    2
    Location:
    Bukit Timah
    Bisa untuk VPN modem ? kalau begitu mantap sekali ini.
     
  8. alhijr

    alhijr Super Hero

    Joined:
    Feb 27, 2010
    Messages:
    4,392
    Likes Received:
    862
    Location:
    PIN : 7568977
    simpen dulu ke word deh...... , ilmu linux nie
     
  9. ajimuzaqi

    ajimuzaqi Super Hero

    Joined:
    Sep 10, 2010
    Messages:
    1,433
    Likes Received:
    76
    Location:
    fastabiqul Khoirot
    Ijin save mastah... butuh ni,
     
  10. mello

    mello Ads.id Starter

    Joined:
    Jan 23, 2012
    Messages:
    67
    Likes Received:
    0
    Location:
    Depok
    wah dejavu... linux nya udah kelupaan smua skrg :(
     
  11. TheNext

    TheNext Super Hero

    Joined:
    Mar 1, 2011
    Messages:
    2,899
    Likes Received:
    211
    Location:
    Ruang Pikiran
    semua ISP bisa mendukung VPN ini ya bos? :D
     
  12. jokokendil

    jokokendil Hero

    Joined:
    Sep 5, 2010
    Messages:
    528
    Likes Received:
    164
    Location:
    Kudus, Jawa Tengah
    Wah tutorialnya komplet bgt. Thanks bro. like meluncur dah..:D
     
  13. penguin.orange

    penguin.orange Ads.id Fan

    Joined:
    Dec 23, 2011
    Messages:
    189
    Likes Received:
    10
    bener2 maknyuss tutorialnya :)
     
  14. Fauzi2406

    Fauzi2406 Super Hero

    Joined:
    Feb 16, 2009
    Messages:
    1,441
    Likes Received:
    58
    Location:
    Desa Suci
    mantep tutorialnya wajib di like.... :D
     
  15. teukualamsyah

    teukualamsyah Super Hero

    Joined:
    Nov 28, 2010
    Messages:
    1,245
    Likes Received:
    56
    Location:
    Bengkoeloe, Bengkulu, Indonesia, Indonesia
    ini yang ane tunggu-tunggu mas teguh, thanks yah tutornya lengkap. :)
     
  16. Bobthea

    Bobthea Super Hero

    Joined:
    Nov 17, 2008
    Messages:
    1,897
    Likes Received:
    44
    wah.. mantep kang. lengkap banget.. ngan panjang gening nya :lol: like meluncur.
     
  17. teguhaditya

    teguhaditya Super Hero

    Joined:
    Jan 23, 2008
    Messages:
    7,503
    Likes Received:
    1,418
    Location:
    _ ▂ ▃ ▅ ▆ █
    Pada tutorial ini saya pakai vps dengan ram 128mb dengan burstable 256mb.
     
  18. lala.young

    lala.young Newbie

    Joined:
    Mar 21, 2012
    Messages:
    25
    Likes Received:
    0
    share mantaf mastah, kalau pakai debian hampir sama ya mastah..ane blm pernah pakai centos soalnya.Thanks sharenya
     
  19. pancuraji

    pancuraji Super Hero

    Joined:
    Mar 6, 2011
    Messages:
    1,691
    Likes Received:
    55
    Wah keren mastah, dah lama saya cari tutorial lengkap sepertinya ini akhirnya nemu juga.. Selama ini saya cuma beli acoount VPN aja hiks, ntar bikin sendiri aja ah biar bisa jualan sekalian he he.. Thanks mastah sharingnya
     
  20. Schwarzkophf

    Schwarzkophf Super Hero

    Joined:
    Nov 13, 2008
    Messages:
    2,318
    Likes Received:
    71
    Location:
    Depok
    wah kuat ya om ..
    ane dapet VPS gratis dari host1free dgn RAM 128 ga konek2 SSHnya :hmm2:
    Nnti ane coba VPS lain deh om ...
     

Share This Page