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
setlocal
if \{%1\}<h1><a name="_goto_syntax_echo_REGEDIT4_gt_TEMP_PublishAddresses_reg_echo_gt_gt_TEMP_PublishAddresses_reg_echo_HKEY_LOCAL_MACHINE_SYSTEM_CurrentControlSet_Services_DNS_Parameters_gt_gt_TEMP_PublishAddresses_reg_set_PublishAddresses_PublishAddresses_loop_set_PublishAddresses_PublishAddresses_1#_shift_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\}</a></h1>\{\} 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