Setup VPN server (PPTP on RedHat Enterpeise-5)

2

VPN  Serve is giving us the facility to work from one network as a member of another network using public network.There are mainly 3 types of VPN servers:  (PPTP), (L2TP) and Open VPN. We are using point to point.

Lets Start….

 

#yum install ppp

#rpm -ivh pptpd-1.3.4-2.rhel5.x86_64.rpm

#vi /etc/sysctl.conf

net.ipv4.ip_forward = 1

1

:wq

Now create username & password file in chap-secrets

#vi /etc/ppp/chap-secrets

 chap

# vi /etc/ppp/options.pptpd

 options

vi /etc/pptpd.conf

you can see there are two section

localip ——-This is for your VPN server IP.Add your using IP for this server.
remoteip —-any ip range what you want to provide.

 pptpd

now add VPN firewall rules…………………..

#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

#service pptpd restart

Now If you are using router then do port forwarding  by enable  1723 port for incoming request for your vpn server. In your router you can found a forwarding option.

service port:1723

ip address:(VPN SERVER IP) in which you are installing  vpn server.

protocol:all

…………………

Now you can connect from another nework  to your network.Check by using XP/WIN-7 computer.

If you need pptpd package you can download from below link…..

http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.3.4-2.rhel5.x86_64.rpm

 

Thanks

Raju

 

Share.

About Author

Chakraborty Prijus

Former Asst. Manager (IT) - MGH Group MCA (Masters in Computer Application) From Sikkim Manipal University India. Have 5 years experience In IT field.

2 Comments

  1. pongopal

    thank you for this post . please can you write other VPN setting like openvpn, site to site VPN in Linux etc.

Leave A Reply

Powered by themekiller.com