Images

Installer PPTP VPN On CentOS 6_x86/64 bit

1. Pastikan PPP sudah enabled

cat /dev/ppp

jika muncul pesan seperti dibawah ini artinya PPP sudah enabled

cat: /dev/ppp: No such device or address

2. Download Auto installnya

wget http://www.rockia.com/dl/pptpd6.sh

chmod +x pptpd6.sh

./pptpd6.sh
3. Jika Sudah muncul pesan seperti ini

VPN service is installed, your VPN username is vpn, VPN password is ${pass}
Artinya proses install telah selesai

4. Untuk menambah/mengedit user & pass
nano /etc/ppp/chap-secrets
5. Jika muncul Pesan eror sepertin ini saat proses instalasi
iptables: Saving firewall rules to /etc/sysconfig/iptables: /etc/init.d/iptables: line 274: restorecon: command not found 
 masukan perintah ini

yum install policycoreutils
 Kalau ngak bisa browsing tinggal set ip tablenya
nano /etc/sysconfig/iptables-config

set configure iptables :
iptables -t nat -A POSTROUTING -j SNAT --to-source <IP VPS>
buat 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
#service pptpd start
-------------------------------------------------------------------------------------------
ifconfig cek eth0 apa venet0
eth0 KVM venet0 OPVZ
nano /etc/ppp/options.pptpd
default aja
nano /etc/pptpd.conf
default aja
nano /etc/sysctl.conf
net.ipv4.ip_forward = 1
IPTABLES
iptables -A INPUT -i venet0 -p tcp --dport 1723 -j ACCEPT
iptables -A INPUT -i venet0 -p gre -j ACCEPT
iptables -t nat -A POSTROUTING -j SNAT --to-source IPVPS
iptables -A FORWARD -i ppp0 -o venet0 -j ACCEPT
iptables -A FORWARD -i venet0 -o ppp0 -j ACCEPT
#service iptables save
#service iptables restart