howto/systemd networkd configuration example

  • Search
  • Home
  • All
  • Files
  • History
  • Latest Changes
  • Home

    • Getting Started
    • Registry Authentication
    • Address Space
    • BGP communities
    • FAQ
  • How-To

    • Wireguard
    • Openvpn
    • IPsec With Public Keys
    • Tinc
    • GRE on FreeBSD
    • GRE on OpenBSD
    • IPv6 Multicast (PIM-SM)
    • SSM Multicast
    • MPLS
    • Bird2
    • FRRouting
    • OpenBGPD
    • Mikrotik RouterOS
    • EdgeRouter
    • Static routes on Windows
    • Universal Network Requirements
    • VyOS
    • NixOS
  • Services

    • IRC
    • Whois registry
    • DNS
    • IX Collection
    • Public DNS
    • Looking Glasses
    • Automatic Peering
    • Repository Mirrors
    • Distributed Wiki
    • Certificate Authority
    • Route Collector
    • Registry
  • Internal

    • Internal services
    • Interconnections
    • APIs
    • Show and Tell
    • Historical services
  • Historical

    • Bird 1
    • Quagga
  • External Tools

    • Paste Board
    • Git Repositories

dn42

systemd-networkd configuration example

This is the config that is used on ZOTAN Networks (AS4242422341). Full network configuration available on my Git (dn42) or alternatively my Git (clear)

Configuration

loopback device (lo.network)

[Match]
Name=lo

[Network]
Address=fdff:b02d:2ef7::2/128

wireguard netdev (dn42p1.netdev)

[NetDev]
Name = dn42p1
Kind = wireguard
Description = WireGuard

[WireGuard]
ListenPort = 42421
PrivateKeyFile = /etc/wireguard/private.key

[WireGuardPeer]
PublicKey = <peer wg pubkey>
Endpoint = <peer wg endpoint>:<peer wg port>
AllowedIPs = 172.16.0.0/12,10.0.0.0/8,fd00::/8,fe80::/10,ff00::/8

wireguard network (dn42p1.network)

[Match]
Name = dn42p1

[Address]
Address = fe80::2342/128 # arbitrary, doesn't need to be unique for each interface
Peer = <peer tunnel linklocal address>/128

[Address]
Address = <your DN42 ipv4>/32
Peer = <peer DN42 ipv4>/32

Hosted by: BURBLE-MNT, GRMML-MNT, XUU-MNT, JAN-MNT, LARE-MNT, SARU-MNT, ANDROW-MNT, MARK22K-MNT | Accessible via: dn42, dn42.dev, dn42.eu, wiki.dn42.us, dn42.de (IPv6-only), dn42.cc (wiki-ng), dn42.wiki, dn42.pp.ua, dn42.obl.ong

Last edited by lare, 2023-04-08 20:08:13