I'm using a VPN on my PC and I want to limit ALL the internet connections on my PC to go through the VPN, if the VPN gets disconnected I want all my applications to go offline.
How can I accomplish that?
You need to configure a little custom routing on your PC.
Change your local area network settings so that you don't use the local default gateway. After doing this, no applications will be able to access the Internet.
Then, configure a route to your VPN server's IP via your local gateway. Now you'll be able to hit only the VPN server across the Internet.
Then, setup your VPN connection to set your machine's default gateway when it's up.
Now, when your VPN goes down, you won't have a default route to the Internet, so packets will stop going out.
In the advanced TCP/IP properties of the VPN connection, check the "Use default gateway on the remote network" flag; this will route all traffic through the VPN.
If the VPN gets disconnected, the system will resume standard operation and use its primary Internet access; this can't be avoided: if the system couldn't have Internet connectivity without the VPN, it wouldn't be able to establish the VPN connection itself.