Buat VPN Centos 6
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
Download Auto installnya:
# wget http://www.rockia.com/dl/pptpd6.sh
# chmod +x pptpd6.sh
# ./pptpd6.sh
Jika Sudah muncul pesan seperti ini
VPN service is installed, your VPN username is vpn, VPN password is ${pass}
Artinya proses install telah selesai.
Untuk menambah/mengedit user & pass
# nano /etc/ppp/chap-secrets
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
SELESAI
*Tested di centos 5 32bit juga bisa.
Bisa juga menngunakan script dibawah ini:
# cat /dev/ppp
# wget http://www.rockia.com/dl/pptpd6.sh
# chmod +x pptpd6.sh
# ./pptpd6.sh
# nano /etc/ppp/chap-secrets
# nano /etc/sysctl.conf
# 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
Semoga bermanfaat.
Tidak ada komentar:
Posting Komentar