LANGKAH-LANGKAH KONFIGURASI VPN & ROUTING INTERNET
-
Install Paket VPN à apt-get install pptpd
-
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 :
-
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.
-
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
-
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
-
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.
-
lalu simpan konfigurasi IP Tables/Perintah Routing Root :~ # iptables-save > /etc/iptables.conf
-
Update service jaringan yang baru dikonfigurasi, dan Selesai… Root :~ # /etc/init.d/networking restart