Steps to Setup VPN PPTP Client on CentOS7

  1. Install PPTP: sudo yum install pptp pptp-setup
  2. Configuration: sudo pptpsetup –create config –server [server address] –username [username] –password [pwd] –encrypt
    • This command will create a file named config under /etc/ppp/peers/ with server info written inside.
    • This command will also write your username and password into /etc/ppp/chap-secrets
  3. Register the ppp_mppe kernel module: sudo modprobe ppp_mppe
  4. Register the nf_conntrack_pptp kernel module: sudo modprobe nf_conntrack_pptp
  5. Connect to VPN PPTP: sudo pppd call config
    • It will establish PPTP VPN connection. You can type command ip a I grep ppp to find the connection name (e.g. ppp1). No return indicates connection failure.
    • If any error, you can look into /var/log/messages for log info
  6. Check IP routing table info: route -n
  7. Add Network Segment to current connection: route add -net 192.168.1.0 netmask 255.255.255.0 dev ppp1 (192.168.1.0 and ppp1 are taken as example )
  8. You can now ping the destination to check the access
  9. Disconnect the VPN: killall pppd