How to SETUP PPTP CLIENT in LINUX
How to Setup PPTP Client on CENTOS 7
![]() |
| VPN |
The Point-to-Point Tunneling Protocol (PPTP) is a method for implementing virtual private networks. Since it is marked as non secure and vulnerable, I don’t recommend it as a “final” VPN solution. The main reason for its popularity is probably the native MS Windows support (since win 95). Also, it can be easily implemented with Mikrotik RouterOS (like I said, use it for internal VPNs only).
To set up your CentOS 7 as a PPTP clients you will need the pptp package.
[root@linggeh /]#yum install -y pptp
Open /etc/ppp/chap-secrets and add the next line (at the end). Also, replace the UserName and password with the correct details:
[root@linggeh /]# nano /etc/ppp/chap-secrets
userName PPTP password *linggeh PPTP 123123 *
Create profile file
[root@linggeh /]# nano /etc/ppp/peers/myVPN
and paste the next content (replace IP_OR_HOSTNAME with PPTP server IP or Hostname)
pty "pptp IP_OR_HOSTNAME --nolaunchpppd"name userNameremotename PPTPrequire-mppe-128file /etc/ppp/options.pptpipparam myVPN
Save the file and test the connection with
[root@linggeh /]#pppd call myVPN
ifconfig should return something like
....ppp0 Link encap:Point-to-Point Protocolinet addr:10.16.18.252 P-t-P:10.16.18.251 Mask:255.255.255.255UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1436 Metric:1RX packets:14 errors:0 dropped:0 overruns:0 frame:0TX packets:15 errors:0 dropped:0 overruns:0 carrier:0collisions:0 txqueuelen:3RX bytes:2192 (2.1 KiB) TX bytes:631 (631.0 b)...
If you check your routes, you’ll probably notice that ppp0 connection is not used by any route(s). This is default behavior and you can easily switch/add default route with:
route add default dev ppp0
In my case, I don’t want to route the complete traffic (this VPN is just for management) so I’ll add only one static route
route add -net 192.168.0.0/16 dev ppp0
To start this connection on boot, add “pppd call myVPN” in rc.local.
Thank for Reading *-*

0 comments:
Post a Comment