Score:1

Setting just the nameserver on a tunneled nework device

tn flag

I'm using EasyTether to tunnel network traffic over USB through my phone. It works great.

$ ifconfig tun-easytether
tun-easytether: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1500
        inet 192.168.117.0  netmask 255.255.255.254  destination 192.168.117.1
        inet6 fe80::f476:bf20:ab51:d533  prefixlen 64  scopeid 0x20<link>
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 500  (UNSPEC)
        RX packets 154278  bytes 156290109 (156.2 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 93661  bytes 13448935 (13.4 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

I would like to set the nameserver on that interface to Google's public 8.8.8.8/8.8.4.4.

After looking through various how-to's on google it seems that I need to configure netplan.

The guides reference a yaml file at /etc/netplan/01-netcfg.yaml. This file doesn't exist for me. Another AskUbuntu question indicated that this file needs to be created by the user (me).

The man page shows some examples of this yaml file, but the use cases don't match mine, so I feel dubious about guessing.

If all I want to do is set the nameserver on this interface, is there a simple bit of yaml I can put in that file that achieves my goal?

My guess would be this:

network:
  version: 2
  renderer: NetworkManager
  ethernets:
    tun-easytether:
      nameservers:
        addresses: [8.8.8.8,8.8.4.4]

But I really really have no idea what I'm doing in that file, so I'm hoping I can find some guidance or a guide that specifically addresses my use case.

heynnema avatar
ru flag
Are you using Ubuntu Desktop or Server? Do you have a network connection profile (normally refers to eth0 or wlan0, or similar) that refers to tun-easytether?
David Parks avatar
tn flag
Desktop, I see network profiles for wired and wifi, but tun-easytether is created by launching EasyTether from the command line. So I assume I have to manually configure these settings.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.