chiark / gitweb /
odin.lisp: Provide a TLSA record for the `odin' webserver.
[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)
ff6c53ad
MW
73 (vampire.ns :ip vampire))
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.
6e726a18
MW
144 ((irc vox keys) (colo :svc jazz.colo :sshfp "jazz")
145 (jump :svc jazz.jump :sshfp "jazz"))
beb363e0
MW
146 ((bugs lists) (colo :svc telecaster.colo :sshfp "telecaster")
147 (jump :svc telecaster.jump :sshfp "telecaster"))
8d261a89
MW
148 ((git www mail) (colo :svc stratocaster.colo :sshfp "stratocaster")
149 (jump :svc stratocaster.jump :sshfp "stratocaster"))
d9fb2838 150 ((www @) :tlsa (:https (:service-certificate-constraint
84bfdc62 151 :public-key :sha-256 #p"https-stratocaster")))
fd848deb
MW
152 ((git mail) :tlsa (:https #1=(:trust-anchor-assertion
153 :certificate :sha-256 #p"distorted-ca")))
154 (www-cache :tlsa (3127 #1#))
155 ((bugs lists) :tlsa (:smtp #1#))
156 (mail :tlsa ((:smtp :submission :imap :imaps) #1#))
d13943aa
MW
157 :svc #+view/inside stratocaster.colo
158 #-view/inside stratocaster.jump
8d261a89 159 (cabal :svc stratocaster.colo :sshfp "stratocaster")
0dccfb48
MW
160 ((db ftp) (colo :svc telecaster.colo :sshfp "telecaster")
161 (jump :svc telecaster.jump :sshfp "telecaster"))
162 (dyndns :svc telecaster.jump :sshfp "telecaster")
4c25329e 163
6ef39f28 164 ;; Local services.
6c719992
MW
165 ((rawk pifi) (unsafe :svc artist.unsafe)
166 (dmz :svc artist.dmz))
8d261a89
MW
167 (mirror (dmz :svc roadstar.dmz :sshfp "roadstar")
168 (unsafe :svc roadstar.unsafe :sshfp "roadstar"))
ec4898f9 169
6ef39f28 170 ;; Internal services.
8d261a89 171 #+view/inside ((news lpr) :svc vampire.unsafe :sshfp "vampire")
ec4898f9 172
04db9729 173 ;; Anonymity services.
0865ffd5 174 (anon (colo :svc jazz.colo)
f99b371f 175 (unsafe :svc vampire.unsafe)
c3997955
MW
176 (jump :addr anon.jump)
177 (dmz :addr anon.dmz))
04db9729 178
85a3496c 179 ;; Fancy connectivity.
d267cd94 180 (iodine (jump :svc jazz.jump))
85a3496c 181
38c2de7c
MW
182 ;; Colocated hosts.
183 (colo :net colo)
184 (jump :net jump)
9b7e4069 185 (gate (jump :addr gate.jump :sshfp "precision"))
07fe1e43 186 (fender :abbrev f (colo :abbrev fc) (jump :abbrev fj))
c3997955
MW
187 (fender (colo :addr fender.colo :sshfp "fender")
188 (jump :addr fender.jump :sshfp "fender"))
aa779726 189 (precision :abbrev p (colo :abbrev pc) (jump :abbrev pj) (vpn :abbrev pv))
c3997955 190 (precision (colo :addr precision.colo :sshfp "precision")
aa779726
MW
191 (jump :addr precision.jump :sshfp "precision")
192 (vpn :addr precision.vpn :sshfp "precision"))
07fe1e43
MW
193 (telecaster :alias tele :abbrev t
194 (colo :alias tele.colo :abbrev tc)
195 (jump :alias tele.jump :abbrev tj))
c3997955
MW
196 (telecaster (colo :addr telecaster.colo :sshfp "telecaster")
197 (jump :addr telecaster.jump :sshfp "telecaster"))
07fe1e43
MW
198 (stratocaster :alias strat :abbrev s
199 (colo :alias strat.colo :abbrev sc)
200 (jump :alias strat.jump :abbrev sj))
c3997955
MW
201 (stratocaster (colo :addr stratocaster.colo :sshfp "stratocaster")
202 (jump :addr stratocaster.jump :sshfp "stratocaster"))
aa779726 203 (jazz :abbrev z (colo :abbrev zc) (jump :abbrev zj) (vpn :abbrev :zv))
c3997955
MW
204 (jazz (colo :addr jazz.colo :sshfp "jazz")
205 (jump :addr jazz.jump :sshfp "jazz")
aa779726 206 (vpn :addr jazz.vpn :sshfp "jazz")
c3997955 207 (iodine :addr jazz.iodine :sshfp "jazz"))
38c2de7c 208
b577b999
MW
209 ;; Virtual hosts.
210 (national :abbrev n (linode :abbrev nl) (upn :abbrev ny))
211 (national (linode :addr national.linode)
212 (upn :addr national.upn))
213
4a372d1b 214 ;; Media server (on loan to Good Technology HSTG).
07fe1e43 215 (jaguar :abbrev jag)
376a10ac 216 (jaguar (jump :addr jaguar.jump :sshfp "jaguar"))
4a372d1b 217
a20ec58c 218 ;; Nicko's server.
c1f47051 219 (richmond (jump :svc richmond.jump))
a20ec58c 220
76e1e45a
MW
221 ;; Entry is via little router box.
222 (dmz :net dmz)
223 (guvnor (dmz :addr guvnor.dmz))
224 (nat (dmz :addr nat.dmz))
225
226 ;; Wireless gateway.
227 (wireless :net wireless)
228 (evolution (safe :addr evolution.safe))
229 (evolution :alias evo)
230
f8f3b283 231 ;; Switches.
c32d96fa
MW
232 (grigsby :alias tp0)
233 (grigsby (safe :addr grigsby.safe))
234 (carling :alias tp1)
235 (carling (safe :addr carling.safe))
236 (tritan :alias tp2)
237 (tritan (safe :addr tritan.safe))
f8f3b283 238
6ef39f28 239 ;; Wired ethernet.
04d65182
MW
240 (unsafe :net unsafe)
241 (safe :net safe)
242 (untrusted :net untrusted)
07fe1e43 243 (vampire :abbrev v
aa779726 244 (unsafe :abbrev vu) (dmz :abbrev vd) (vpn :abbrev vv)
07fe1e43 245 (safe :abbrev vs) (untrusted :abbrev vx))
c3997955
MW
246 (vampire (unsafe :addr vampire.unsafe :sshfp "vampire")
247 (dmz :addr vampire.dmz :sshfp "vampire")
aa779726 248 (vpn :addr vampire.vpn :sshfp "vampire")
c3997955
MW
249 (safe :addr vampire.safe :sshfp "vampire")
250 (untrusted :addr vampire.untrusted :sshfp "vampire"))
07fe1e43 251 (ibanez :abbrev i (unsafe :abbrev iu) (dmz :abbrev id))
c3997955
MW
252 (ibanez (unsafe :addr ibanez.unsafe :sshfp "ibanez")
253 (dmz :addr ibanez.dmz :sshfp "ibanez"))
07fe1e43 254 (radius :abbrev r
aa779726 255 (unsafe :abbrev ru) (dmz :abbrev rd) (vpn :abbrev rv)
07fe1e43 256 (safe :abbrev rs) (untrusted :abbrev rx))
c3997955
MW
257 (radius (unsafe :addr radius.unsafe :sshfp "radius")
258 (dmz :addr radius.dmz :sshfp "radius")
aa779726 259 (vpn :addr radius.vpn :sshfp "radius")
c3997955
MW
260 (safe :addr radius.safe :sshfp "radius")
261 (untrusted :addr radius.untrusted :sshfp "radius"))
07fe1e43 262 (roadstar :abbrev rg (unsafe :abbrev rgu) (dmz :abbrev rgd))
c3997955
MW
263 (roadstar (unsafe :addr roadstar.unsafe :sshfp "roadstar")
264 (dmz :addr roadstar.dmz :sshfp "roadstar"))
07fe1e43 265 (jem :abbrev j (unsafe :abbrev ju) (dmz :abbrev jd))
c3997955
MW
266 (jem (unsafe :addr jem.unsafe :sshfp "jem")
267 (dmz :addr jem.dmz :sshfp "jem"))
07fe1e43
MW
268 (artist :abbrev a
269 (unsafe :abbrev au) (dmz :abbrev ad) (untrusted :abbrev ax))
c3997955
MW
270 (artist (unsafe :addr artist.unsafe :sshfp "artist")
271 (dmz :addr artist.dmz :sshfp "artist")
272 (untrusted :addr artist.untrusted :sshfp "artist"))
f409e9c5
MW
273 (groove :abbrev gr)
274 (groove (unsafe :addr groove.unsafe :sshfp "groove"))
ec4898f9 275
ff6c53ad 276 ;; DHCP hosts.
07fe1e43 277 (gibson :cname gibson.dhcp :abbrev g)
4b5e05ad
MW
278 (lespaul :cname lespaul.dhcp)
279 (firebird :cname firebird.dhcp)
aa4d55b1
MW
280 (marauder :cname marauder.dhcp)
281 (invader :cname invader.dhcp)
098020ad 282 (gretsch :cname gretsch.dhcp)
ec4898f9 283
6ef39f28 284 ;; Virtual network.
374be896 285 (vpn :net vpn)
07fe1e43 286 (crybaby :abbrev cb)
c3997955
MW
287 (crybaby (vpn :addr crybaby.vpn :sshfp "crybaby"))
288 (terror (vpn :addr terror.vpn :sshfp "terror"))
07fe1e43 289 (orange :abbrev o)
c3997955 290 (orange (vpn :addr orange.vpn :sshfp "orange"))
07fe1e43 291 (haze :abbrev h)
76bca42f 292 (haze (vpn :addr haze.vpn :sshfp "haze"))
fc0ce2ed 293 (iodine :net iodine)
ec4898f9 294
6ef39f28 295 ;; ITS.
b1d5c6c2 296 (its :net its)
c3997955
MW
297 (gw (its :addr gw.its))
298 (mz (its :addr mz.its))
ec4898f9 299
c2118713 300 ;; Strange things.
c3997955 301 (blackhole (jump :addr blackhole.jump))
c2118713 302
6ef39f28 303 ;; Delegations.
f0209b9c
MW
304 (dhcp :ns ((radius.ns.dhcp :ip radius)
305 (precision.ns.dhcp :ip precision)
1b9508ad 306 (telecaster.ns.dhcp :ip telecaster)
3f954bac
MW
307 (vampire.ns.dhcp :ip vampire))
308 :ds ((55966 :rsasha256 :sha1
309 "95b05c1f4e84f950f29630004bac447f8a87ca33")
310 (55966 :rsasha256 :sha256
311 #.(concatenate 'string "31696bf54b577362b2eb75793adeb9ec"
312 "2e8440ec671371b35d8d978cd9ca3007"))))
49c5f8ff
MW
313 (dyn :ns ((radius.ns.dyn :ip radius)
314 (precision.ns.dyn :ip precision)
1b9508ad 315 (telecaster.ns.dyn :ip telecaster)
3f954bac
MW
316 (vampire.ns.dyn :ip vampire))
317 :ds ((11335 :rsasha256 :sha1
318 "7ed2b843b0bfb38ceca68617dfacbeafab1d1ea9")
319 (11335 :rsasha256 :sha256
320 #.(concatenate 'string "6eb15eb587c48f5b84ca128a656a4cce"
321 "0a41cf040d3d0f15a44dffd6476b2b55"))))
0262908f 322 (dnserr :ns ((radius.ns.dnserr :ip radius.dmz)
f0209b9c 323 (precision.ns.dnserr :ip precision.jump)
1b9508ad 324 (telecaster.ns.dnserr :ip telecaster)
3f954bac
MW
325 (vampire.ns.dnserr :ip vampire.dmz))
326 :ds ((40945 :rsasha256 :sha1
327 "f35b5d0b877b940e63ad1b3afc21d6ba83cd1b3b")
328 (40945 :rsasha256 :sha256
329 #.(concatenate 'string "fb171d206d4d64c5a7a6c290ce6e20df"
330 "44f1db7f41e2260f1fe8d7c55d524c11"))))
17c95de9 331 (io :ns ((ns.io :ip jazz.jump))))
b1d5c6c2
MW
332
333;;;--------------------------------------------------------------------------
334;;; Other subsidiary zones.
e80b4c2d 335
55f161b6 336(defzone dhcp.distorted.org.uk
a1ab9d7e
MW
337 :ns ((radius.ns :ip radius.dmz)
338 (precision.ns :ip precision.jump)
339 (telecaster.ns :ip telecaster.jump)
340 (vampire.ns :ip vampire.dmz))
55f161b6 341 (gibson :addr gibson.unsafe)
812706bd 342 (crybaby :addr crybaby.unsafe)
2d7b9fe6 343 (lespaul :addr lespaul.unsafe)
3e38779f
MW
344 (gretsch :addr gretsch.unsafe)
345 (haze :addr haze.unsafe)
55f161b6 346 (invader :addr invader.safe)
3e38779f 347 (marauder :addr marauder.safe))
55f161b6 348
c1f47051
MW
349(defzone nicko.org
350 (richmond :addr richmond.jump))
351
e80b4c2d 352(defrevzone trusted
8aa87005
MW
353 :ns (radius.distorted.org.uk.
354 precision.distorted.org.uk.
1b9508ad 355 telecaster.distorted.org.uk.
8aa87005 356 vampire.distorted.org.uk.)
b59ce50d
MW
357 :reverse unsafe
358 :reverse vpn
359 :reverse colo
360 :reverse its
345c0f69 361 :reverse any
8aa87005
MW
362 (dhcp :ns (radius.distorted.org.uk.
363 precision.distorted.org.uk.
1b9508ad 364 telecaster.distorted.org.uk.
8aa87005 365 vampire.distorted.org.uk.))
3503589d 366 :multi (((dhcp safe) :family :ipv4 :suffix "199.29.172.dhcp") :cname *))
b3f75214 367
b29264c5 368(defrevzone (dmz :family :ipv6)
8aa87005
MW
369 :ns (radius.distorted.org.uk.
370 precision.distorted.org.uk.
1b9508ad 371 telecaster.distorted.org.uk.
8aa87005 372 vampire.distorted.org.uk.)
ff6c53ad 373 :reverse dmz)
92e99247 374
b29264c5
MW
375(defrevzone (dmz :family :ipv4)
376 (144-159 :ns (radius.distorted.org.uk.
377 precision.distorted.org.uk.
378 telecaster.distorted.org.uk.
379 vampire.distorted.org.uk.))
380 :multi ((dmz :suffix "144-159") :cname *))
381
382(defzone 144-159.204.49.62.in-addr.arpa
383 :ns (radius.distorted.org.uk.
384 precision.distorted.org.uk.
385 telecaster.distorted.org.uk.
386 vampire.distorted.org.uk.)
387 :reverse ((((:ipv4 dmz)))))
388
389(defrevzone (jump :family :ipv6)
8aa87005
MW
390 :ns (radius.distorted.org.uk.
391 precision.distorted.org.uk.
1b9508ad 392 telecaster.distorted.org.uk.
8aa87005 393 vampire.distorted.org.uk.)
38c2de7c
MW
394 :reverse jump)
395
b29264c5
MW
396(defrevzone (jump :family :ipv4)
397 (64-79 :ns (radius.distorted.org.uk.
398 precision.distorted.org.uk.
399 telecaster.distorted.org.uk.
400 vampire.distorted.org.uk.))
401 :multi ((jump :suffix "64-79") :cname *))
402
403(defzone 64-79.198.13.212.in-addr.arpa
404 :ns (radius.distorted.org.uk.
405 precision.distorted.org.uk.
406 telecaster.distorted.org.uk.
407 vampire.distorted.org.uk.)
408 :reverse ((((:ipv4 jump)))))
409
652c34be
MW
410(defrevzone distorted.org.uk-he
411 :ns (radius.distorted.org.uk.
412 precision.distorted.org.uk.
1b9508ad 413 telecaster.distorted.org.uk.
652c34be
MW
414 vampire.distorted.org.uk.)
415 :reverse distorted.org.uk-he)
416
417(defrevzone distorted.org.uk-jump
418 :ns (radius.distorted.org.uk.
419 precision.distorted.org.uk.
1b9508ad 420 telecaster.distorted.org.uk.
652c34be
MW
421 vampire.distorted.org.uk.)
422 :reverse distorted.org.uk-jump)
423
995d75b4 424(defzone io.distorted.org.uk
17c95de9 425 :ns ((ns :ip jazz.jump))
995d75b4
MW
426 (about :txt "Fake zone used for IP-over-DNS tunnelling."))
427
b1d5c6c2 428;;;----- That's all, folks --------------------------------------------------