chiark / gitweb /
distorted.lisp, hosts.lisp: Reverse entries for haze and gretsch.
[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.
cf079d8b 82 ((@ mail blackhole)
96c2a692
MW
83 :mx mail
84 :srv ((:smtp mail)))
39567ec1
MW
85 ((lists bugs cryptomail)
86 :ttl 300
87 :mx mail
88 :srv ((:smtp old-mail)))
ec4898f9 89
69bbb181 90 (stratocaster.20140403._domainkey
8d261a89
MW
91 :dkim ("stratocaster-20140403"
92 :v "DKIM1" :k "rsa" :h "sha256" :s "email"))
69bbb181 93
06f1bb3f 94 ;; Anycast services.
aef7892b
MW
95 (dns0 :anycast ((any dns0.any)
96 (jump precision.jump)
97 (colo precision.colo)
98 (dmz radius.dmz)
99 (unsafe radius.unsafe)))
100 (dns1 :anycast ((any dns1.any)
101 (jump telecaster.jump)
102 (dmz vampire.dmz)
103 (unsafe vampire.unsafe)
104 (colo telecaster.colo)))
cfecfa5c
MW
105 (dns :cname dns0)
106
aef7892b
MW
107 (ntp0 :anycast ((any ntp0.any)
108 (jump fender.jump)
109 (dmz ibanez.dmz)
110 (unsafe ibanez.unsafe)
111 (colo fender.colo)))
112 (ntp1 :anycast ((any ntp1.any)
113 (dmz vampire.dmz)
114 (unsafe vampire.unsafe)))
cfecfa5c
MW
115 (ntp :cname ntp0)
116
aef7892b 117 (www-cache :anycast ((any www-cache.any)
6fcf076f
MW
118 (jump telecaster.jump)
119 (dmz roadstar.dmz)
120 (unsafe roadstar.unsafe)
121 (colo telecaster.colo)))
345c0f69
MW
122 (wpad :cname www-cache)
123
cfecfa5c 124 (_kerberos :txt "DISTORTED.ORG.UK")
aef7892b
MW
125 (krb0 :anycast ((any krb0.any)
126 (jump precision.jump)
127 (dmz radius.dmz)
128 (unsafe radius.unsafe)
129 (colo precision.colo)))
130 (krb1 :anycast ((any krb1.any)
131 (dmz vampire.dmz)
132 (unsafe vampire.unsafe)))
cfecfa5c
MW
133 (krb-master (unsafe :svc radius.unsafe)
134 (dmz :svc radius.dmz))
135 :srv (((:kerberos :protocol :udp)
136 krb0
137 (krb1 :prio 100))
138 ((:kerberos-master :protocol :udp :port 88) krb-master)
139 (:kerberos-adm krb-master)
140 ((:kpasswd :protocol :udp) krb-master))
141 (krb :cname krb0)
142
6ef39f28 143 ;; Other services.
96c2a692
MW
144 :srv ((:http www)
145 (:ftp ftp))
ec4898f9 146
4c25329e 147 ;; Colocated services.
6e726a18
MW
148 ((irc vox keys) (colo :svc jazz.colo :sshfp "jazz")
149 (jump :svc jazz.jump :sshfp "jazz"))
8d261a89
MW
150 ((git www mail) (colo :svc stratocaster.colo :sshfp "stratocaster")
151 (jump :svc stratocaster.jump :sshfp "stratocaster"))
d9fb2838 152 ((www @) :tlsa (:https (:service-certificate-constraint
9ce2de9d 153 :certificate :sha-256 #p"http-server-www#1")))
d9fb2838 154 (git :tlsa (:https (:trust-anchor-assertion
9ce2de9d 155 :certificate :sha-256 #p"distorted-ca")))
d9fb2838 156 (www-cache :tlsa (3127 (:trust-anchor-assertion
9ce2de9d
MW
157 :certificate :sha-256 #p"distorted-ca")))
158 (mail :tlsa ((:smtp :submission :imap)
159 (:trust-anchor-assertion
160 :certificate :sha-256 #p"distorted-ca")))
d13943aa
MW
161 :svc #+view/inside stratocaster.colo
162 #-view/inside stratocaster.jump
8d261a89 163 (cabal :svc stratocaster.colo :sshfp "stratocaster")
0dccfb48
MW
164 ((db ftp) (colo :svc telecaster.colo :sshfp "telecaster")
165 (jump :svc telecaster.jump :sshfp "telecaster"))
166 (dyndns :svc telecaster.jump :sshfp "telecaster")
4c25329e 167
6ef39f28 168 ;; Local services.
6c719992
MW
169 ((rawk pifi) (unsafe :svc artist.unsafe)
170 (dmz :svc artist.dmz))
8d261a89
MW
171 (mirror (dmz :svc roadstar.dmz :sshfp "roadstar")
172 (unsafe :svc roadstar.unsafe :sshfp "roadstar"))
173 ((wiki bugs old-mail i2p) :svc vampire :sshfp "vampire")
ec4898f9 174
6ef39f28 175 ;; Internal services.
8d261a89 176 #+view/inside ((news lpr) :svc vampire.unsafe :sshfp "vampire")
ec4898f9 177
04db9729 178 ;; Anonymity services.
0865ffd5 179 (anon (colo :svc jazz.colo)
f99b371f 180 (unsafe :svc vampire.unsafe)
c3997955
MW
181 (jump :addr anon.jump)
182 (dmz :addr anon.dmz))
04db9729 183
85a3496c 184 ;; Fancy connectivity.
d267cd94 185 (iodine (jump :svc jazz.jump))
85a3496c 186
38c2de7c
MW
187 ;; Colocated hosts.
188 (colo :net colo)
189 (jump :net jump)
9b7e4069 190 (gate (jump :addr gate.jump :sshfp "precision"))
07fe1e43 191 (fender :abbrev f (colo :abbrev fc) (jump :abbrev fj))
c3997955
MW
192 (fender (colo :addr fender.colo :sshfp "fender")
193 (jump :addr fender.jump :sshfp "fender"))
aa779726 194 (precision :abbrev p (colo :abbrev pc) (jump :abbrev pj) (vpn :abbrev pv))
c3997955 195 (precision (colo :addr precision.colo :sshfp "precision")
aa779726
MW
196 (jump :addr precision.jump :sshfp "precision")
197 (vpn :addr precision.vpn :sshfp "precision"))
07fe1e43
MW
198 (telecaster :alias tele :abbrev t
199 (colo :alias tele.colo :abbrev tc)
200 (jump :alias tele.jump :abbrev tj))
c3997955
MW
201 (telecaster (colo :addr telecaster.colo :sshfp "telecaster")
202 (jump :addr telecaster.jump :sshfp "telecaster"))
07fe1e43
MW
203 (stratocaster :alias strat :abbrev s
204 (colo :alias strat.colo :abbrev sc)
205 (jump :alias strat.jump :abbrev sj))
c3997955
MW
206 (stratocaster (colo :addr stratocaster.colo :sshfp "stratocaster")
207 (jump :addr stratocaster.jump :sshfp "stratocaster"))
aa779726 208 (jazz :abbrev z (colo :abbrev zc) (jump :abbrev zj) (vpn :abbrev :zv))
c3997955
MW
209 (jazz (colo :addr jazz.colo :sshfp "jazz")
210 (jump :addr jazz.jump :sshfp "jazz")
aa779726 211 (vpn :addr jazz.vpn :sshfp "jazz")
c3997955 212 (iodine :addr jazz.iodine :sshfp "jazz"))
38c2de7c 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)
f0209b9c 307 (vampire.ns.dhcp :ip vampire)))
49c5f8ff
MW
308 (dyn :ns ((radius.ns.dyn :ip radius)
309 (precision.ns.dyn :ip precision)
1b9508ad 310 (telecaster.ns.dyn :ip telecaster)
49c5f8ff 311 (vampire.ns.dyn :ip vampire)))
0262908f 312 (dnserr :ns ((radius.ns.dnserr :ip radius.dmz)
f0209b9c 313 (precision.ns.dnserr :ip precision.jump)
1b9508ad 314 (telecaster.ns.dnserr :ip telecaster)
0262908f 315 (vampire.ns.dnserr :ip vampire.dmz)))
17c95de9 316 (io :ns ((ns.io :ip jazz.jump))))
b1d5c6c2
MW
317
318;;;--------------------------------------------------------------------------
319;;; Other subsidiary zones.
e80b4c2d 320
55f161b6
MW
321(defzone dhcp.distorted.org.uk
322 (gibson :addr gibson.unsafe)
812706bd 323 (crybaby :addr crybaby.unsafe)
55f161b6
MW
324 (lespaul :addr lespaul.safe)
325 (invader :addr invader.safe)
8b838bba
MW
326 (marauder :addr marauder.safe)
327 (haze :addr haze.unsafe)
328 (gretsch :addr gretsch.unsafe))
55f161b6 329
c1f47051
MW
330(defzone nicko.org
331 (richmond :addr richmond.jump))
332
e80b4c2d 333(defrevzone trusted
8aa87005
MW
334 :ns (radius.distorted.org.uk.
335 precision.distorted.org.uk.
1b9508ad 336 telecaster.distorted.org.uk.
8aa87005 337 vampire.distorted.org.uk.)
b59ce50d
MW
338 :reverse unsafe
339 :reverse vpn
340 :reverse colo
341 :reverse its
345c0f69 342 :reverse any
8aa87005
MW
343 (dhcp :ns (radius.distorted.org.uk.
344 precision.distorted.org.uk.
1b9508ad 345 telecaster.distorted.org.uk.
8aa87005 346 vampire.distorted.org.uk.))
3503589d 347 :multi (((dhcp safe) :family :ipv4 :suffix "199.29.172.dhcp") :cname *))
b3f75214 348
b29264c5 349(defrevzone (dmz :family :ipv6)
8aa87005
MW
350 :ns (radius.distorted.org.uk.
351 precision.distorted.org.uk.
1b9508ad 352 telecaster.distorted.org.uk.
8aa87005 353 vampire.distorted.org.uk.)
ff6c53ad 354 :reverse dmz)
92e99247 355
b29264c5
MW
356(defrevzone (dmz :family :ipv4)
357 (144-159 :ns (radius.distorted.org.uk.
358 precision.distorted.org.uk.
359 telecaster.distorted.org.uk.
360 vampire.distorted.org.uk.))
361 :multi ((dmz :suffix "144-159") :cname *))
362
363(defzone 144-159.204.49.62.in-addr.arpa
364 :ns (radius.distorted.org.uk.
365 precision.distorted.org.uk.
366 telecaster.distorted.org.uk.
367 vampire.distorted.org.uk.)
368 :reverse ((((:ipv4 dmz)))))
369
370(defrevzone (jump :family :ipv6)
8aa87005
MW
371 :ns (radius.distorted.org.uk.
372 precision.distorted.org.uk.
1b9508ad 373 telecaster.distorted.org.uk.
8aa87005 374 vampire.distorted.org.uk.)
38c2de7c
MW
375 :reverse jump)
376
b29264c5
MW
377(defrevzone (jump :family :ipv4)
378 (64-79 :ns (radius.distorted.org.uk.
379 precision.distorted.org.uk.
380 telecaster.distorted.org.uk.
381 vampire.distorted.org.uk.))
382 :multi ((jump :suffix "64-79") :cname *))
383
384(defzone 64-79.198.13.212.in-addr.arpa
385 :ns (radius.distorted.org.uk.
386 precision.distorted.org.uk.
387 telecaster.distorted.org.uk.
388 vampire.distorted.org.uk.)
389 :reverse ((((:ipv4 jump)))))
390
652c34be
MW
391(defrevzone distorted.org.uk-he
392 :ns (radius.distorted.org.uk.
393 precision.distorted.org.uk.
1b9508ad 394 telecaster.distorted.org.uk.
652c34be
MW
395 vampire.distorted.org.uk.)
396 :reverse distorted.org.uk-he)
397
398(defrevzone distorted.org.uk-jump
399 :ns (radius.distorted.org.uk.
400 precision.distorted.org.uk.
1b9508ad 401 telecaster.distorted.org.uk.
652c34be
MW
402 vampire.distorted.org.uk.)
403 :reverse distorted.org.uk-jump)
404
995d75b4 405(defzone io.distorted.org.uk
17c95de9 406 :ns ((ns :ip jazz.jump))
995d75b4
MW
407 (about :txt "Fake zone used for IP-over-DNS tunnelling."))
408
b1d5c6c2 409;;;----- That's all, folks --------------------------------------------------