
The output will look something like this (though it may be much longer than this tiny snippet): tcpdump: verbose output suppressed, use -v or -vv for full protocol decode You should now have a fair amount of information in your terminal, which shows how packets are being routed on your VPN connection. After you get a little bit of output, press control-C to kill the program. If you don’t get any output, connect to an app or website that you know is routed through the VPN by default to generate some VPN traffic. Running ifconfig after logging in to the VPN will give you a list of all interfaces on your system.) If it’s different, adjust the command accordingly. (I assume your VPN interface is called tun0. To get a list of IP addresses to guess from, run a command like the following while you are connected to your VPN: sudo tcpdump -n -i tun0 The first thing you need to do is identify the IP address of your VPN gateway. Still, I can’t guarantee that this will work for you if you run an obscure, ultra-customized distribution. They should work on any other mainstream Linux distribution, too, since we are working from the command line and nothing in this guide is Ubuntu-specific.

It doesn’t matter which client you use to connect, or which type of VPN server you’re connecting to.įor the record, I’ll also note that I only tested these steps on Ubuntu Linux. The steps below assume that you are already logged in to your VPN service. Fortunately, it’s easy enough to change your default gateway on Linux by manually reconfiguring routing tables. It keeps the load on the company’s VPN server light.īut sometimes, you want all of your traffic to go through the VPN, even if that is not how it is set up by default. This configuration dramatically reduces the amount of traffic that ends up going through the VPN.

For example, if you have a company VPN, the default setting might be to route traffic through the VPN gateway only when connecting to your company’s apps or sites. If this happens, it’s probably because your VPN provider configured the default connection settings so that only certain traffic goes through the VPN.

The VPN gateway is used only for routing traffic through specific hosts.

Instead, your default gateway remains the gateway of your local LAN. When you connect to a VPN, the VPN gateway may not become the default gateway for all of your Internet traffic.
