If your OS is CentOS/RedHat 5:
If your OS is CentOS/RedHat 6:yum install ppp
cd /usr/local/src
wget http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.3.4-2.rhel5.x86_64.rpm
rpm -Uhv pptpd-1.3.4-2.rhel5.x86_64.rpm
If you are using Ubuntu:yum install ppp
cd /usr/local/src
wget http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.3.4-2.el6.x86_64.rpm
rpm -Uhv pptpd-1.3.4-2.el6.x86_64.rpm
apt-get install pptpd
Step 2. Edit IP setttings in /etc/pptpd.confvi /etc/pptpd.conf
localip 192.168.0.1Step 3. Add user account in/etc/ppp/chap-secrets (assign username and password)
remoteip 192.168.0.101-200
vi /etc/ppp/chap-secrets
usernameForuser1 * setpassword1here *Step 4. Optional settings in /etc/ppp/options.pptpd
usernameForuser2 * setpassword2here *
vi /etc/ppp/options.pptpd
ms-dns 8.8.8.8Step 5. Enable network forwarding in /etc/sysctl.conf
ms-dns 4.4.4.4
vi /etc/sysctl.conf
net.ipv4.ip_forward = 1use the following command to apply the change:
sysctl -p
Step 6. Configure firewall
iptables -A INPUT -i eth0 -p tcp --dport 1723 -j ACCEPT
iptables -A INPUT -i eth0 -p gre -j ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i ppp+ -o eth0 -j ACCEPT
iptables -A FORWARD -i eth0 -o ppp+ -j ACCEPT
service iptables save
service iptables restart
If you are using CSF firewall, you may refer to this post on firewall settings.
Step 7. Start PPTP VPN server
If your OS is CentOS or Redhat, using the following command:
service pptpd restart
To start PPTP Daemon automatically when rebooting next time, use command:
chkconfig pptpd on
If your OS is Ubuntu, you just reboot your machine.
Now you can test the VPN server from any client: Windows PCs, Linux PCs, Android phones/tablets, or iPhone and iPad.
The log of the VPN server, by default, is combined with system log located at /var/log/messages.
This is a helpful guide. Thanks a lot for sharing the details here. I also have to buy a good VPN which is fast and reliable to use and have heard about HMA a lot from my colleagues. It will be great if you can share a detailed hidemyass vpn review for me!
ReplyDelete