Thursday, October 25, 2018

Script for macOS PPTP VPN

macOS 之下的 VPN GUI 設定已不支援 PPTP, 所以在 macOS 之下要使用 PPTP VPN 需要 DIY.
Sample Script (ex : /etc/ppp/peers/pptpvpn), PPTP Server : Volans Router.

plugin PPTP.ppp
noauth
remoteaddress "IP or Hostname"
user "USERNAME"
password "PASSWORD"
redialcount 1
redialtimer 5
idle 1800
receive-all
novj 0:0
ipcp-accept-local
ipcp-accept-remote
refuse-eap
refuse-pap
refuse-mschap-v2
hide-password
mppe-stateless
looplocal
nodetach
ms-dns 8.8.8.8
usepeerdns
defaultroute
debug

Ref Link :
https://lemnet.fr/blog/tag/vpn
https://www.cts-llc.net/2017/02/21/pptp-on-osx-just-one-last-time.html
https://smallhacks.wordpress.com/2016/12/20/pptp-on-osx-sierra/
https://malucelli.net/2017/05/16/pptp-vpn-on-macos-sierra/
http://neutrofoton.github.io/blog/2017/11/22/pptp-on-macos/
https://filipmolcik.com/pptp-vpn-on-macos-sierra-and-high-sierra/
https://www.linuxquestions.org/questions/linux-networking-3/pptpd-not-working-ms-chap%5Bv2%5D-auth-not-performed-4175445673/
https://ethancbanks.com/2016/09/26/auto-adding-routes-when-mac-pptp-connection-comes-up/

Notes : remark the “defaultroute” and add following line for connect internet & PPTP VPN  in the same time or ref https://ethancbanks.com/2016/09/26/auto-adding-routes-when-mac-pptp-connection-comes-up/.
sudo route -n add -net 192.168.1.0/24 192.168.1.1

我負責

 ... + ...........  政策 我負責. 負責推卸責任. (阿不然你以為哩...) 聽說 記錯了 請見諒 深感抱歉.... 抗(國外)疫(苗)中...