Wikipedia:Reference desk/Archives/Computing/2016 April 10

= April 10 =

Ubuntu Networking Question on changing default interface
I'm trying to setup a VPN connect on Ubuntu.

Before connecting the VPN, my route list (by running the "ip route list" command) looks like this:

default via 192.168.10.1 dev enp2s0 default via 192.168.10.1 dev enp2s0 proto static  metric 100 169.254.0.0/16 dev enp2s0 scope link  metric 1000 192.168.10.0/24 dev enp2s0 proto kernel  scope link  src 192.168.10.10  metric 100

After connecting the VPN, the route list becomes: default via 192.168.10.1 dev enp2s0 proto static  metric 100 AAA.AAA.AAA.AAA via 192.168.10.1 dev enp2s0 src 192.168.10.10 169.254.0.0/16 dev enp2s0 scope link  metric 1000 192.168.1.0/24 dev tun0 scope link 192.168.10.0/24 dev enp2s0 proto kernel  scope link  src 192.168.10.10  metric 100

The tun0 line means it's successfully connected. But how do I make that my default route?

My understanding is that the first line, starting with "default via..." is the one that determines which network interface is my default interface. Both before and after connecting the VPN my default interface is enp2s0, the ethernet port. Even after connecting to the VPN my traffic still goes directly through the ethernet port. How do I set tun0 as my default interface? Johnson&#38;Johnson&#38;Son (talk) 02:28, 10 April 2016 (UTC)