pptpd simple setup
should be in startup script
`iptables -A POSTROUTING -t nat -o ppp+ -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward`
install pptpd apt-get install pptpd
Edit remoteip and ip ranges at /etc/pptpd.conf
edit user accounts at /etc/ppp/chap-secrets
#username server password remote IP addresses
pptpusername pptpd secretpassword 45.45.45.45
Restart the PPtP daemon service pptpd restart
pptpsetup –create –server yourserver.com –username pptpusername –password secretpassword –start
#!/bin/bash
VPNIP=172.16.0.1
TUNNELNAME=miner
ping -c3 $VPNIP> /tmp/pingreport
result=`grep "0 received" /tmp/pingreport`
truncresult="`echo "$result" | sed 's/^\(.................................\).*$/\1/'`"
if [[ $truncresult == "3 packets transmitted, 0 received" ]]; then
pon $TUNNELNAME
fi