Browse Source

nixos-module/container/{dns, dhcp-server}: implement internal ipv4 dyndns

master
Astro 1 month ago
parent
commit
fd267085bc

+ 12
- 0
nix/lib/config/legacy.nix View File

@@ -46,6 +46,17 @@ in
46 46
       domainName = dhcpData.string-opts.domain-name;
47 47
     }) pillar.dhcp)
48 48
     { core.ospf.secret = pillar.ospf.secret; }
49
+
50
+    # net priv* settings
51
+    (
52
+      builtins.mapAttrs (netName: _: {
53
+        dynamicDomain = true;
54
+      }) (
55
+        lib.filterAttrs (netName: _:
56
+          builtins.match "priv[[:digit:]]+" netName != null
57
+        ) pillar.hosts-inet
58
+      )
59
+    )
49 60
   ] ++ (
50 61
     map (ctx:
51 62
       builtins.mapAttrs (_: subnet: { subnets6.${ctx} = subnet; }) pillar.subnets-inet6.${ctx}
@@ -99,6 +110,7 @@ in
99 110
         c3d2-anon.ospf.allowedUpstreams = [ "anon1" "freifunk" ];
100 111
       }
101 112
 
113
+      # host priv*-gw settings
102 114
       (
103 115
         builtins.mapAttrs (hostName: _: {
104 116
           ospf.allowedUpstreams = [ "upstream2" "upstream1" "freifunk" ];

+ 27
- 1
nix/nixos-module/container/dhcp-server.nix View File

@@ -1,5 +1,5 @@
1 1
 # ISC DHCP/IPv4 server configuration
2
-{ hostName, config, lib, ... }:
2
+{ hostName, inputs, config, lib, ... }:
3 3
 
4 4
 let
5 5
   dhcpNets =
@@ -21,17 +21,43 @@ in
21 21
         builtins.attrValues (
22 22
           builtins.mapAttrs (net: { dhcp, subnet4Net, subnet4Len, domainName, ...}:
23 23
             ''
24
+              ddns-update-style standard;
25
+              key dyndns {
26
+                algorithm hmac-sha256;
27
+                secret ${inputs.zentralwerk-network-key.lib.dyndnsKey};
28
+              };
29
+              zone ${domainName}. {
30
+                primary ${config.site.net.serv.hosts4.dns};
31
+                primary6 ${config.site.net.serv.hosts6.dn42.dns};
32
+                key dyndns;
33
+              }
34
+              ${lib.concatMapStrings ({ name, dynamic, ... }:
35
+                lib.optionalString (
36
+                  dynamic &&
37
+                  lib.hasSuffix ".in-addr.arpa" name
38
+                ) ''
39
+                  zone ${name}. {
40
+                    primary ${config.site.net.serv.hosts4.dns};
41
+                    primary6 ${config.site.net.serv.hosts6.dn42.dns};
42
+                    key dyndns;
43
+                  }
44
+                ''
45
+              ) config.site.dns.localZones}
46
+
24 47
               group {
25 48
                 default-lease-time ${toString dhcp.time};
26 49
                 max-lease-time ${toString dhcp.max-time};
27 50
                 option routers ${config.site.net.${net}.hosts4.${builtins.replaceStrings [".${net}"] [""] dhcp.router}};
28 51
                 option domain-name "${domainName}";
29 52
                 option domain-name-servers 172.20.73.8, 9.9.9.9;
53
+                ddns-domainname "${domainName}";
30 54
 
31 55
                 subnet ${subnet4Net} netmask ${lib.netmasks.${toString subnet4Len}} {
32 56
                   range ${dhcp.start} ${dhcp.end};
33 57
                 }
34 58
 
59
+                update-static-leases on;
60
+
35 61
                 ${builtins.concatStringsSep "\n" (
36 62
                   builtins.attrValues (
37 63
                     builtins.mapAttrs (addr: hwaddr:

+ 85
- 39
nix/nixos-module/container/dns.nix View File

@@ -1,9 +1,45 @@
1
-{ hostName, config, lib, pkgs, self, ... }:
1
+{ hostName, config, lib, pkgs, self, inputs, ... }:
2 2
 
3 3
 let
4 4
   fqdn = "${hostName}.serv.zentralwerk.org";
5 5
   # public servers (slaves)
6 6
   publicNS = [ "ns.c3d2.de" "ns.spaceboyz.net" ];
7
+  dynamicReverseZones = [
8
+    "74.20.172.in-addr.arpa"
9
+    "75.20.172.in-addr.arpa"
10
+    "76.20.172.in-addr.arpa"
11
+    "77.20.172.in-addr.arpa"
12
+    "78.20.172.in-addr.arpa"
13
+    "79.20.172.in-addr.arpa"
14
+  ];
15
+
16
+  serial =
17
+    let
18
+      timestamp = toString self.lastModified;
19
+      datePkg = pkgs.runCommandLocal "date-${timestamp}" {} ''
20
+            date -d @${timestamp} +%Y%m%d%H > $out
21
+          '';
22
+    in
23
+      toString (import datePkg);
24
+
25
+  generateZoneFile = { name, ns, records, dynamic }:
26
+    builtins.toFile "${name}.zone" ''
27
+      $ORIGIN ${name}.
28
+      $TTL 1h
29
+
30
+      @ IN SOA ${fqdn}. astro.spaceboyz.net. (
31
+          ${serial} ; serial
32
+          1h ; refresh
33
+          1m ; retry
34
+          2h ; expire
35
+          1m ; minimum
36
+      )
37
+      ${lib.concatMapStrings (ns: "  IN NS ${ns}.\n") ns}
38
+
39
+      ${lib.concatMapStrings ({ name, type, data }:
40
+        "${name} IN ${type} ${data}\n"
41
+      ) records}
42
+    '';
7 43
 in
8 44
 {
9 45
   options =
@@ -35,6 +71,10 @@ in
35 71
             options = recordOpts;
36 72
           });
37 73
         };
74
+        dynamic = mkOption {
75
+          type = types.bool;
76
+          default = false;
77
+        };
38 78
       };
39 79
 
40 80
     in {
@@ -69,9 +109,9 @@ in
69 109
           );
70 110
 
71 111
         # generate zones only for nets with hosts
72
-        namedNets = lib.filterAttrs (_: { hosts4, hosts6, dynamicDomain, ... }:
112
+        namedNets = lib.filterAttrs (name: { hosts4, hosts6, dynamicDomain, ... }:
73 113
           (hosts4 != [] && hosts6 != []) ||
74
-          dynamicDomain
114
+           dynamicDomain
75 115
         ) config.site.net;
76 116
 
77 117
         # converts an IPv4 address to its reverse DNS form
@@ -200,15 +240,14 @@ in
200 240
       } ] ++ builtins.concatLists (
201 241
         builtins.attrValues (
202 242
           builtins.mapAttrs (net: { dynamicDomain, hosts4, hosts6, ... }: [
203
-            (if dynamicDomain
204
-             then throw "TODO"
205
-             else {
206
-               name = "${net}.zentralwerk.dn42";
207
-               ns = [ fqdn ];
208
-               records =
209
-                 hosts4Records hosts4 ++
210
-                 lib.optionals (hosts6 ? dn42) (hosts6Records hosts6.dn42);
211
-             })
243
+            {
244
+              name = "${net}.zentralwerk.dn42";
245
+              ns = [ fqdn ];
246
+              records =
247
+                hosts4Records hosts4 ++
248
+                lib.optionals (hosts6 ? dn42) (hosts6Records hosts6.dn42);
249
+              dynamic = dynamicDomain;
250
+            }
212 251
             {
213 252
               name = "${net}.zentralwerk.org";
214 253
               ns = publicNS;
@@ -232,6 +271,7 @@ in
232 271
             builtins.filter (lib.hasSuffix ".${zone}")
233 272
               (builtins.attrNames reverseHosts4)
234 273
           );
274
+        dynamic = builtins.elem zone dynamicReverseZones;
235 275
       }) reverseZones4
236 276
       ++ builtins.concatMap (ctx:
237 277
         map (zone: {
@@ -256,16 +296,7 @@ in
256 296
 
257 297
     services.bind = lib.mkIf config.site.hosts.${hostName}.services.dns.enable (
258 298
       let
259
-        serial =
260
-          let
261
-            timestamp = toString self.lastModified;
262
-            datePkg = pkgs.runCommandLocal "date-${timestamp}" {} ''
263
-            date -d @${timestamp} +%Y%m%d%H > $out
264
-          '';
265
-          in
266
-            toString (import datePkg);
267
-
268
-        generateZone = { name, ns, records }: {
299
+        generateZone = zone@{ name, dynamic, ... }: {
269 300
           inherit name;
270 301
           master = true;
271 302
           # allowed for zone-transfer
@@ -275,29 +306,44 @@ in
275 306
             # ns.spaceboyz.net
276 307
             "172.22.24.4" "2a01:4f9:4b:39ec::4"
277 308
           ];
278
-          file = builtins.toFile "${name}.zone" ''
279
-            $ORIGIN ${name}.
280
-            $TTL 1h
281
-
282
-            @ IN SOA ${fqdn}. astro.spaceboyz.net. (
283
-                ${serial} ; serial
284
-                1h ; refresh
285
-                1m ; retry
286
-                2h ; expire
287
-                1m ; minimum
288
-            )
289
-            ${lib.concatMapStrings (ns: "  IN NS ${ns}.\n") ns}
290
-
291
-            ${lib.concatMapStrings ({ name, type, data }:
292
-              "${name} IN ${type} ${data}\n"
293
-            ) records}
309
+          file =
310
+            if dynamic
311
+            then "/var/db/bind/${name}.zone"
312
+            else generateZoneFile zone;
313
+          extraConfig = lib.optionalString dynamic ''
314
+            allow-update { key "dyndns"; };
294 315
           '';
295 316
         };
317
+
296 318
       in {
297 319
         enable = true;
298 320
         zones = map generateZone config.site.dns.localZones;
321
+
322
+        extraConfig = ''
323
+          key "dyndns" {
324
+            algorithm hmac-sha256;
325
+            secret "${inputs.zentralwerk-network-key.lib.dyndnsKey}";
326
+          };
327
+        '';
299 328
       });
300 329
 
301
-    # TODO: dyn
330
+    systemd.services.dynamic-zones = {
331
+      requiredBy = [ "bind.service" ];
332
+      before = [ "bind.service" ];
333
+      serviceConfig.Type = "oneshot";
334
+      # TODO: initial records
335
+      script = ''
336
+        mkdir -p /var/db/bind
337
+
338
+        ${lib.concatMapStringsSep "\n" (zone@{ name, ... }: ''
339
+          [ -e /var/db/bind/${name}.zone ] || \
340
+            cp ${generateZoneFile zone} /var/db/bind/${name}.zone
341
+          chown -R named /var/db/bind
342
+          chmod -R u+rwX /var/db/bind
343
+        '') (
344
+          builtins.filter ({ dynamic, ... }: dynamic) config.site.dns.localZones
345
+        )}
346
+      '';
347
+    };
302 348
   };
303 349
 }

+ 42
- 42
salt-pillar/dhcp/init.sls View File

@@ -9,7 +9,7 @@ dhcp:
9 9
     host-opts:
10 10
       routers: serv-gw.serv
11 11
     string-opts:
12
-      domain-name: serv.zentralwerk.org
12
+      domain-name: serv.zentralwerk.dn42
13 13
 
14 14
   pub:
15 15
     start: 172.20.78.2
@@ -22,7 +22,7 @@ dhcp:
22 22
     host-opts:
23 23
       routers: pub-gw.pub
24 24
     string-opts:
25
-      domain-name: pub.zentralwerk.org
25
+      domain-name: pub.zentralwerk.dn42
26 26
 
27 27
   priv1:
28 28
     start: 172.20.74.2
@@ -34,7 +34,7 @@ dhcp:
34 34
     host-opts:
35 35
       routers: priv1-gw.priv1
36 36
     string-opts:
37
-      domain-name: priv1.zentralwerk.org
37
+      domain-name: priv1.zentralwerk.dn42
38 38
 
39 39
   priv2:
40 40
     start: 172.20.75.2
@@ -46,7 +46,7 @@ dhcp:
46 46
     host-opts:
47 47
       routers: priv2-gw.priv2
48 48
     string-opts:
49
-      domain-name: priv2.zentralwerk.org
49
+      domain-name: priv2.zentralwerk.dn42
50 50
     fixed-hosts:
51 51
       172.20.75.7: 60:33:4b:0b:cd:fc
52 52
       172.20.75.9: 00:11:32:22:95:79
@@ -61,7 +61,7 @@ dhcp:
61 61
     host-opts:
62 62
       routers: priv3-gw.priv3
63 63
     string-opts:
64
-      domain-name: priv3.zentralwerk.org
64
+      domain-name: priv3.zentralwerk.dn42
65 65
 
66 66
   priv4:
67 67
     start: 172.20.75.130
@@ -73,7 +73,7 @@ dhcp:
73 73
     host-opts:
74 74
       routers: priv4-gw.priv4
75 75
     string-opts:
76
-      domain-name: priv4.zentralwerk.org
76
+      domain-name: priv4.zentralwerk.dn42
77 77
 
78 78
   priv5:
79 79
     start: 172.20.74.66
@@ -85,7 +85,7 @@ dhcp:
85 85
     host-opts:
86 86
       routers: priv5-gw.priv5
87 87
     string-opts:
88
-      domain-name: priv5.zentralwerk.org
88
+      domain-name: priv5.zentralwerk.dn42
89 89
 
90 90
   priv6:
91 91
     start: 172.20.74.194
@@ -97,7 +97,7 @@ dhcp:
97 97
     host-opts:
98 98
       routers: priv6-gw.priv6
99 99
     string-opts:
100
-      domain-name: priv6.zentralwerk.org
100
+      domain-name: priv6.zentralwerk.dn42
101 101
 
102 102
   priv7:
103 103
     start: 172.20.75.66
@@ -109,7 +109,7 @@ dhcp:
109 109
     host-opts:
110 110
       routers: priv7-gw.priv7
111 111
     string-opts:
112
-      domain-name: priv7.zentralwerk.org
112
+      domain-name: priv7.zentralwerk.dn42
113 113
 
114 114
   priv8:
115 115
     start: 172.20.75.194
@@ -121,7 +121,7 @@ dhcp:
121 121
     host-opts:
122 122
       routers: priv8-gw.priv8
123 123
     string-opts:
124
-      domain-name: priv8.zentralwerk.org
124
+      domain-name: priv8.zentralwerk.dn42
125 125
 
126 126
   priv9:
127 127
     start: 172.20.74.34
@@ -133,7 +133,7 @@ dhcp:
133 133
     host-opts:
134 134
       routers: priv9-gw.priv9
135 135
     string-opts:
136
-      domain-name: priv9.zentralwerk.org
136
+      domain-name: priv9.zentralwerk.dn42
137 137
 
138 138
   priv10:
139 139
     start: 172.20.74.98
@@ -145,7 +145,7 @@ dhcp:
145 145
     host-opts:
146 146
       routers: priv10-gw.priv10
147 147
     string-opts:
148
-      domain-name: priv10.zentralwerk.org
148
+      domain-name: priv10.zentralwerk.dn42
149 149
 
150 150
   priv11:
151 151
     start: 172.20.74.162
@@ -157,7 +157,7 @@ dhcp:
157 157
     host-opts:
158 158
       routers: priv11-gw.priv11
159 159
     string-opts:
160
-      domain-name: priv11.zentralwerk.org
160
+      domain-name: priv11.zentralwerk.dn42
161 161
 
162 162
   priv12:
163 163
     start: 172.20.74.226
@@ -169,7 +169,7 @@ dhcp:
169 169
     host-opts:
170 170
       routers: priv12-gw.priv12
171 171
     string-opts:
172
-      domain-name: priv12.zentralwerk.org
172
+      domain-name: priv12.zentralwerk.dn42
173 173
 
174 174
   priv13:
175 175
     start: 172.20.75.34
@@ -181,7 +181,7 @@ dhcp:
181 181
     host-opts:
182 182
       routers: priv13-gw.priv13
183 183
     string-opts:
184
-      domain-name: priv13.zentralwerk.org
184
+      domain-name: priv13.zentralwerk.dn42
185 185
 
186 186
   priv14:
187 187
     start: 172.20.75.98
@@ -193,7 +193,7 @@ dhcp:
193 193
     host-opts:
194 194
       routers: priv14-gw.priv14
195 195
     string-opts:
196
-      domain-name: priv14.zentralwerk.org
196
+      domain-name: priv14.zentralwerk.dn42
197 197
 
198 198
   priv15:
199 199
     start: 172.20.75.162
@@ -205,7 +205,7 @@ dhcp:
205 205
     host-opts:
206 206
       routers: priv15-gw.priv15
207 207
     string-opts:
208
-      domain-name: priv15.zentralwerk.org
208
+      domain-name: priv15.zentralwerk.dn42
209 209
 
210 210
   priv16:
211 211
     start: 172.20.75.226
@@ -217,7 +217,7 @@ dhcp:
217 217
     host-opts:
218 218
       routers: priv16-gw.priv16
219 219
     string-opts:
220
-      domain-name: priv16.zentralwerk.org
220
+      domain-name: priv16.zentralwerk.dn42
221 221
 
222 222
   priv17:
223 223
     start: 172.20.73.130
@@ -229,7 +229,7 @@ dhcp:
229 229
     host-opts:
230 230
       routers: priv17-gw.priv17
231 231
     string-opts:
232
-      domain-name: priv17.zentralwerk.org
232
+      domain-name: priv17.zentralwerk.dn42
233 233
 
234 234
   priv18:
235 235
     start: 172.20.74.50
@@ -241,7 +241,7 @@ dhcp:
241 241
     host-opts:
242 242
       routers: priv18-gw.priv18
243 243
     string-opts:
244
-      domain-name: priv18.zentralwerk.org
244
+      domain-name: priv18.zentralwerk.dn42
245 245
 
246 246
   priv19:
247 247
     start: 172.20.73.194
@@ -254,7 +254,7 @@ dhcp:
254 254
     host-opts:
255 255
       routers: priv19-gw.priv19
256 256
     string-opts:
257
-      domain-name: priv19.zentralwerk.org
257
+      domain-name: priv19.zentralwerk.dn42
258 258
 
259 259
   priv20:
260 260
     start: 172.20.74.114
@@ -266,7 +266,7 @@ dhcp:
266 266
     host-opts:
267 267
       routers: priv20-gw.priv20
268 268
     string-opts:
269
-      domain-name: priv20.zentralwerk.org
269
+      domain-name: priv20.zentralwerk.dn42
270 270
 
271 271
   priv21:
272 272
     start: 172.20.74.146
@@ -278,7 +278,7 @@ dhcp:
278 278
     host-opts:
279 279
       routers: priv21-gw.priv21
280 280
     string-opts:
281
-      domain-name: priv21.zentralwerk.org
281
+      domain-name: priv21.zentralwerk.dn42
282 282
 
283 283
   priv22:
284 284
     start: 172.20.74.178
@@ -290,7 +290,7 @@ dhcp:
290 290
     host-opts:
291 291
       routers: priv22-gw.priv22
292 292
     string-opts:
293
-      domain-name: priv22.zentralwerk.org
293
+      domain-name: priv22.zentralwerk.dn42
294 294
 
295 295
   priv23:
296 296
     start: 172.20.73.165
@@ -302,7 +302,7 @@ dhcp:
302 302
     host-opts:
303 303
       routers: priv23-gw.priv23
304 304
     string-opts:
305
-      domain-name: priv23.zentralwerk.org
305
+      domain-name: priv23.zentralwerk.dn42
306 306
     fixed-hosts:
307 307
       172.20.73.162: da:2c:3a:2c:87:22
308 308
       172.20.73.163: ca:9f:27:b2:bf:6d
@@ -318,7 +318,7 @@ dhcp:
318 318
     host-opts:
319 319
       routers: priv24-gw.priv24
320 320
     string-opts:
321
-      domain-name: priv24.zentralwerk.org
321
+      domain-name: priv24.zentralwerk.dn42
322 322
 
323 323
   priv25:
324 324
     start: 172.20.74.82
@@ -330,7 +330,7 @@ dhcp:
330 330
     host-opts:
331 331
       routers: priv25-gw.priv25
332 332
     string-opts:
333
-      domain-name: priv25.zentralwerk.org
333
+      domain-name: priv25.zentralwerk.dn42
334 334
 
335 335
   priv26:
336 336
     start: 172.20.75.50
@@ -342,7 +342,7 @@ dhcp:
342 342
     host-opts:
343 343
       routers: priv26-gw.priv26
344 344
     string-opts:
345
-      domain-name: priv26.zentralwerk.org
345
+      domain-name: priv26.zentralwerk.dn42
346 346
 
347 347
   priv27:
348 348
     start: 172.20.75.82
@@ -354,7 +354,7 @@ dhcp:
354 354
     host-opts:
355 355
       routers: priv27-gw.priv27
356 356
     string-opts:
357
-      domain-name: priv27.zentralwerk.org
357
+      domain-name: priv27.zentralwerk.dn42
358 358
 
359 359
   priv28:
360 360
     start: 172.20.75.114
@@ -366,7 +366,7 @@ dhcp:
366 366
     host-opts:
367 367
       routers: priv28-gw.priv28
368 368
     string-opts:
369
-      domain-name: priv28.zentralwerk.org
369
+      domain-name: priv28.zentralwerk.dn42
370 370
 
371 371
   priv29:
372 372
     start: 172.20.75.146
@@ -378,7 +378,7 @@ dhcp:
378 378
     host-opts:
379 379
       routers: priv29-gw.priv29
380 380
     string-opts:
381
-      domain-name: priv29.zentralwerk.org
381
+      domain-name: priv29.zentralwerk.dn42
382 382
 
383 383
   priv30:
384 384
     start: 172.20.75.178
@@ -390,7 +390,7 @@ dhcp:
390 390
     host-opts:
391 391
       routers: priv30-gw.priv30
392 392
     string-opts:
393
-      domain-name: priv30.zentralwerk.org
393
+      domain-name: priv30.zentralwerk.dn42
394 394
 
395 395
   priv31:
396 396
     start: 172.20.75.210
@@ -402,7 +402,7 @@ dhcp:
402 402
     host-opts:
403 403
       routers: priv31-gw.priv31
404 404
     string-opts:
405
-      domain-name: priv31.zentralwerk.org
405
+      domain-name: priv31.zentralwerk.dn42
406 406
 
407 407
   priv32:
408 408
     start: 172.20.75.242
@@ -414,7 +414,7 @@ dhcp:
414 414
     host-opts:
415 415
       routers: priv32-gw.priv32
416 416
     string-opts:
417
-      domain-name: priv32.zentralwerk.org
417
+      domain-name: priv32.zentralwerk.dn42
418 418
 
419 419
   priv33:
420 420
     start: 172.20.74.18
@@ -426,7 +426,7 @@ dhcp:
426 426
     host-opts:
427 427
       routers: priv33-gw.priv33
428 428
     string-opts:
429
-      domain-name: priv33.zentralwerk.org
429
+      domain-name: priv33.zentralwerk.dn42
430 430
 
431 431
   priv34:
432 432
     start: 172.20.74.210
@@ -438,7 +438,7 @@ dhcp:
438 438
     host-opts:
439 439
       routers: priv34-gw.priv34
440 440
     string-opts:
441
-      domain-name: priv34.zentralwerk.org
441
+      domain-name: priv34.zentralwerk.dn42
442 442
 
443 443
   priv35:
444 444
     start: 172.20.76.2
@@ -450,7 +450,7 @@ dhcp:
450 450
     host-opts:
451 451
       routers: priv35-gw.priv35
452 452
     string-opts:
453
-      domain-name: priv35.zentralwerk.org
453
+      domain-name: priv35.zentralwerk.dn42
454 454
 
455 455
   priv36:
456 456
     start: 172.20.76.66
@@ -462,7 +462,7 @@ dhcp:
462 462
     host-opts:
463 463
       routers: priv36-gw.priv36
464 464
     string-opts:
465
-      domain-name: priv36.zentralwerk.org
465
+      domain-name: priv36.zentralwerk.dn42
466 466
 
467 467
   priv37:
468 468
     start: 172.20.76.130
@@ -474,7 +474,7 @@ dhcp:
474 474
     host-opts:
475 475
       routers: priv37-gw.priv37
476 476
     string-opts:
477
-      domain-name: priv37.zentralwerk.org
477
+      domain-name: priv37.zentralwerk.dn42
478 478
 
479 479
   priv38:
480 480
     start: 172.20.76.194
@@ -486,7 +486,7 @@ dhcp:
486 486
     host-opts:
487 487
       routers: priv38-gw.priv38
488 488
     string-opts:
489
-      domain-name: priv38.zentralwerk.org
489
+      domain-name: priv38.zentralwerk.dn42
490 490
 
491 491
   priv39:
492 492
     start: 172.20.77.130
@@ -498,7 +498,7 @@ dhcp:
498 498
     host-opts:
499 499
       routers: priv39-gw.priv39
500 500
     string-opts:
501
-      domain-name: priv39.zentralwerk.org
501
+      domain-name: priv39.zentralwerk.dn42
502 502
 
503 503
   priv40:
504 504
     start: 172.20.77.66
@@ -510,4 +510,4 @@ dhcp:
510 510
     host-opts:
511 511
       routers: priv40-gw.priv40
512 512
     string-opts:
513
-      domain-name: priv40.zentralwerk.org
513
+      domain-name: priv40.zentralwerk.dn42

+ 0
- 6
salt-pillar/hosts/init.sls View File

@@ -159,12 +159,6 @@ hosts-inet:
159 159
 
160 160
   pub:
161 161
     pub-gw: 172.20.78.1
162
-{%- for i in range(2, 256) %}
163
-    guest{{ i }}: 172.20.78.{{ i }}
164
-{%- endfor %}
165
-{%- for i in range(0, 255) %}
166
-    guest{{ 256 + i }}: 172.20.79.{{ i }}
167
-{%- endfor %}
168 162
   serv:
169 163
     serv-gw:      172.20.73.1
170 164
     dns:          172.20.73.2

Loading…
Cancel
Save