When I connect my laptop to the internet by tethering my cellphone connection, I'd like to force it to go over an encrypted VPN. In other words; if the VPN fails, so should the entire connection. This was easy for my 'normal' internet connection:
route delete 0.0.0.0 192.168.1.1 route add -p xx.xx.xx.xx mask 255.255.255.255 192.168.1.1 metric 1
xx.xx.xx.xx is the address of the VPN
This essentially deleted the default route making it impossible to send/recv anything unless the VPN was active. One issue; DHCP. It appears DHCP kept re-adding the default route because once I set a static IP that problem went away.
So there's the kicker; I can't set a static IP for my mobile connection because then it won't connect.
ipconfig said DHCP assigned something along the lines of
10.34.35.77 to IPv4 so that's what I filled in, but it wouldn't connect.
Edit: Oh right, I'm using Windows7.