Switch DNS master to hermes, from ene

Julien LepillerSun Nov 14 15:47:18+0100 2021

04c6c0e

Switch DNS master to hermes, from ene

modules/config/dns.scm

4343
4444
(define-zone-entries lepiller.eu.zone
4545
;; Name         TTL Class Type Data
46-
  ("ene"        ""  "IN"  "A"     ene-ip4)
46+
  ("ene"        ""  "IN"  "A"     ene-kb-ip4)
47+
  ("ene"        ""  "IN"  "AAAA"     ene-kb-ip6)
4748
  ("hermes"     ""  "IN"  "A"     hermes-ip4)
4849
  ("hermes"     ""  "IN"  "AAAA"  hermes-ip6)
4950
  ("xana"       ""  "IN"  "A"     xana-ip4)

6364
  ("@"          ""  "IN"  "NS"    "ns2")
6465
  ("ns"         ""  "IN"  "A"     hermes-ip4)
6566
  ("ns"         ""  "IN"  "AAAA"  hermes-ip6)
66-
  ("ns2"        ""  "IN"  "A"     ene-ip4)
67+
  ("ns2"        ""  "IN"  "A"     ene-kb-ip4)
68+
  ("ns2"        ""  "IN"  "AAAA"  ene-kb-ip6)
6769
6870
  ("@"          ""  "IN"  "MX"    "10 courriel")
6971
  ("@"          ""  "IN"  "MX"    "50 b.courriel")

7173
  ("@"          ""  "IN"  "MX"    "60 5g33mrv2rp2onyvte2b3ge5a44fxansxwt4sajmmae7lgorxjgz5czad.onion.")
7274
  ("b.courriel" ""  "IN"  "A"     hermes-ip4)
7375
  ("b.courriel" ""  "IN"  "AAAA"  hermes-ip6)
74-
  ("courriel"   ""  "IN"  "A"     ene-ip4)
76+
  ("courriel"   ""  "IN"  "A"     ene-kb-ip4)
77+
  ("courriel"   ""  "IN"  "AAAA"  ene-kb-ip6)
7578
  ("imap"       ""  "IN"  "CNAME" "courriel")
7679
  ("smtp"       ""  "IN"  "CNAME" "b.courriel")
7780
  ("@"          ""  "IN"  "TXT"   "\"v=spf1 mx a ~all\"")

9396
(define ene
9497
  (knot-remote-configuration
9598
    (id "ene")
96-
    (address (list ene-ip4))
99+
    (address (list ene-kb-ip4 ene-kb-ip6))
97100
    (key "lepiller-key")))
98101
99102
(define hermes

112115
(define slave-acl
113116
  (knot-acl-configuration
114117
    (id "slave-acl")
115-
    (address (list ene-ip4))
118+
    (address (list ene-kb-ip4 ene-kb-ip6))
116119
    (key '("lepiller-key"))
117120
    (action '(notify))))
118121
119122
(define lepiller-master-zone
120123
  (knot-zone-configuration
121124
    (domain "lepiller.eu")
122-
    (notify '("hermes"))
125+
    (notify '("ene"))
123126
    (dnssec-policy "default")
124127
    (acl '("master-acl"))
125128
    (zonefile-load 'difference)
126129
    (zone (zone-file
127130
            (origin "lepiller.eu")
128131
            (entries lepiller.eu.zone)
129-
            (serial 2020101201)))))
132+
            (serial 2021111401)))))
130133
131134
(define lepiller-slave-zone
132135
  (knot-zone-configuration
133136
    (domain "lepiller.eu")
134137
    (acl '("slave-acl"))
135-
    (master '("ene"))))
138+
    (master '("hermes"))))
136139
137140
(define ipv6-reverse-master-zone
138141
  (let* ((ip6 (string->list (substring (string-delete #\: hermes-ip6) 0 12)))

modules/config/mail.scm

3636
3737
(define relays-file
3838
  (plain-file "other-relays"
39-
    (string-append ene-ip4 "\n" hermes-ip4 "\n" hermes-ip6 "\n" )))
39+
    (string-append ene-rennes-ip4 "\n" ene-kb-ip4 "\n" ene-kb-ip6 "\n"
40+
                   hermes-ip4 "\n" hermes-ip6 "\n" )))
4041
4142
(define blacklist-file
4243
  (plain-file "blacklist" "

modules/data/dns.scm

2020
;;
2121
2222
(define-module (data dns)
23-
  #:export (ene-ip4 ene-ip6
23+
  #:export (ene-rennes-ip4 ene-kb-ip4 ene-kb-ip6
2424
            hermes-ip4 hermes-ip6
2525
            xana-ip4))
2626
2727
(define hermes-ip4 "89.234.186.109")
2828
(define hermes-ip6 "2a00:5884:8208::1")
2929
30-
(define ene-ip4 "79.91.200.80")
30+
(define ene-rennes-ip4 "79.91.200.80")
31+
(define ene-kb-ip4 "86.247.139.155")
32+
(define ene-kb-ip6 "2a01:cb04:717:4400:cf:5ff:fe81:68af")
3133
3234
(define xana-ip4 "62.210.81.154")

systems/hermes.scm

8787
        (service knot-service-type
8888
                 (knot-configuration
8989
                   (includes '("/etc/knot/secrets.conf"))
90-
                   (acls (list slave-acl))
90+
                   (acls (list master-acl))
9191
                   (remotes (list ene))
92-
                   (zones (list lepiller-slave-zone
92+
                   (zones (list lepiller-master-zone
9393
                                ipv4-reverse-master-zone
9494
                                ipv6-reverse-master-zone))))
9595
        (certbot-service `(("lepiller.eu" "www.lepiller.eu" "smtp.lepiller.eu")))