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