{"id":905,"date":"2022-09-21T18:56:50","date_gmt":"2022-09-21T10:56:50","guid":{"rendered":"https:\/\/airy.cn\/WordPress\/?p=905"},"modified":"2022-09-21T18:56:51","modified_gmt":"2022-09-21T10:56:51","slug":"windows%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%a4%a7%e9%87%8f%e7%ab%af%e5%8f%a3%e8%a2%abdns-exe%e5%8d%a0%e7%94%a8%e7%9a%84%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95-dns-exe-allocates-5000-ports-immediately-and-use","status":"publish","type":"post","link":"https:\/\/airy.cn\/WordPress\/?p=905","title":{"rendered":"windows\u670d\u52a1\u5668\u5927\u91cf\u7aef\u53e3\u88abdns.exe\u5360\u7528\u7684\u89e3\u51b3\u65b9\u6cd5  DNS.EXE allocates 5000+ ports immediately and Used large RAM"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>\u7528NetStat\u547d\u4ee4\u67e5\u770b\u670d\u52a1\u5668\u7aef\u53e3\u65f6,\u53d1\u73b0\u670d\u52a1\u5668udp\u7aef\u53e3\u5f00\u653e\u4e86\u597d\u591a,\u6700\u5c11\u57281000\u4e2a\u4ee5\u4e0a,,\u7ecf\u8fc7\u4ed4\u7ec6\u4ed4\u7ec6\u68c0\u67e5\u4e86\u4e00\u4e0b,\u7f51\u4e0a\u67e5\u9605\u5230\u5982\u4e0b\u8fd9\u4e2a\u89e3\u51b3\u529e\u6cd5\uff1a<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><a href=\"https:\/\/serverfault.com\/questions\/558104\/dns-exe-allocates-5000-ports-immediately\">https:\/\/serverfault.com\/questions\/558104\/dns-exe-allocates-5000-ports-immediately<\/a><\/p>\n\n\n\n<p>This is a&nbsp;<a href=\"https:\/\/docs.microsoft.com\/en-us\/archive\/blogs\/sbs\/some-services-may-fail-to-start-or-may-not-work-properly-after-installing-ms08-037-951746-and-951748\">well-known<\/a>&nbsp;<a href=\"https:\/\/msmvps.com\/blogs\/alunj\/archive\/2008\/07\/19\/1641409.aspx\">side<\/a>&nbsp;<a href=\"http:\/\/support.microsoft.com\/kb\/956188\">effect<\/a>&nbsp;of the hotfix distributed to address&nbsp;<a href=\"http:\/\/technet.microsoft.com\/en-us\/security\/bulletin\/ms08-037\">MS08-037<\/a>, since the hotfix is intended to decrease the predictability of ports used for DNS responses.<\/p>\n\n\n\n<p>You can restrict the amount of ports used by defining a lower Socket Pool Size, as described in&nbsp;<a href=\"http:\/\/technet.microsoft.com\/en-us\/library\/ee649174(v=ws.10).aspx\">this article<\/a>:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Using&nbsp;<a href=\"http:\/\/technet.microsoft.com\/en-us\/library\/cc772069.aspx\">dnscmd.exe<\/a><\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>Open an elevated Command Prompt (Run as Administrator&#8230;)<\/li><li>Issue\u00a0<code><strong><em>dnscmd \/Config \/SocketPoolSize &lt;value><\/em><\/strong><\/code>\u00a0where\u00a0<code>&lt;value><\/code>\u00a0is a number between 0 and 10000<\/li><li>Restart the DNS Server service:\u00a0<code><strong><em>net stop dns &amp;&amp; net start dns<\/em><\/strong><\/code><\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Using regedit.exe<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>Open\u00a0<code>regedit.exe<\/code>\u00a0and expand the\u00a0<code>HKLM<\/code>\u00a0hive<\/li><li>Navigate to\u00a0<code>SYSTEM\\CurrentControlSet\\services\\DNS\\Parameters<\/code><\/li><li>If not already present, create a new\u00a0<code>DWORD<\/code>\u00a0value named\u00a0<code>SocketPoolSize<\/code><\/li><li>Set a decimal value between 0 and 10000<\/li><li>Restart the DNS Server service:\u00a0<code><strong><em>net stop dns &amp;&amp; net start dns<\/em><\/strong><\/code><\/li><\/ul>\n\n\n\n<p>Be aware that setting the value too low, effectively defeats the purpose of MS08-037<\/p>\n\n\n\n<p>If you&#8217;re on Windows Server 2008 R2 and just want to make sure that a number of individual UDP endpoints are not used by DNS, you can also specify a list of port ranges to be excluded from use by DNS:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dnscmd \/Config \/SocketPoolExcludedPortRanges &lt;start&gt;-&lt;end&gt;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u7528NetStat\u547d\u4ee4\u67e5\u770b\u670d\u52a1\u5668\u7aef\u53e3\u65f6,\u53d1\u73b0\u670d\u52a1\u5668udp\u7aef\u53e3\u5f00\u653e\u4e86\u597d\u591a,\u6700\u5c11\u57281000\u4e2a\u4ee5\u4e0a,,\u7ecf\u8fc7\u4ed4\u7ec6\u4ed4\u7ec6\u68c0\u67e5 &#8230; <a title=\"windows\u670d\u52a1\u5668\u5927\u91cf\u7aef\u53e3\u88abdns.exe\u5360\u7528\u7684\u89e3\u51b3\u65b9\u6cd5  DNS.EXE allocates 5000+ ports immediately and Used large RAM\" class=\"read-more\" href=\"https:\/\/airy.cn\/WordPress\/?p=905\" aria-label=\"\u9605\u8bfb windows\u670d\u52a1\u5668\u5927\u91cf\u7aef\u53e3\u88abdns.exe\u5360\u7528\u7684\u89e3\u51b3\u65b9\u6cd5  DNS.EXE allocates 5000+ ports immediately and Used large RAM\">\u9605\u8bfb\u66f4\u591a<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kadence_starter_templates_imported_post":false,"footnotes":""},"categories":[2],"tags":[],"class_list":["post-905","post","type-post","status-publish","format-standard","hentry","category-airy-tech"],"_links":{"self":[{"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=\/wp\/v2\/posts\/905","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=905"}],"version-history":[{"count":1,"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=\/wp\/v2\/posts\/905\/revisions"}],"predecessor-version":[{"id":906,"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=\/wp\/v2\/posts\/905\/revisions\/906"}],"wp:attachment":[{"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=905"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=905"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=905"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}