Monday, 12 April 2021

Port Exhaustion and DNS server on Windows 2012 / 2008

Seen an old issue on some servers where the DNS server starts to trigger port exhaustion on a server, this can lead to the server starting to act really weird, applications will start the time out, window shares will stop working but some may remain if the connection was made before it happened.

The problem is that once you have it you can not check as the server is half locked up and may not running any applications so you have to reboot which in turn removes the issue.

but if its DNS getting out of control you can see this by running the following as administrator in cmd

netstate -aon

Which will show you all the ports that the system has open,  if you notice a process id taking an usually amount of ports, say like the DNS Server process taking a lot even when restarted you can limit this with the follow reg key.

  • Open regedit.exe and expand the HKLM hive
  • Navigate to SYSTEM\CurrentControlSet\services\DNS\Parameters
  • Create a new DWORD value named SocketPoolSize
  • Set a decimal value between 0 and 10000
  • Restart the DNS Server service: net stop dns && net start dns
I would recommend starting at 500 and see the network response and if you get any DNS issue increase until you get a nice balance.

I would also recommend DNS servers to be they own OS and not mixed with everything else like a resurrected SBS system as they where the primary sources of port exhaustion.

No comments:

Post a Comment