Set container DNS from the VLAN tag via a network profile (incl. DHCP) #2

Merged
l.kirchner merged 2 commits from network-profiles into main 2026-06-07 21:25:27 +02:00
Showing only changes of commit 3a805b8bda - Show all commits
+19
View File
@@ -0,0 +1,19 @@
# lib/networks.conf — network profiles for proxmox-scripts
#
# Maps a VLAN tag to the DNS servers that network uses, so every LXC gets the
# right resolvers automatically — even when it pulls its IP via DHCP. This is
# looked up by lib/build.func from the VLAN tag entered during installation.
#
# To add a network, add one line. Columns are whitespace-separated:
#
# tag VLAN tag entered at install time. Use "none" for the untagged
# network (i.e. when the VLAN prompt is left empty).
# subnet CIDR of the network. Informational — shown during install.
# dns DNS servers, comma-separated (no spaces).
#
# Precedence note: an explicit NAMESERVER=... passed via env always wins over
# the profile. The profile only fills in DNS when none was given by hand.
#
# tag subnet dns
none 192.168.0.0/24 192.168.0.4,192.168.0.5
20 10.11.20.0/24 10.11.20.44,10.11.20.55