Let’s Encrypt の証明書発行をDNS-01で行う場合の動作概要

Let’s Encryptの証明書発行操作について、これまではhttp/httpsを使う HTTP-01 を使っていたのだが、DNSを使う手段もある、というので確認してみた

example.comドメインで「mail.example.com」の証明書を発行する、とした場合、DNSに「_acme-challenge.mail.example.com」という名前でTXTレコードを追加して発行処理を行うようだ

全体の流れとしては下記の様な感じ

① アカウント登録(初回のみ)
② 当該サーバ → LEサーバ:「mail.example.com の証明書がほしい」(order)
 → LEサーバからdns-01 チャレンジ用のトークン を受け取る
③ 当該サーバ:DNSにTXTレコード登録
  トークンとアカウントキーから値を計算し、
  _acme-challenge.mail.example.com のTXT レコードに登録
→ セカンダリDNSにも反映されるまで待つ
④ 当該サーバ → LEサーバ:反映されたことを通知
⑤ LEサーバ → 権威DNS:
・_acme-challenge.mail.example.com の TXT を複数ネットワークのLEサーバから確認
・CAA レコードでLet’s Encrypt による証明書の発行が許可されているかを確認(CAAがなければ許可扱い)
  (mail.example.com → example.com の順で確認)
 → 検証OK
⑥ 当該サーバ:DNSに登録したレコード削除
   _acme-challenge.mail.example.comのTXTレコードを削除
⑦ 当該サーバ → LEサーバ: CSR を送信(finalize)
 → LEサーバ上から証明書をダウンロード

⑥⑦の実施順は逆の場合がある
認可が有効期間内の場合、②の段階で検証済みと応答されることで③~⑥のプロセスが省略されることがある

そう、確認において、mail.example.com のAレコード/AAAAレコードは確認されないし、Let’s Encryptサーバ側からのアクセスは行われないので、NATの内側にある内部向けのサーバであっても証明書発行が可能なようだ。

これは意外なことだった

問題点は、コマンドを使って _acme-challenge.mail.example.com のTXTレコードを登録/削除処理を行えるような DNSサーバなのか?ということ

certbotコマンドでは RFC 2136 Dynamic DNS Update を使うことが想定されている。その際の認証は TSIG (RFC 8945、Secret Key Transaction Authentication for DNS)を使用する。

各DNSシステムで実装の差異などがあるので「DNS providers who easily integrate with Let’s Encrypt DNS validation」を確認すると、certbot や acme.sh などで対応しているものを確認することができる

hp dragonfly G4についてのメモ

Googlebook OSで遊ぶためにhp dragonfly G4を入手しました

hpならパーツ単品でいろいろできるだろ、ということで中を開けてみる

WWAN用のスロットはあるけど、SIMスロットが見当たらない?

公式ドキュメントを確認してみるか、と 「HP Dragonfly 13.5 inch G4 Notebook PC Maintenance and Service Guide」を確認してみる。

・SIMスロットの実装有無でマザーボードを含む基盤系の差異はない、ように見える
・ケースについては、SIMスロット用の穴が開いてる/開いてないなどで差異がある

マザーボード上の実装としては、ネジを外して取り外さないとSIMスロットの有無がわからない場所の模様

続いて、タッチパネル対応の改造が可能かどうか

以前のhp機は、タッチパネル対応の有無でマザーボード側のコネクタピン数が異なっていた模様なのだが、dragonfly G3/G4ではタッチパネルの有無でマザーボード側に差異はない模様

ただし、OLED採用機については、マザーボードが別となる模様

タッチパネル改造をするのであれば、下記モジュールを入手する、と

明るい(1000nits) シルバー N51331-001 青 N51337-001
ほどほどアンチグレア(400nits) シルバー N51330-001 青 N51336-001
ほどほど(400nits) シルバーN51333-001 青N51339-001

バッテリーモジュールも2種類あることを確認
大容量6セル 68Whr M73476-006
標準サイズ4セル 45Whr M73478-006

ヒートシンク&ファンモジュールが2種類あるのは興味深い
標準 N11560-001
軽量 N11561-001 …軽量ってことはファンが普通よりよく回る、ということなんだろうか?

Active DirectoryサーバをLDAPサーバとして使っている場合、2026年10月のWindows Updateで接続できなくなる可能性

php2shellのパッチをダウンロードするためにONTAPのダウンロードページにアクセスしたら、phpに関する警告の他に、下記の警告も出ていた

AD-LDAP Authentication Errors After Microsoft October 2026 DC Patch Updates
Microsoft October 2026 domain controller (DCs) patches may affect AD-LDAP authentication requests from ONTAP to DCs resulting in protocol outrages or login disruptions. See SU628 for more details.

Active DirectoryサーバをLDAPサーバとして利用している場合、2026年10月のWindows Updateにより、平文のLDAPアクセスが禁止され、署名ありのLDAPアクセスもしくはLDAPSアクセスが必須となる、という話だった

具体的なWindows Server側のパッチ
 Windows Server 2025 KB5126646
 Windows Server 2022 KB5126655
 Windows Server 2019 KB5126651
 Windows Server 2016 KB5126868

基本的に、Windows Server側に適用されたセキュリティ強化設定を解除することはできない

