- Cek dan pastikan PPP aktif
cat /dev/ppp
Jika output seperti dibawah ini berarti sudah aktif
cat: /dev/ppp: No such device or address
- Install PPTPD VPN Server
yum install ppp
wget http://poptop.sourceforge.net/yum/stable/rhel5/i386/pptpd-1.3.4-2.rhel5.i386.rpm
rpm -ivh pptpd-1.3.4-2.rhel5.i386.rpm - Edit IP setttings
nano /etc/pptpd.conf
tambahkan berikut dibawah sendiri
localip 192.168.0.1
remoteip 192.168.0.101-200
Simpan dan exit - Menambahkan DNS servers
nano /etc/ppp/options.pptpd
ms-dns 8.8.8.8
ms-dns 4.2.2.1
Uncomment ‘ms-dns’ dan ganti dns sesuai selera
lalu simpan dan exit - Menambahkan user account untuk menentukan username and password
nano /etc/ppp/chap-secrets
# Secrets for authentication using CHAP
# client server secret IP addresses
tes1 pptpd password *
Simpan dan exit - Setup Forwarding (Enable network forwarding)
nano /etc/sysctl.conf
Ganti ‘net.ipv4.ip_forward’ dari 0 jadi 1
net.ipv4.ip_forward = 1
Untuk merubahnya bisa juga dengan:
sysctl -p
- Untuk Configure iptables to do NAT
Untuk XEN/Dedicate:iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Untuk OpenVZ:
iptables -t nat -A POSTROUTING -o venet0 -j SNAT –to-source x.x.x.x
Ganti x.x.x.x dengan IP Server - Membuat NAT rule untuk iptables to configure firewall
iptables -A INPUT -i eth0 -p tcp –dport 1723 -j ACCEPT
iptables -A INPUT -i eth0 -p gre -j ACCEPT
iptables -A INPUT -m state –state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -i ppp+ -o eth0 -j ACCEPT
iptables -A FORWARD -i eth0 -o ppp+ -j ACCEPT
service iptables save
service iptables restart - Start PPTP VPN server
service pptpd start
Sunday, June 22, 2014
Cara Install PPTP VPN di CentOS 5 VPS
By edy on Sunday, June 22, 2014
Tutorial Cara Install PPTP VPN server di vps CentOS 5 32bit XEN
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment