はじめに
本記事ではSecure Email GatewayのDNS Cacheの動作について説明いたします。
DNS Cacheの動作
Secure Email GatewayではGUIの[ネットワーク]-[DNS]の設定に登録してあるDNSサーバに対してDNSクエリを行いホスト名等に対する名前解決を行います。その際に、名前解決したDNSレコードに登録してあるTTL(Time To Live)の値をCacheとして保持する期間として利用します。
上記が基本的な動作となりますが、名前解決をしたDNSレコードのTTL(Time To Live)の値がSecure Email Gatewayのminimum TTL in seconds for DNS cache(DNS Cacheとして保持する最低のTTL)の値を下回る場合は、後者の値が利用される動作となります。minimum TTL in seconds for DNS cacheの値はデフォルトで1800秒(30分)と設定されています。例えば、名前解決をしたホスト名のレコードのTTLの値が15分であったとて、minimum TTL in seconds for DNS cacheの値をデフォルト値から変更していない場合はそのレコード情報は30分間Cacheされる動作となります。
minimum TTL in seconds for DNS cacheの変更はCLIのdnsconfigコマンドから実行することが可能です。以下は、デフォルトの1800秒から900秒に変更をした例となります。変更後にcommitが必要となります。なお、こちらのコマンドはCES(Cloud Email Security)をお使いのお客様は実行することはできません。
ironport.example.com> dnsconfig
Currently using the local DNS cache servers:
1. Priority: 0 192.168.10.15
Choose the operation you want to perform:
- NEW - Add a new server.
- EDIT - Edit a server.
- DELETE - Remove a server.
- SETUP - Configure general settings.
[]> setup
Do you want the Gateway to use the Internet's root DNS servers or would you
like it to use your own DNS servers?
1. Use Internet root DNS servers
2. Use own DNS cache servers
[2]>
Choose the IP interface for DNS traffic.
1. Auto
2. Management (192.168.10.20/24: ironport.example.com)
[1]>
Enter the number of seconds to wait before timing out reverse DNS lookups.
[20]>
Enter the minimum TTL in seconds for DNS cache.
[1800]> 900
残りのTTL期間を確認する方法
CLIからnslookupコマンドでホスト名等の名前解決を行うと残りのTTL期間を確認することができます。なお、名前解決が成功しない場合は表示はされません。以下の例では、nslookupコマンドを使い、test.example.localのAレコードの名前解決を行った際に、残りのTTL期間が29m 41sであると表示されていることが分かります。この際にTTLの値が更新されることはございません。なお、Cacheに存在しなかった場合は、名前解決したホスト名のレコードのTTLの値、もしくはminimum TTL in seconds for DNS cacheの値をCacheする期間として新たに利用する動作となります。
ironport.example.com> nslookup
Please enter the host or IP address to resolve.
[]> test.example.local
Choose the query type:
1. A the host's IP address
2. AAAA the host's IPv6 address
3. CNAME the canonical name for an alias
4. MX the mail exchanger
5. NS the name server for the named zone
6. PTR the hostname if the query is an Internet address,
otherwise the pointer to other information
7. SOA the domain's "start-of-authority" information
8. TLSA TLSA Record
9. TXT the text information
[1]>
A=192.168.10.139 TTL=29m 41s
DNS Cacheを削除する方法
DNS Cacheの削除はGUIから行う方法とCLIから行う方法がございます。いずれもcommitは必要ございません。特定のレコードのCacheのみを削除するといったことはできず、Cacheに保持しているすべてのレコード情報が削除される動作となります。
GUIの場合は、[ネットワーク]-[DNS]のページにある[DNSキャッシュを消去]ボタンを押します。
CLIの場合は、dnsflushコマンドを実行します。
ironport.example.com> dnsflush
Are you sure you want to clear out the DNS cache? [N]> y