PPTP VPN setup on CentOS 6.4

22 Nov No Comments

There’re three models for setting up VPN servers for remote client access as PPTP, L2TP, and OpenVPN. The below is described about the PPTP

1. Installation:

At the “root” privilege,

Installing PPP
#yum install ppp
To install pptpd
#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

To check the latest version of pptpd, please visit http://poptop.sourceforge.net/yum/stable/packages/

2. Configuration

#vi /etc/pptpd.conf
localip 192.168.0.1
remoteip 192.168.0.101-200
Setting the above addresses for PPTP access clients. 
#vi /etc/ppp/options.pptpd
ms-dns 8.8.8.8
ms-dns 4.4.4.4
Setting the above DNS servers
#vi /etc/sysctl.conf
net.ipv4.ip_forward = 1
Setting the network forwarding
#sysctl -p
To apply the network forwarding

3. Firewall Configuration

#iptables -A INPUT -p tcp -m state --state NEW --dport 1723 -j ACCEPT
#iptables -A INPUT -i eth0 -p tcp --dport 1723 -j ACCEPT
#iptables -A INPUT -i eth0 -p tcp --dport 47 -j ACCEPT
#iptables -A INPUT -i eth0 -p gre -j ACCEPT
#iptables -t nat -A POSTROUTING -o eth0 -s 192.168.0.0/24 -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

4. Startup PPTP server and To start PPTP Daemon automatically when rebooting next time

#service pptpd restart
#chkconfig pptpd on

Latest Comments

Leave a Reply

相關訊息