Skip to content

Latest commit

 

History

History
47 lines (37 loc) · 1.77 KB

File metadata and controls

47 lines (37 loc) · 1.77 KB

Set up systemd-networkd. For single NIC static IP setup, specify the static IP address, gateway address, and DNS server address. For advanced setup, it will copy all configuration files inside the {{ networkd_configs_dir }} to /etc/systemd/network. The configuration file will have permission 640 with owner root and group systemd-network. This is for preventing the leaking of private keys when setting up WireGuard using systemd-networkd.

Tasks

Arch Linux

  • Remove default configuration file created by the [arch_install.sh](arch_install.sh) script.
  • Create a simple static IP configuration (if {{ networkd_configs_dir }} variable is undefined) or copy all configuration files under {{ networkd_configs_dir }} to /etc/systemd/network.

Fedora

  • Install systemd-networkd and enable systemd-resolved.service.
  • Disable NetworkManager.service
  • Create a simple static IP configuration (if {{ networkd_configs_dir }} variable is undefined) or copy all configuration files under {{ networkd_configs_dir }} to /etc/systemd/network.

Debian

  • Install systemd-resolved.service.
  • Remove /etc/network/interfaces configuration.
  • Create a simple static IP configuration (if {{ networkd_configs_dir }} variable is undefined) or copy all configuration files under {{ networkd_configs_dir }} to /etc/systemd/network.

Variables

Single NIC static IP

# NIC name
static_nic: enp1s0

# IP address with its prefix length
static_ip: 192.168.122.2/24

# Gateway address
static_gateway: 192.168.122.1

# DNS server address
static_dns: 9.9.9.9

Advanced setup

# Copy all configuration files under this directory to /etc/systemd/network
networkd_configs_dir: "files/systemd-networkd/"