DNSキャッシュ

DNSキャッシュ

[37] DNSキャッシュ (DNS cache) は、 名前解決の結果をキャッシュするものです。 名前解決はそれなりの時間を要する操作なので、 キャッシュを使うのが普通です。

[23] プラットフォーム名前解決器は、普通、名前解決の結果をキャッシュします。

[24] Webブラウザー名前解決器も、名前解決の結果をキャッシュします。

[35] DNSサーバーも、普通、問い合わせに回答するため名前解決した結果をキャッシュします。

[36] プラットフォームWebブラウザーキャッシュは、 DNS 以外の名前解決方式も含めたキャッシュになっているかもしれません。 従って厳密にはDNSキャッシュと呼ぶべきではないかもしれません。

保持期間

[25] Chrome は最低1分キャッシュします >>21

[31] Firefox の標準設定では1分キャッシュします >>30

[29] IE は30分キャッシュします >>2

[26] Windows は最低5分キャッシュします >>21

[28] Squid の標準設定では最低1分キャッシュします >>27

キャッシュ回避

[33] Chrome再読み込み時に DNSキャッシュを無視するようです >>22

[34] なお、再読み込みによって部分資源fetch するときに毎回名前解決キャッシュなしで実行されるのは好ましくないと思われます。

キャッシュ消去

[38] ネットワーク設定が変更されると、 WebブラウザーDNSキャッシュを消去しなければならない場合があります。

[39] 名前解決の結果は、組織内ネットワークの特別なドメイン名captive portal など、特定のネットワーク設定の状態に依存したものかもしれません。 他のネットワークに接続された時に、前の結果がそのまま使える保証はありません。

歴史

[1] Why Web Browser DNS Caching Can Be A Bad Thing | Dyn Blog ( 版) http://dyn.com/blog/web-browser-dns-caching-bad-thing/

[2] How Internet Explorer uses the cache for DNS host entries ( 版) https://support.microsoft.com/en-us/kb/263558

[3] PROXY(プロキシ)経由でのDNSリバインディングと対策 - 徳丸浩の日記(2010-04-06) (徳丸浩 著, 版) http://www.tokumaru.org/d/20100406.html

[4] クラウド時代はDNS Pinningが落とし穴になる | 水無月ばけらのえび日記 ( 版) http://bakera.jp/ebi/topic/4516

[5] Protecting Browsers from DNS Rebinding Attacks ( 版) http://crypto.stanford.edu/dns/dns-rebinding.pdf

[6] Notes on DNS Pinning - random dross - Site Home - MSDN Blogs ( 版) http://blogs.msdn.com/b/dross/archive/2007/07/09/notes-on-dns-pinning.aspx

[7] 689835 – Dns rebinding attack using cached resources ( 版) https://bugzilla.mozilla.org/show_bug.cgi?id=689835

[8] Issue 98357 - chromium - Security: browser dns rebinding attack using cached resources - An open-source project to help move the web forward. - Google Project Hosting ( 版) https://code.google.com/p/chromium/issues/detail?id=98357

[9] 162871 – DNS: problems with new DNS cache ("pinning" forever) ( 版) https://bugzilla.mozilla.org/show_bug.cgi?id=162871

[10] 151929 – DNS: TTL (time-to-live) support in DNS cache ( 版) https://bugzilla.mozilla.org/show_bug.cgi?id=151929

[11] Protecting Browsers from DNS Rebinding Attacks ( 版) http://www.adambarth.com/papers/2009/jackson-barth-bortz-shao-boneh-tweb.pdf

[12] Network Portal Detection - The Chromium Projects ( 版) http://www.chromium.org/chromium-os/chromiumos-design-docs/network-portal-detection

Many, or perhaps most, captive portals found in Hotels, Coffee Shops, Airports, etc, either run their own DNS server which returns IP address for all queries which point to their webserver, or they intercept all HTTP web traffic and return a 302 (redirect) response.

[13] DNS Prefetching - The Chromium Projects ( ()) https://www.chromium.org/developers/design-documents/dns-prefetching

[14] 149943 – Use "DNS pinning" to prevent Princeton-like exploits ( ()) https://bugzilla.mozilla.org/show_bug.cgi?id=149943

[15] 168566 – DNS: find way of supporting network.dnsCacheExpiration ( ()) https://bugzilla.mozilla.org/show_bug.cgi?id=168566

[16] 151929 – DNS: TTL (time-to-live) support in DNS cache ( ()) https://bugzilla.mozilla.org/show_bug.cgi?id=151929

[17] 981447 – dns cache too sticky! ( ()) https://bugzilla.mozilla.org/show_bug.cgi?id=981447

[18] How to clear/flush the DNS cache in Google Chrome? - Super User ( ()) http://superuser.com/questions/203674/how-to-clear-flush-the-dns-cache-in-google-chrome

[19] 各種端末でDNSキャッシュをクリアする方法 - Disce gaudere. 楽しむ事を学べ。 ( ()) http://d.hatena.ne.jp/keroring/20150115/1421308062

[20] Issue 566492 - chromium - Security: Previous DNS settings are still used even after changing networks - Monorail ( ()) https://bugs.chromium.org/p/chromium/issues/detail?id=566492

[21] Issue 157243 - chromium - Keep addresses in HostCache for at least a minute, even when using the built-in async DNS resolver. - Monorail ( ()) https://bugs.chromium.org/p/chromium/issues/detail?id=157243

Yes. The plan is to keep addresses in HostCache for at least one minute regardless of the TTL obtained from the server.

Windows apparently caches results for 5 minutes.

[22] Issue 42528 - chromium - Chrome/Chromium caches negative DNS responses and ignores changes to /etc/resolv.conf - Monorail ( ()) https://bugs.chromium.org/p/chromium/issues/detail?id=42528

[27] squid : negative_dns_ttl configuration directive ( ()) http://www.squid-cache.org/Doc/config/negative_dns_ttl/

Time-to-Live (TTL) for negative caching of failed DNS lookups. This also sets the lower cache limit on positive lookups. Minimum value is 1 second, and it is not recommendable to go much below 10 seconds.

[30] Network.dnsCacheExpiration - MozillaZine Knowledge Base ( ()) http://kb.mozillazine.org/Network.dnsCacheExpiration

[32] 30917 – implement DNS caching and request cancelation ( ()) https://bugzilla.mozilla.org/show_bug.cgi?id=30917

[40] GNU Wget 1.20 Manual () https://www.gnu.org/software/wget/manual/wget.html#index-DNS-cache