Windows Server側のLDAP接続に関するドキュメント「Active Directory Domain ServicesのLDAPチャネルバインディング概要」と「Active Directory Domain Services における LDAP 署名の概要」

NetApp側のドキュメント「2026年10月 ドメイン コントローラ更新後のLDAP無効な認証情報 FAQ」(英語版)

まずはLDAPSでアクセスするための「Active Directory Domain Services で SSL 経由で LDAP の証明書を構成する」で、署名などで使用する証明書を用意する

この設定については過去に「Windows Server 2025で作ったActive Directory環境でldapsを使えるようにする」でRHEL からopensslコマンドとldapsearchコマンドを使って確認する方法と共に記載している

次に「Active Directory Domain Services のグループポリシーを使ってLDAP署名を設定する」でクライアントからのアクセス時にLDAP署名を強制する設定を行う、と


クライアントからアクセスする時に確認するべき点のメモ

アクセステスト内容署名不要のDC署名必須のDC
LDAP(389) + Simple bind成功失敗(Strong Auth Required / LDAPエラー8)
LDAP(389) + SASL(署名)成功成功
LDAPS(636)+ Simple bind証明書があれば成功証明書があれば成功

ldapsearch コマンドで挙動を確認する手法のメモ

① 署名必須かどうか(LDAP+Simple bind)

確認コマンド

ldapsearch -x -H ldap://dc01.example.local \
  -D "user@example.local" -W \
  -b "dc=example,dc=local" -s base "(objectClass=*)" dn

署名必須の場合、下記の様なエラー

ldap_bind: Strong(er) authentication required (8)
  additional info: 00002028: LdapErr: DSID-0C09xxxx, The server requires binds to turn on integrity checking if SSL\TLS are not already active on the connection

② LDAP+SASL(Kerberos)+署名での接続

確認コマンド

kinit user@EXAMPLE.LOCAL
ldapsearch -Y GSSAPI -H ldap://dc01.example.local -b "dc=example,dc=local" -s base dn

# 署名なしを強制して失敗するか確認(失敗すれば署名必須)
ldapsearch -Y GSSAPI -O "minssf=0,maxssf=0" -H ldap://dc01.example.local -b "dc=example,dc=local" -s base dn

③ LDAPSでのテスト

確認コマンド

# 証明書・TLSバージョンの確認
openssl s_client -connect dc01.example.local:636 -showcerts </dev/null

# LDAPSでbind
LDAPTLS_CACERT=/path/to/ca.pem \
ldapsearch -x -H ldaps://dc01.example.local \
  -D "user@example.local" -W -b "dc=example,dc=local" -s base dn

# StartTLS(389)
ldapsearch -x -ZZ -H ldap://dc01.example.local -D "user@example.local" -W -b "dc=example,dc=local" -s base dn

自己署名環境の場合、「LDAPTLS_REQCERT=never」を設定することで証明書検証を省略できる

LDAPS上でGSSAPIを使う場合、ADはTLS上のsign/sealを拒否するため「-O maxssf=0」オプションの追加、もしくは ldap.conf に「SASL_SECPROPS maxssf=0」を設定する

Windows環境で確認するためのメモ

PowerShellの場合

Add-Type -AssemblyName System.DirectoryServices.Protocols
$cred = Get-Credential   # user@example.local

# 389 + Simple bind(署名必須なら例外)
$c = New-Object System.DirectoryServices.Protocols.LdapConnection("dc01.example.local:389")
$c.SessionOptions.ProtocolVersion = 3
$c.AuthType = [System.DirectoryServices.Protocols.AuthType]::Basic
try { $c.Bind($cred.GetNetworkCredential()); "389 Simple bind: 成功(署名不要)" }
catch { "389 Simple bind: 失敗 -> $($_.Exception.InnerException.Message)" }

# 636 LDAPS
$s = New-Object System.DirectoryServices.Protocols.LdapConnection("dc01.example.local:636")
$s.SessionOptions.ProtocolVersion = 3
$s.SessionOptions.SecureSocketLayer = $true
$s.AuthType = [System.DirectoryServices.Protocols.AuthType]::Basic
try { $s.Bind($cred.GetNetworkCredential()); "LDAPS: 成功" }
catch { "LDAPS: 失敗 -> $($_.Exception.InnerException.Message)" }

Test-NetConnection dc01 -Port 636 はTCP疎通しか見ないため、TLSが成立するかの確認には上記のbindテストを使う

また、クライアント側でレジストリが設定されているか確認

Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Services\LDAP -Name LDAPClientIntegrity
# 0=なし, 1=ネゴシエート(既定), 2=必須

Active Directoryサーバ側で確認する手法

レジストリ「HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Parameters」を確認

LDAPServerIntegrity が「1」は署名無し、「2」は署名必須

LdapEnforceChannelBinding が「0」無効、「1」サポートしてるなら使う、「2」必須

GPOでの設定項目「ドメイン コントローラー: LDAP サーバー署名必須」

イベントログでの確認

Directory Serviceのイベントログに出てくるイベントID

2886/2887:署名なしbindの存在・件数の警告

2889:署名なしbindを行ったクライアントIPとアカウント(「16 LDAP Interface Events」の診断ログを2に設定して出力)

3039~3041:チャネルバインディング関連