From 3a805b8bda5f66b778067982d5a70a24d20531cf Mon Sep 17 00:00:00 2001 From: "l.kirchner" Date: Sun, 7 Jun 2026 21:21:05 +0200 Subject: [PATCH] =?UTF-8?q?Add=20network=20profiles=20file=20(VLAN=20tag?= =?UTF-8?q?=20=E2=86=92=20DNS=20servers)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Data file mapping a VLAN tag to its DNS servers and subnet, so build.func can set the right resolvers from the tag entered at install time — even with DHCP. New networks are a one-line addition here. --- lib/networks.conf | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 lib/networks.conf diff --git a/lib/networks.conf b/lib/networks.conf new file mode 100644 index 0000000..ceca92d --- /dev/null +++ b/lib/networks.conf @@ -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