JSI Tip 7799. How do I prevent the DNS Server service from registering extraneous interfaces, including those created by Routing and Remote Access?

The DNS Server service registers HOST records for all interfaces on the DNS Server computer, including interfaces created by Routing and Remote Access.

I have scripted PublishAddresses.bat to allow you to specify the interfaces you wish registered.

The syntax for using PublishAddresses.bat is:

PublishAddresses Ipaddress1 \[Ipaddress2 ... Ipaddressn\]

where only HOST records for each IP address listed will be registered.

NOTE: You may have to manually delete any previously registered IP Address using the DNS Manager, after running the script.

PublishAddresses.bat contains:

@echo off
if \{%1\}

\{\} goto syntax @echo REGEDIT4>"%TEMP%\PublishAddresses.reg" @echo.>>"%TEMP%\PublishAddresses.reg" @echo \[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DNS\Parameters\]>>"%TEMP%\PublishAddresses.reg" set PublishAddresses="PublishAddresses"=" :loop set PublishAddresses=%PublishAddresses%%1# shift if \{%1\}

\{\} goto finish goto loop :syntax @echo Syntax: PublishAddresses Ipaddress1 \[Ipaddress2 ... Ipaddressn\] exit /b 1 :finish set PublishAddresses=%PublishAddresses%" set PublishAddresses=%PublishAddresses:#"="% set PublishAddresses=%PublishAddresses:#= % @echo %PublishAddresses%>>"%TEMP%\PublishAddresses.reg" @echo.>>"%TEMP%\PublishAddresses.reg" @echo.>>"%TEMP%\PublishAddresses.reg" regedit.exe /s "%TEMP%\PublishAddresses.reg" del /q "%TEMP%\PublishAddresses.reg" net stop DNS net start DNS endlocal exit /b 0

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.