Linux
Home / Linux / Lab-9 Linux VPN & Routing

Lab-9 Linux VPN & Routing

LANGKAH-LANGKAH KONFIGURASI VPN & ROUTING INTERNET
  1. Install Paket VPN à apt-get install pptpd
    
  2. Konfigurasi VPN : ada 3 file yang harus di konfigurasi
    a. /etc/pptpd.confà file utama pptpd
    

b. /etc/ppp/pptd-optionàKonfigurasi tambahan pptpd


c. /etc/ppp/chap-secrets à Konfigurasi user dan password

3. /etc/init.d/pptpd restast –> retsrat pptpd

Agar PC yang VPN masih dapat internet maka tambahkan konfigurasi di bawah ini :
  1. Root :~ #  nano /etc/sysctl.conf
    
  • Cari kalimat dibawah ini dan hilangkan tanda #
    
    #  net.ipv4.ip_forward=1 sehingga menjadi
    net.ipv4.ip_forward=1
    
  • Lalu simpan.
  1. Kemudian aktifkan ip forwardernya
    
    
    sysctl -w net.ipv4.ip_forward=1
    
  • Lalu cek ip forwardermya
    
    Root :~ #  cat /proc/sys/net/ipv4/ip_forward
    
  • Jika sudah aktif, maka akan muncul angka 1
  1. Routing server
    
  • iptables –t nat –A POSTROUTING –o eth0 –j MASQUERADE
    
  • iptables –t nat –A POSTROUTING –s 192.168.100.0/24 –j MASQUERADE
    
  • Keterangan: eth0 merupakan NIC yang connect ke internet, cek apakah routing berjalan atau belum.
  • Root :~ #  iptables –t nat –n –L
    
  1. Besar kecil huruf berpengaruh. Kemudian konfigurasi file rc.local
    
  • Root :~ #  nano /etc/rc.local
    
  • Tambahkan konfigurasi routing tadi diatas exit = 0:
  • iptables –t nat –A POSTROUTING –o eth0 –j MASQUERADE
    
  • iptables –t nat –A POSTROUTING –s 192.168.50.0/24 –j MASQUERADE
    
  • kemudian simpan.
  1. lalu simpan konfigurasi IP Tables/Perintah Routing
    
    
    Root :~ #  iptables-save > /etc/iptables.conf
    
  2. Update service jaringan yang baru dikonfigurasi, dan Selesai…
    
    
    Root :~ #  /etc/init.d/networking restart
    

Related Posts

error: Content is protected !!