Skip to content

Instantly share code, notes, and snippets.

@acareccia
Last active August 16, 2025 02:09
Show Gist options
  • Save acareccia/714121cd6d5dd01d3887991fe73835e3 to your computer and use it in GitHub Desktop.
Save acareccia/714121cd6d5dd01d3887991fe73835e3 to your computer and use it in GitHub Desktop.
How to set up PPTP VPN on MacOS 11 Big Sur and 12 Monterey

PPTP VPNs are insecure. But... if you need them and you can't use Windows or pay for another sotware, now you can!

This works on Macos 11 Big Sur and Macos 12 Monterey

  1. Download pptp client sources: https://sourceforge.net/projects/pptpclient/files/pptp/
  2. Optional: xcode-select --install
  3. Execute make
  4. Copy the pptp executable in /usr/local/bin
  5. Create /etc/ppp/chap-secrets:
${username} ${vpn_name} ${password}
  1. Create /etc/ppp/peers/${vpn_name}
pty "/usr/local/bin/pptp ${vpn_ip} --nolaunchpppd"
lock
noauth
refuse-pap
refuse-eap
nobsdcomp
nodeflate
name ${username}
remotename ${vpn_name}
ipparam ${vpn_name}
  1. Create /etc/ppp/ip-up
#!/bin/sh
/sbin/route add -net ${route1} -interface $1
/sbin/route add -net ${route2}  -interface $1
#etc.
  1. Make it executable
sudo chmod +x /etc/ppp/ip-up
  1. connect (you can see all the output in console, remove debug and nodetatch in production mode)
sudo pppd call ${vpn_name} debug nodetach
  1. shutdown (use the appropriate inteface for you)
sudo kill `cat /var/run/ppp1.pid`
@m404x
Copy link

m404x commented Mar 29, 2024

could you explain the ip-up file and give an example on how to correctly configure it?

I am getting something like this:


Fri Mar 29 16:07:26 2024 : rcvd [CHAP Failure id=0x1 "E=691 R=1 C=448C58B854ACA8B8A48CB8F8B4EC88F8 V=0 M=Good luck!"]
Fri Mar 29 16:07:26 2024 : MS-CHAP authentication failed: Good luck!
Fri Mar 29 16:07:26 2024 : sent [LCP TermReq id=0x3 "Failed to authenticate ourselves to peer"]
Fri Mar 29 16:07:26 2024 : Connection terminated.

Thanks.

@acareccia
Copy link
Author

I don't use these vpns anymore, but from your error you need to change the script /etc/ppp/peers/${vpn_name}.
Try with other options, there are many in pptp: like enabling or disabling different compression algos

ip-up purpose is to route only selected ips to your vpn, not all the traffic ${router) is the ip or netmask.

Hope it helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment