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

{{#ifeq:{{PAGENAME}}|Special:Undelete| |{{#if:|

}} {{#ifeq:{{NAMESPACE}}|Wikipedia|{{#switch:{{NAMESPACE}}|= |
}}|{{error:not substituted|Archive header}}
}}}} {{#if:|
}}
width = "100%"
colspan="3" align="center" | Computing desk
width="20%" align="left" | < April 9

! width="25%" align="center"|<< Mar | April | May >>

! width="20%" align="right" |{{#ifexist:Wikipedia:Reference desk/Archives/Computing/2016 April 11|April 11|Current desk}} >

align=center width=95% style="background: #FFFFFF; border: 1px solid #003EBA;" cellpadding="8" cellspacing="0"
style="background: #5D7CBA; text-align: center; font-family:Arial; color:#FFFFFF;" | Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is {{#ifexist:Wikipedia:Reference desk/Archives/Computing/2016 April 20|an archive page|a transcluded archive page}}. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.

__TOC__

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