Refer to the steps below for installing and configuring VPN server.
---------------------------------------------------------------------------
1. yum install -y ppp
2. cd /usr/local/src
3. wget
http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.3.4-2.rhel5.i386.rpm4. rpm -ivh pptpd-1.3.4-2.rhel5.i386.rpm
5. vim /etc/ppp/chap-secrets
(Username and password file for your VPN clients)
# Secrets for authentication using CHAP
# client server secret IP addresses
username1 * userpasswd *
username2 * userpasswd *
6. vim /etc/ppp/options.pptpd
(DNS server File to specify your DNS servers IP address here local & public)
ms-dns 8.8.8.8
ms-dns 4.4.4.4
7. vim /etc/pptpd.conf
(This is the actual pptpd server configuration file)
Edit the below lines from the file
localip 192.168.1.50 ------------> this is the VPN server's IP address
remoteip 10.12.168.50-55 --------> This is the VPN clients IP range which you want to give to your clients
8. Configuring Firewall (Very Important Step)
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
9. vim /etc/sysctl.conf
Enable the ip fprwarding its very important in VPN server configuration process
# Controls IP packet forwarding
net.ipv4.ip_forward = 1 -----> By default 0 .. enable it by making it 1
10. service pptpd start / chkconfig pptpd on
11. Monitor your VPN server logs by running the following command
tail -f /var/log/messages