Jump to content

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

From Wikipedia, the free encyclopedia
Computing desk
< April 9 << Mar | April | May >> April 11 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


April 10

[edit]

Ubuntu Networking Question on changing default interface

[edit]

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&Johnson&Son (talk) 02:28, 10 April 2016 (UTC)[reply]