You are most likely getting an incorrect routing table from the shutdown of your VPN.
When the lock out occurs, check your routing table,
route -n
delete your default gateway, re-establish your wifi connection. If you do not know ho to delete your gateway, you find below my routing table:
$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
10.0.3.0 0.0.0.0 255.255.255.0 U 0 0 0 lxcbr0
192.168.1.0 0.0.0.0 255.255.255.0 U 9 0 0 wlan0
192.168.1.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0
The Flag UG identifies my default gateway, 192.168.1.1. You can also see that it goes through my ethernet connection, even though I am also connected via wlan0, the wifi.
You delete it by issuing the command
sudo route delete default gw 192.168.1.1
If this fails, you may simply try to restart networking and the network manager:
sudo service networking restart
sudo service network-manager restart
Whichever works for you.
I tried the above and it started me down a track. The above helped me learn something about how it was working, but the solution that worked for me was reconfiguring my resolv.conf, which had left over entries from a crash VPN client.
sudo dpkg-reconfigure resolvconf
Doing this reset it to the default, and it all works again. Thanks for your assistance. – Harry – 2013-10-30T20:54:29.703
It amounts to the same, lol – MariusMatutiae – 2013-10-30T21:15:22.007