You can now run your own pptp VPN business from an Ideastack VPS easily. All you will need is Cent OS latest x64.
run update.
yum update
install ppp.
yum install ppp
install PPTPD.
wget http://poptop.sourceforge.net/yum/stable/rhel5/x86_64/pptpd-1.3.4-1.rhel5.1.x86_64.rpm
install this RPM.
rpm -ivh pptpd-1.3.4-1.rhel5.1.x86_64.rpm
edit the config.
nano /etc/pptpd.conf
if nano is not found type down “yum install nano” without the “”.
go all the way to the bottom of the page of pptpd.conf Find.
localip
remoteip
and take out the # that come before them. Only take out one set of # not on both sets of localip and remote ip, because there will be 2. Also change it to this.
localip 10.0.0.1
remoteip 10.0.0.10-100
( without the space in between. ) Ctrl + X to save and exit the file now. Next, lets edit anohter config
/etc/ppp/options.pptpd
next, uncomment the ms-dns lines (by removing the ‘#’ in front of them) So they should look like.
ms-dns 208.67.222.222
ms-dns 208.67.220.220
Ctrl + X to save and exit the file now. Now lets create an account!
nano /etc/ppp/chap-secrets
It should look like this.
# Secrets for authentication using CHAP
# client server secret IP addresses
username * password *
username2 * password2 *
The IP address only uses the IPs that are available, you can specify a dedicated one though if you wish.
Now we must start IP forwarding. So open the file nano /etc/sysctl.conf and set ‘net.ipv4.ip_forward’ to 1.
net.ipv4.ip_forward = 1
To make the changes to sysctl.conf take effect, use the following command.
sysctl -p
Next, lets allow NAT in iptables.
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Next, we need to allow TCP port 1723 and the GRE protocol through iptables.
iptables -A INPUT -i eth0 -p tcp --dport 1723 -j ACCEPT
iptables -A INPUT -i eth0 -p gre -j ACCEPT
These rules are necessary to run traffic through your server.
iptables -A FORWARD -i ppp+ -o eth0 -j ACCEPT
iptables -A FORWARD -i eth0 -o ppp+ -j ACCEPT
Now start the PPTP service, if you have not.
service pptpd start
After you’ve done everything, your VPN server should work fine!
Troubleshooting
If you can’t browse sites or site won’t load, change the MUT. To do this use nano /etc/ppp/ip-up file and just before the last line, add the following line.
/sbin/ifconfig $1 mtu 1400
Save the file and restart the pptpd service.
service pptpd restart
eth0 -j MASQUERADE
Next, we need to allow TCP port 1723 and the GRE protocol through iptables.
iptables -A INPUT -i eth0 -p tcp --dport 1723 -j ACCEPT
iptables -A INPUT -i eth0 -p gre -j ACCEPT
These rules are necessary to run traffic through your server.
iptables -A FORWARD -i ppp+ -o eth0 -j ACCEPT
iptables -A FORWARD -i eth0 -o ppp+ -j ACCEPT
Now start the PPTP service, if you have not.
service pptpd start
After you’ve done everything, your VPN server should work fine!