chiark / gitweb /
Makefile, distorted.lisp, hosts.lisp: Finish renumbering for A&A switchover.
[zones] / distorted.lisp
CommitLineData
e80b4c2d
MW
1;;; Zone file for distorted.org.uk
2
b4d4c18b 3(load "hosts.lisp" :verbose nil)
e80b4c2d 4
b1d5c6c2 5;;;--------------------------------------------------------------------------
aef7892b
MW
6;;; Anycast services.
7
8(defvar *anycast-routable-families* (list :ipv6))
9
10(defzoneparse :anycast (name data rec :prefix prefix :zname zname)
11 (destructuring-bind (any-provider default-provider &rest other-providers)
12 data
13
14 ;; First, the default address. If the anycast network is preferred then
15 ;; this is easy; otherwise we have something complicated to do because
16 ;; IPv6 anycast addresses are globally routable, while IPv4 ones aren't.
17 (if (zone-preferred-subnet-p (car any-provider))
18 (zone-set-address #'rec (cdr any-provider) :make-ptr-p t)
6baf2de2 19 (do-host (addr (cdr any-provider))
aef7892b
MW
20 (let ((family (ipaddr-family addr)))
21 (if (member family *anycast-routable-families*)
22 (zone-set-address #'rec addr
23 :family family :make-ptr-p t)
24 (zone-set-address #'rec (cdr default-provider)
25 :family family :make-ptr-p nil)))))
26
27 ;; Now for all of the others.
28 (dolist (provider (list* any-provider default-provider other-providers))
29 (zone-set-address #'rec (cdr provider)
30 :make-ptr-p (eq provider any-provider)
c9f96590
MW
31 :name (domain-name-concat prefix
32 (zone-parse-host
33 (car provider)
34 zname))))))
aef7892b
MW
35
36;;;--------------------------------------------------------------------------
07fe1e43
MW
37;;; Hostname abbreviations.
38
39(defvar *abbrev-subdomain*
40 (make-domain-name :labels '("abbrev") :absolutep nil))
41(defparameter *abbrev-used* (make-hash-table :test #'equal))
42
43(defzoneparse :abbrev (name data rec :zname zname)
44 (let* ((domain (zone-parse-host data
45 (domain-name-concat *abbrev-subdomain*
46 zname)))
47 (key (princ-to-string domain))
48 (existing (gethash key *abbrev-used*)))
49 (when existing
50 (error "Abbrev collision for ~A between ~A and ~A."
51 domain existing name))
52 (setf (gethash key *abbrev-used*) name)
53 (rec :name domain
54 :type :cname
55 :data name)))
56
57;;;--------------------------------------------------------------------------
b1d5c6c2 58;;; Other definitions.
e80b4c2d
MW
59
60(setf *default-zone-admin* "hostmaster@distorted.org.uk")
2bc217e8 61
ff6c53ad 62(setf *default-zone-source* 'radius.distorted.org.uk.)
e80b4c2d 63
b1d5c6c2
MW
64;;;--------------------------------------------------------------------------
65;;; Main zone definition.
66
e80b4c2d 67(defzone distorted.org.uk
ec4898f9 68
6ef39f28 69 ;; Nameservers.
ff6c53ad 70 :ns #+view/inside ((radius.ns :ip radius)
f0209b9c 71 (precision.ns :ip precision)
1b9508ad 72 (telecaster.ns :ip telecaster)
a45c78d7 73 (vampire.ns :ip vampire))
ff6c53ad 74 #-view/inside ((radius.ns :ip radius)
f0209b9c 75 (precision.ns :ip precision)
1b9508ad 76 (telecaster.ns :ip telecaster)
ff6c53ad 77 (mythic-beasts-1.ns :ip mythic-ns1)
4a487d58 78 (mythic-beasts-2.ns :ip mythic-ns2)
ff6c53ad 79 (chiark.ns :ip chiark.greenend.org.uk))
ec4898f9 80
6ef39f28 81 ;; Mail servers.
68db42b5 82 ((@ mail blackhole) :mx mail :srv ((:smtp mail)))
beb363e0 83 ((bugs) :ttl 300 :mx lists :srv ((:smtp bugs)))
68db42b5 84 ((lists) :ttl 300 :mx lists :srv ((:smtp lists)))
ec4898f9 85
69bbb181 86 (stratocaster.20140403._domainkey
8d261a89
MW
87 :dkim ("stratocaster-20140403"
88 :v "DKIM1" :k "rsa" :h "sha256" :s "email"))
69bbb181 89
06f1bb3f 90 ;; Anycast services.
aef7892b
MW
91 (dns0 :anycast ((any dns0.any)
92 (jump precision.jump)
93 (colo precision.colo)
94 (dmz radius.dmz)
95 (unsafe radius.unsafe)))
96 (dns1 :anycast ((any dns1.any)
97 (jump telecaster.jump)
98 (dmz vampire.dmz)
99 (unsafe vampire.unsafe)
100 (colo telecaster.colo)))
cfecfa5c
MW
101 (dns :cname dns0)
102
aef7892b
MW
103 (ntp0 :anycast ((any ntp0.any)
104 (jump fender.jump)
105 (dmz ibanez.dmz)
106 (unsafe ibanez.unsafe)
107 (colo fender.colo)))
108 (ntp1 :anycast ((any ntp1.any)
109 (dmz vampire.dmz)
110 (unsafe vampire.unsafe)))
cfecfa5c
MW
111 (ntp :cname ntp0)
112
aef7892b 113 (www-cache :anycast ((any www-cache.any)
6fcf076f
MW
114 (jump telecaster.jump)
115 (dmz roadstar.dmz)
116 (unsafe roadstar.unsafe)
117 (colo telecaster.colo)))
345c0f69
MW
118 (wpad :cname www-cache)
119
cfecfa5c 120 (_kerberos :txt "DISTORTED.ORG.UK")
aef7892b
MW
121 (krb0 :anycast ((any krb0.any)
122 (jump precision.jump)
123 (dmz radius.dmz)
124 (unsafe radius.unsafe)
125 (colo precision.colo)))
126 (krb1 :anycast ((any krb1.any)
127 (dmz vampire.dmz)
128 (unsafe vampire.unsafe)))
cfecfa5c
MW
129 (krb-master (unsafe :svc radius.unsafe)
130 (dmz :svc radius.dmz))
131 :srv (((:kerberos :protocol :udp)
132 krb0
133 (krb1 :prio 100))
134 ((:kerberos-master :protocol :udp :port 88) krb-master)
135 (:kerberos-adm krb-master)
136 ((:kpasswd :protocol :udp) krb-master))
137 (krb :cname krb0)
138
6ef39f28 139 ;; Other services.
96c2a692
MW
140 :srv ((:http www)
141 (:ftp ftp))
ec4898f9 142
4c25329e 143 ;; Colocated services.
15cca8c6 144 ((irc vox keys wiki) (colo :svc jazz.colo :sshfp "jazz")
270fa799
MW
145 (jump :svc jazz.jump :sshfp "jazz"))
146 ((irc vox keys wiki) :tlsa (:https (:service-certificate-constraint
15cca8c6 147 :public-key :sha-256 #p"https-jazz")))
be02ca0e
MW
148 ((bugs lists db ftp) (colo :svc telecaster.colo :sshfp "telecaster")
149 (jump :svc telecaster.jump :sshfp "telecaster"))
150 ((bugs lists ftp) :tlsa (:https (:service-certificate-constraint
151 :public-key :sha-256
152 #p"https-telecaster")))
153 (dyndns :svc telecaster.jump :sshfp "telecaster")
8d261a89
MW
154 ((git www mail) (colo :svc stratocaster.colo :sshfp "stratocaster")
155 (jump :svc stratocaster.jump :sshfp "stratocaster"))
5a8c792f
MW
156 ((www git mail @) :tlsa (:https (:service-certificate-constraint
157 :public-key :sha-256
158 #p"https-stratocaster")))
159 (www-cache :tlsa (3127 #1=(:trust-anchor-assertion
160 :certificate :sha-256 #p"distorted-ca")))
fd848deb
MW
161 ((bugs lists) :tlsa (:smtp #1#))
162 (mail :tlsa ((:smtp :submission :imap :imaps) #1#))
d13943aa
MW
163 :svc #+view/inside stratocaster.colo
164 #-view/inside stratocaster.jump
8d261a89 165 (cabal :svc stratocaster.colo :sshfp "stratocaster")
4c25329e 166
6ef39f28 167 ;; Local services.
f5c3343e
MW
168 ((rawk pifi) (unsafe :svc artist.unsafe) (dmz :svc artist.dmz))
169 (mirror (dmz :svc roadstar.dmz :sshfp "roadstar")
8d261a89 170 (unsafe :svc roadstar.unsafe :sshfp "roadstar"))
ec4898f9 171
6ef39f28 172 ;; Internal services.
8d261a89 173 #+view/inside ((news lpr) :svc vampire.unsafe :sshfp "vampire")
ec4898f9 174
04db9729 175 ;; Anonymity services.
0865ffd5 176 (anon (colo :svc jazz.colo)
f99b371f 177 (unsafe :svc vampire.unsafe)
c3997955
MW
178 (jump :addr anon.jump)
179 (dmz :addr anon.dmz))
04db9729 180
85a3496c 181 ;; Fancy connectivity.
d267cd94 182 (iodine (jump :svc jazz.jump))
85a3496c 183
38c2de7c
MW
184 ;; Colocated hosts.
185 (colo :net colo)
186 (jump :net jump)
9b7e4069 187 (gate (jump :addr gate.jump :sshfp "precision"))
07fe1e43 188 (fender :abbrev f (colo :abbrev fc) (jump :abbrev fj))
c3997955
MW
189 (fender (colo :addr fender.colo :sshfp "fender")
190 (jump :addr fender.jump :sshfp "fender"))
aa779726 191 (precision :abbrev p (colo :abbrev pc) (jump :abbrev pj) (vpn :abbrev pv))
c3997955 192 (precision (colo :addr precision.colo :sshfp "precision")
aa779726
MW
193 (jump :addr precision.jump :sshfp "precision")
194 (vpn :addr precision.vpn :sshfp "precision"))
07fe1e43
MW
195 (telecaster :alias tele :abbrev t
196 (colo :alias tele.colo :abbrev tc)
197 (jump :alias tele.jump :abbrev tj))
c3997955
MW
198 (telecaster (colo :addr telecaster.colo :sshfp "telecaster")
199 (jump :addr telecaster.jump :sshfp "telecaster"))
07fe1e43
MW
200 (stratocaster :alias strat :abbrev s
201 (colo :alias strat.colo :abbrev sc)
202 (jump :alias strat.jump :abbrev sj))
c3997955
MW
203 (stratocaster (colo :addr stratocaster.colo :sshfp "stratocaster")
204 (jump :addr stratocaster.jump :sshfp "stratocaster"))
aa779726 205 (jazz :abbrev z (colo :abbrev zc) (jump :abbrev zj) (vpn :abbrev :zv))
c3997955
MW
206 (jazz (colo :addr jazz.colo :sshfp "jazz")
207 (jump :addr jazz.jump :sshfp "jazz")
aa779726 208 (vpn :addr jazz.vpn :sshfp "jazz")
c3997955 209 (iodine :addr jazz.iodine :sshfp "jazz"))
38c2de7c 210
b577b999
MW
211 ;; Virtual hosts.
212 (national :abbrev n (linode :abbrev nl) (upn :abbrev ny))
213 (national (linode :addr national.linode)
214 (upn :addr national.upn))
215
4a372d1b 216 ;; Media server (on loan to Good Technology HSTG).
07fe1e43 217 (jaguar :abbrev jag)
376a10ac 218 (jaguar (jump :addr jaguar.jump :sshfp "jaguar"))
4a372d1b 219
a20ec58c 220 ;; Nicko's server.
c1f47051 221 (richmond (jump :svc richmond.jump))
a20ec58c 222
76e1e45a
MW
223 ;; Entry is via little router box.
224 (dmz :net dmz)
f5c3343e
MW
225 (guvnor (dmz :addr guvnor.dmz))
226 (nat (dmz :addr nat.dmz))
76e1e45a
MW
227
228 ;; Wireless gateway.
229 (wireless :net wireless)
230 (evolution (safe :addr evolution.safe))
231 (evolution :alias evo)
232
f8f3b283 233 ;; Switches.
c32d96fa
MW
234 (grigsby :alias tp0)
235 (grigsby (safe :addr grigsby.safe))
236 (carling :alias tp1)
237 (carling (safe :addr carling.safe))
238 (tritan :alias tp2)
239 (tritan (safe :addr tritan.safe))
f8f3b283 240
6ef39f28 241 ;; Wired ethernet.
04d65182
MW
242 (unsafe :net unsafe)
243 (safe :net safe)
244 (untrusted :net untrusted)
07fe1e43 245 (vampire :abbrev v
f5c3343e
MW
246 (unsafe :abbrev vu) (dmz :abbrev vd) (vpn :abbrev vv)
247 (safe :abbrev vs) (untrusted :abbrev vx))
c3997955
MW
248 (vampire (unsafe :addr vampire.unsafe :sshfp "vampire")
249 (dmz :addr vampire.dmz :sshfp "vampire")
aa779726 250 (vpn :addr vampire.vpn :sshfp "vampire")
c3997955
MW
251 (safe :addr vampire.safe :sshfp "vampire")
252 (untrusted :addr vampire.untrusted :sshfp "vampire"))
f5c3343e 253 (ibanez :abbrev i (unsafe :abbrev iu) (dmz :abbrev id))
c3997955
MW
254 (ibanez (unsafe :addr ibanez.unsafe :sshfp "ibanez")
255 (dmz :addr ibanez.dmz :sshfp "ibanez"))
07fe1e43 256 (radius :abbrev r
f5c3343e
MW
257 (unsafe :abbrev ru) (dmz :abbrev rd) (vpn :abbrev rv)
258 (safe :abbrev rs) (untrusted :abbrev rx))
c3997955
MW
259 (radius (unsafe :addr radius.unsafe :sshfp "radius")
260 (dmz :addr radius.dmz :sshfp "radius")
aa779726 261 (vpn :addr radius.vpn :sshfp "radius")
c3997955
MW
262 (safe :addr radius.safe :sshfp "radius")
263 (untrusted :addr radius.untrusted :sshfp "radius"))
f5c3343e 264 (roadstar :abbrev rg (unsafe :abbrev rgu) (dmz :abbrev rgd))
c3997955
MW
265 (roadstar (unsafe :addr roadstar.unsafe :sshfp "roadstar")
266 (dmz :addr roadstar.dmz :sshfp "roadstar"))
f5c3343e 267 (jem :abbrev j (unsafe :abbrev ju) (dmz :abbrev jd))
c3997955
MW
268 (jem (unsafe :addr jem.unsafe :sshfp "jem")
269 (dmz :addr jem.dmz :sshfp "jem"))
f5c3343e 270 (universe :abbrev u (unsafe :abbrev uu) (dmz :abbrev ud))
664e6cf9
MW
271 (universe (unsafe :addr universe.unsafe :sshfp "universe")
272 (dmz :addr universe.dmz :sshfp "universe"))
07fe1e43 273 (artist :abbrev a
f5c3343e 274 (unsafe :abbrev au) (dmz :abbrev ad) (untrusted :abbrev ax))
c3997955
MW
275 (artist (unsafe :addr artist.unsafe :sshfp "artist")
276 (dmz :addr artist.dmz :sshfp "artist")
277 (untrusted :addr artist.untrusted :sshfp "artist"))
f409e9c5
MW
278 (groove :abbrev gr)
279 (groove (unsafe :addr groove.unsafe :sshfp "groove"))
ec4898f9 280
ff6c53ad 281 ;; DHCP hosts.
07fe1e43 282 (gibson :cname gibson.dhcp :abbrev g)
4b5e05ad
MW
283 (lespaul :cname lespaul.dhcp)
284 (firebird :cname firebird.dhcp)
aa4d55b1
MW
285 (marauder :cname marauder.dhcp)
286 (invader :cname invader.dhcp)
098020ad 287 (gretsch :cname gretsch.dhcp)
ec4898f9 288
6ef39f28 289 ;; Virtual network.
374be896 290 (vpn :net vpn)
07fe1e43 291 (crybaby :abbrev cb)
c3997955
MW
292 (crybaby (vpn :addr crybaby.vpn :sshfp "crybaby"))
293 (terror (vpn :addr terror.vpn :sshfp "terror"))
07fe1e43 294 (orange :abbrev o)
c3997955 295 (orange (vpn :addr orange.vpn :sshfp "orange"))
07fe1e43 296 (haze :abbrev h)
76bca42f 297 (haze (vpn :addr haze.vpn :sshfp "haze"))
fc0ce2ed 298 (iodine :net iodine)
ec4898f9 299
6ef39f28 300 ;; ITS.
b1d5c6c2 301 (its :net its)
c3997955
MW
302 (gw (its :addr gw.its))
303 (mz (its :addr mz.its))
ec4898f9 304
c2118713 305 ;; Strange things.
c3997955 306 (blackhole (jump :addr blackhole.jump))
c2118713 307
6ef39f28 308 ;; Delegations.
f0209b9c
MW
309 (dhcp :ns ((radius.ns.dhcp :ip radius)
310 (precision.ns.dhcp :ip precision)
1b9508ad 311 (telecaster.ns.dhcp :ip telecaster)
a45c78d7 312 (vampire.ns.dhcp :ip vampire))
3f954bac
MW
313 :ds ((55966 :rsasha256 :sha1
314 "95b05c1f4e84f950f29630004bac447f8a87ca33")
315 (55966 :rsasha256 :sha256
316 #.(concatenate 'string "31696bf54b577362b2eb75793adeb9ec"
317 "2e8440ec671371b35d8d978cd9ca3007"))))
49c5f8ff
MW
318 (dyn :ns ((radius.ns.dyn :ip radius)
319 (precision.ns.dyn :ip precision)
1b9508ad 320 (telecaster.ns.dyn :ip telecaster)
a45c78d7 321 (vampire.ns.dyn :ip vampire))
3f954bac
MW
322 :ds ((11335 :rsasha256 :sha1
323 "7ed2b843b0bfb38ceca68617dfacbeafab1d1ea9")
324 (11335 :rsasha256 :sha256
325 #.(concatenate 'string "6eb15eb587c48f5b84ca128a656a4cce"
326 "0a41cf040d3d0f15a44dffd6476b2b55"))))
0262908f 327 (dnserr :ns ((radius.ns.dnserr :ip radius.dmz)
f0209b9c 328 (precision.ns.dnserr :ip precision.jump)
1b9508ad 329 (telecaster.ns.dnserr :ip telecaster)
a45c78d7 330 (vampire.ns.dnserr :ip vampire.dmz))
3f954bac
MW
331 :ds ((40945 :rsasha256 :sha1
332 "f35b5d0b877b940e63ad1b3afc21d6ba83cd1b3b")
333 (40945 :rsasha256 :sha256
334 #.(concatenate 'string "fb171d206d4d64c5a7a6c290ce6e20df"
335 "44f1db7f41e2260f1fe8d7c55d524c11"))))
17c95de9 336 (io :ns ((ns.io :ip jazz.jump))))
b1d5c6c2
MW
337
338;;;--------------------------------------------------------------------------
339;;; Other subsidiary zones.
e80b4c2d 340
55f161b6 341(defzone dhcp.distorted.org.uk
a1ab9d7e
MW
342 :ns ((radius.ns :ip radius.dmz)
343 (precision.ns :ip precision.jump)
344 (telecaster.ns :ip telecaster.jump)
a45c78d7 345 (vampire.ns :ip vampire.dmz))
55f161b6 346 (gibson :addr gibson.unsafe)
812706bd 347 (crybaby :addr crybaby.unsafe)
2d7b9fe6 348 (lespaul :addr lespaul.unsafe)
3e38779f
MW
349 (gretsch :addr gretsch.unsafe)
350 (haze :addr haze.unsafe)
55f161b6 351 (invader :addr invader.safe)
3e38779f 352 (marauder :addr marauder.safe))
55f161b6 353
c1f47051
MW
354(defzone nicko.org
355 (richmond :addr richmond.jump))
356
e80b4c2d 357(defrevzone trusted
8aa87005
MW
358 :ns (radius.distorted.org.uk.
359 precision.distorted.org.uk.
1b9508ad 360 telecaster.distorted.org.uk.
a45c78d7 361 vampire.distorted.org.uk.)
b59ce50d
MW
362 :reverse unsafe
363 :reverse vpn
364 :reverse colo
365 :reverse its
345c0f69 366 :reverse any
8aa87005
MW
367 (dhcp :ns (radius.distorted.org.uk.
368 precision.distorted.org.uk.
1b9508ad 369 telecaster.distorted.org.uk.
a45c78d7 370 vampire.distorted.org.uk.))
3503589d 371 :multi (((dhcp safe) :family :ipv4 :suffix "199.29.172.dhcp") :cname *))
b3f75214 372
f5c3343e 373(defzone dhcp.199.29.172.in-addr.arpa
8aa87005
MW
374 :ns (radius.distorted.org.uk.
375 precision.distorted.org.uk.
1b9508ad 376 telecaster.distorted.org.uk.
f5c3343e 377 vampire.distorted.org.uk.))
b29264c5 378
f5c3343e 379(defrevzone untrusted
b29264c5
MW
380 :ns (radius.distorted.org.uk.
381 precision.distorted.org.uk.
382 telecaster.distorted.org.uk.
f5c3343e 383 vampire.distorted.org.uk.))
b29264c5 384
7c0d1761
MW
385(defzone 128-143.238.187.81.in-addr.arpa
386 :ns (radius.distorted.org.uk.
387 precision.distorted.org.uk.
388 telecaster.distorted.org.uk.
389 vampire.distorted.org.uk.)
f5c3343e 390 :reverse ((((:ipv4 dmz)))))
7c0d1761
MW
391
392(defzone 195.113.2.81.in-addr.arpa
393 :ns (radius.distorted.org.uk.
394 precision.distorted.org.uk.
395 telecaster.distorted.org.uk.
396 vampire.distorted.org.uk.)
f5c3343e 397 :reverse ((((:ipv4 gw)))))
7c0d1761 398
b29264c5 399(defrevzone (jump :family :ipv6)
8aa87005
MW
400 :ns (radius.distorted.org.uk.
401 precision.distorted.org.uk.
1b9508ad 402 telecaster.distorted.org.uk.
a45c78d7 403 vampire.distorted.org.uk.)
38c2de7c
MW
404 :reverse jump)
405
b29264c5
MW
406(defrevzone (jump :family :ipv4)
407 (64-79 :ns (radius.distorted.org.uk.
408 precision.distorted.org.uk.
409 telecaster.distorted.org.uk.
a45c78d7 410 vampire.distorted.org.uk.))
b29264c5
MW
411 :multi ((jump :suffix "64-79") :cname *))
412
413(defzone 64-79.198.13.212.in-addr.arpa
414 :ns (radius.distorted.org.uk.
415 precision.distorted.org.uk.
416 telecaster.distorted.org.uk.
a45c78d7 417 vampire.distorted.org.uk.)
b29264c5
MW
418 :reverse ((((:ipv4 jump)))))
419
f5c3343e 420(defrevzone (distorted.org.uk-aaisp :family :ipv6)
7c0d1761
MW
421 :ns (radius.distorted.org.uk.
422 precision.distorted.org.uk.
423 telecaster.distorted.org.uk.
424 vampire.distorted.org.uk.)
f5c3343e 425 :reverse ((((:ipv6 distorted.org.uk-aaisp)))))
7c0d1761 426
652c34be
MW
427(defrevzone distorted.org.uk-jump
428 :ns (radius.distorted.org.uk.
429 precision.distorted.org.uk.
1b9508ad 430 telecaster.distorted.org.uk.
a45c78d7 431 vampire.distorted.org.uk.)
652c34be
MW
432 :reverse distorted.org.uk-jump)
433
995d75b4 434(defzone io.distorted.org.uk
17c95de9 435 :ns ((ns :ip jazz.jump))
995d75b4
MW
436 (about :txt "Fake zone used for IP-over-DNS tunnelling."))
437
b1d5c6c2 438;;;----- That's all, folks --------------------------------------------------