You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ubuntu server persistent auto reconnecting PPTP VPN connection
I have set up a PPTP VPN client on my Ubuntu server. Unfortunately when the server reboots, the connection goes down and stays down. After a long search I found a solution on this website. It is simple bash script, which checks if the VPN server (which had the VPN ip of 10.8.3.0) is pingable. If not it restarts the PPTP VPN connection.
//vi /var/vpn-check.sh
ping -c3 10.0.0.1 > pingreport
result=`grep "0 received" pingreport`
truncresult="`echo "$result" | sed 's/^\(.................................\).*$/\1/'`"
if [[ $truncresult == "3 packets transmitted, 0 received" ]]; then
pon fgvpn
fi
I execute this script every five minutes, by editing the /etc/crontab file and added the following rule: