Ubuntu20.04

2014年6月にUbuntu 14.04 (Trusty)にアップデートしたbravotouring.comのサーバ。

Hugo乗り換えを大義名分に先送りにしていたアップデートを、気の迷いで1月13日未明にうっかり実施。大胆にもdo-release-upgradeを3回繰り返し、LTS最新版のUbuntu 20.04 (Focal Fossa)という荒業にチャレンジしたメモ。

まず、spamassassinが起動に失敗。うん、CPANが追いついてないので無理だよね、というわけでひとまずuninstallして首絞め。

続いて、DKIMNSDも起動に失敗していて、メールが送受信できない事に気づいて軽く慌てはじめる。/var/log/syslog

Jan 13 03:59:56 vps nsd[2349728]: Error in SSL_CTX use_certificate_file
crypto error:140AB18F:SSL routines:SSL_CTX_use_certificate:ee key too small
というエラーに気づいた。ググってみるとOpenSSL 1.1.1/changelog[28 May 2019]で
Change the default RSA, DSA and DH size to 2048 bit instead of 1024. This changes the size when using the genpkey command when no size is given. It fixes an omission in earlier changes that changed all RSA, DSA and DH generation commands to use 2048 bits by default.
と、鍵長が2048ビット以上でないとダメになったようなので、nsd-control-setupで鍵を作り直してみた。
root@vps:/etc/nsd# nsd-control-setup
setup in directory /etc/nsd
nsd_server.key exists
nsd_control.key exists

create nsd_server.pem (self signed certificate)
create nsd_control.pem (signed client certificate)
Signature ok
subject=CN = nsd-control
Getting CA Private Key
Setup success. Certificates created.
root@vps:/etc/nsd#

…もののエラーは変わらず。結局、スクリプトを読んでみたところ1536→3072と生成する鍵長の設定は強化されていたもののnsd_server.key existsという事で作成されていなかったというオチだったので、
root@vps:~# cd /etc/nsd
root@vps:~# mv nsd_control.key nsd_control.key.2014
root@vps:~# mv nsd_server.key nsd_server.key.2014
root@vps:~# nsd-control-setup
root@vps:~# systemctl start nsd.service
として復活。