1- SSH your device
2- cd /etc/persistent
3- vi rc.poststart
4- Make sure you use Insert and paste the content down here
5- Edit with your values
6- ESC, :wq (saves with vi)
7- save (saves permanently on flash)
8- reboot and enjoy
#CONTENTS OF /etc/persistent/rc.poststart
killall pptp
killall pppd
killall pwdog
rm -rf /etc/ppp/peers/xdccxdcc
rm -rf /etc/ppp/chap-secrets
rm -rf /etc/ppp/reconnect-script
mkdir /etc/ppp/peers/
touch /etc/ppp/peers/xdccxdcc
touch /etc/ppp/chap-secrets
touch /etc/ppp/reconnect-script
chmod +x /etc/ppp/reconnect-script
chmod 0600 /etc/ppp/chap-secrets
cat << EOF > /etc/ppp/peers/xdccxdcc
pty "pptp HOSTNAME --nolaunchpppd"
noproxyarp
ipparam xdccxdcc
remotename xdccxdcc
name USERNAME
require-mppe-128
nobsdcomp
nodeflate
lock
noauth
refuse-eap
mtu 1400
mru 1400
EOF
cat << EOF > /etc/ppp/chap-secrets
USERNAME xdccxdcc PASSWORD *
EOF
cat << EOF > /etc/ppp/reconnect-script
killall pptp
killall pppd
sleep 5
pppd call xdccxdcc
sleep 40
ping -c 5 10.147.147.1 &
sleep 20
killall ping
exit 0
EOF
echo "route add -net 192.168.27.0 netmask 255.255.255.0 gw 10.147.147.1 dev ppp0" >> /etc/ppp/ip-up
echo "route add -net 10.147.147.0 netmask 255.255.255.0 gw 10.147.147.1 dev ppp0" >> /etc/ppp/ip-up
/bin/pwdog -d 60 -p 140 -c 4 -m 300 -e "cd /etc/ppp && ./reconnect-script" 10.147.147.1 &
pppd call xdccxdcc &