Fri 14 Oct 2016 — Fri 19 Jan 2018

Networking on Linux

There is /etc/network/interfaces.

Network Manager

NetworkManager is a helpful thing from Gnome. When it's running, it controls the default route.

It comes with a thing called nm-applet which makes a little network status icon in your bar.

It overrides with /etc/network/interfaces, so you should comment out your devices (except for loopback) from there.

IfUpDown PLugin

There is an ifupdown plugin which lets Network Manager read from /etc/network/interfaces.

You can set managed=true inside /etc/NetworkManager/NetworkManager.conf

I didn't have much success with this.


When you connect to somewhere with VPN, you may need to set up some routes for the IP ranges on your network.

Connecting to the VPN will itself will add some extra routes:

default         *              U     1024   0        0 ppp0      *      UH    0      0        0 ppp0

In this example is the network gateway that we've connected to. You'd see the same address in the ppp0 device if you ran ifconfig.

So this route is telling us that, to get to, we should go through the ppp0 interface.

However, we probably actually want that to happen for the whole range.

route # list existing routes

## Get to the range through the gateway and using the ppp0 device.
sudo route add -net netmask gw dev ppp0

You can also configure these routes in the Network Manager Applet, under IPv4 settings.