Netplan - jhu-information-security-institute/NwSec GitHub Wiki

  • Configuration files are *.yaml and located in /etc/netplan folder
  • Bring an interface down using: $ sudo ip link set <interface> down
  • Bring an interface up using: $ sudo ip link set <interface> up
  • Apply changes from *.yaml using: $ sudo netplan apply
  • Query netplan configuration using: $ netplan get all

Netplan uses systemd-resolvd for name resolution and the /etc/resolve.conf file is usually a symlink to /run/systemd/resolve/stub-resolv.conf. The stub-resolv.conf uses 127.0.0.53 for loopback interfaces. Nameservers defined in /etc/netplan/*.yaml files are written to /run/systemd/resolve/resolv.conf. You can redirect /etc/resolv.conf to point to /run/systemd/resolve/resolv.conf as follows.

$ sudo unlink /etc/resolv.conf
$ sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
$ sudo systemctl restart systemd-resolved.service 

Useful links:

⚠️ **GitHub.com Fallback** ⚠️