Skip to content

Instantly share code, notes, and snippets.

@aliosa27
Forked from holms/OSX-vpn.md
Created January 9, 2018 01:38
Show Gist options
  • Save aliosa27/a4cfc09959adb52929787d09ba6fd013 to your computer and use it in GitHub Desktop.
Save aliosa27/a4cfc09959adb52929787d09ba6fd013 to your computer and use it in GitHub Desktop.
Working Debian PPTP VPN for OSX client

PPTP VPN Server setup on Debian, for OSX/iOS clients.

sudo aptitude install pptpd 

sudo cat > /etc/pptpd.conf << EOF
localip 192.168.240.1
remoteip 192.168.240.2-9
EOF

sudo cat > /etc/ppp/pptpd-options << EOF
ms-dns 208.67.222.222 # opendns
ms-dns 208.67.220.220
mtu 800 # lowered down mtu and mru or else osx connection drops
mru 800
EOF

echo "YOUR_USERNAME pptpd YOUR_PASSWORD *" | sudo tee -a /etc/ppp/chap-secrets
sudo /etc/init.d/pptpd restart

sudo cat > /etc/sysctl.conf << EOF
net.ipv4.ip_forward=1
EOF

sudo sysctl -p

sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

# edit /etc/rc.local
# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
# exit 0

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