1

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.

David Parks
  • 2,586

0 Answers0