How can I set-up a VPN so I loose connection to the Internet if it goes down? I use Ubuntu and have used the network-dialog to use a VPN; but if the VPN goes down, it just switches to the non-VPN (eth0) connection. I would like to "disconnect" from the Internet (only allow connection by VPN) if VPN goes down. Obviously the VPN itself must be directly connected, but everything else should go through VPN.
Alternatively, is it possible to set-up a virtual-computer (I'm semi-comfortable with VirtualBox) in this way? Or perhaps a way to limit Internet-access to VPN-only for just certain programs?
I guess routing or iptables would be the obvious way to do it, but I really don't know where to start. I've seen some tutorials for setting-up a VPN-connection or ssh-tunnel by manipulating routing, but I don't know if they would work for this.