connect to PPTP vpn |
More about pptp vpn here http://en.wikipedia.org/wiki/Point-to-Point_Tunneling_Protocol
And now Simple way how to install PPTP VPN in your vps server (Centos)
1. check PPP active in your server
cat /dev/pppIf message below, your can continue
cat: /dev/ppp: No such device or address2. Install PPTPD VPN Server
yum install ppp3. Edit IP setttings
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
vi /etc/pptpd.confadd line below
localip 10.8.0.1enter custom for more ip address ex 10.8.0.100-200
remoteip 10.8.0.10-20
save and exit.
4. Add DNS Server
vi /etc/ppp/options.pptpdadd line below
ms-dns 8.8.8.8
ms-dns 4.2.2.1
save and exit
5. Now, you can add user account and password
6. Setup Forwarding (Enable network forwarding)
7. Configure iptables to do NAT
If XEN/Dedicate:
8. change NAT rule untuk iptables to configure firewall
9. Start PPTP VPN server
NOTE:
You must add this command in your terminal
Source: http://jadoel.info/2013/08/cara-install-pptp-vpn-di-centos-5-vps/
5. Now, you can add user account and password
vi /etc/ppp/chap-secrets
# Secrets for authentication using CHAPsave and exit
# client server secret IP addresses
username pptpd password *
6. Setup Forwarding (Enable network forwarding)
nano /etc/sysctl.confchange ‘net.ipv4.ip_forward’ from 0 to 1
7. Configure iptables to do NAT
If XEN/Dedicate:
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADEand if OpenVZ:
iptables -t nat -A POSTROUTING -o venet0 -j SNAT –to-source x.x.x.xchange x.x.x.x with your IP Server
8. change 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
iptables -I FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
service iptables save
service iptables restart
9. Start PPTP VPN server
service pptpd startFor log pptp server /var/log/messages
NOTE:
You must add this command in your terminal
iptables -I FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtuif you feel there are website not loading anyway (ex you load speedtest.net, kompas.com, twitter images, or anything website) see there
Source: http://jadoel.info/2013/08/cara-install-pptp-vpn-di-centos-5-vps/
0 komentar