2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【bind】TXTレコード追加したいと思ったときの手順

Last updated at Posted at 2019-11-28

はじめに

bindでTXTレコードを追加したいと思ったときはどうすれば良いか記載します。

設定変更

設定ファイル(例):/etc/bind/bind.com.zone

◆設定変更前

$TTL	3600
@	IN	SOA	test.bind.com. test.bind.com.  (
				2019112801      ; Serial
				3600		; Refresh
				900		; Retry
				3600000		; Expire
				3600 )		; Minimum
	IN	NS	ns.test.bind.com.
	IN	MX	0 test.bind.com
test	IN	MX	0 test.bind.com
*	IN	MX	0 test.bind.com
test	IN	A	X.X.X.X
ns	IN	CNAME	test
www	IN	CNAME	test

◆設定変更後

$TTL	3600
@	IN	SOA	test.bind.com. test.bind.com.  (
				2019112802      ; Serial #serialをあげる
				3600		; Refresh
				900		; Retry
				3600000		; Expire
				3600 )		; Minimum
	IN	NS	ns.test.bind.com.
	IN	MX	0 test.bind.com
test	IN	MX	0 test.bind.com
*	IN	MX	0 test.bind.com
test	IN	A	X.X.X.X
ns	IN	CNAME	test
www	IN	CNAME	test
test    IN TXT "TXTレコードとして追加したい文字列" #追記

【留意点】
設定変更時、「200019112802 ; Serial」のように、
Serialの数字をあげておく必要があります。

管理しやすいように、出力例では「変更日のYYYYMMDD + 連番2桁」としています。

設定変更を反映する

systemctl reload named.service
2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?