I was looking for a solution to connect my Android smartphone and iPad to a PPTP VPN. I found this tutorial by Marthijn van den Heuvel which explained step-by-step how to setup this VPN on Ubuntu server.
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.
ping -c3 10.8.3.0 > pingreport result=`grep "0 received" pingreport` truncresult="`echo "$result" | sed 's/^\(.................................\).*$/\1/'`" if [[ $truncresult == "3 packets transmitted, 0 received" ]]; then pon company-vpn fi
I execute this script every five minutes, by editing the /etc/crontab file and added the following rule:
*/5 * * * * root bash /root/vpn-check.sh
I have three computers: MacBook Pro, Netbook and a PC. They all have their own data. It would be very nice if I had all my files on just one location (e.g. my server). The only problem is: how do I access these files in a secure way. SSH is an option, but does not quite fit my needs. The solution: NFS over a VPN. NFS fulfilled all my needs, but I do not want to open NFS to whole world through my router.
A VPN, gives me access to my home network and makes it possible for me to access all my files in a secure way. My server (an Asus EEE Box) runs Ubuntu Server, and there is a Linux version of OpenVPN! I thought installing OpenVPN should not be that hard; I just need to find the right tutorial.