如何讓 Windows自行DDNS nsupdate + Bind
終於讓我找到參考的程式
ref: http://caunter.ca/nsupdate.txt

自行稍作修改

REM +——————————————
@echo off

SET tmp_file=ddns_update_win_tmp.txt
SET dns_server=10.1.1.3
SET key_file="Kwn.+157+26765.key"
SET nsupdate_exe=nsupdate.exe

:: Get the IP address

for /f "tokens=2-6 delims=:. " %%a in ('ipconfig') do if "%%a"=="Address" (if not "%%b"=="0" call :test %%b %%c %%d %%e)
goto :EOF

:test
     if /I "%1" NEQ "10" goto nsupdate
     goto :EOF

:nsupdate
echo server 10.1.1.3 > %tmp_file%
echo update delete wn.ssorc.tw. A >> %tmp_file%
echo update add wn.ssorc.tw. 600 A %1.%2.%3.%4 >> %tmp_file%
echo send >> %tmp_file%

%nsupdate_exe% -k %key_file% -d %tmp_file%

:EOF
REM ——————————————+

注意事項:
nsupdate時這裡不使用 -v參數而改用 -d參數
發現 -v時,DNS Server上會有下列錯誤訊息

unable to convert errno to isc_result: 64: 指定的網路名稱無法使用。

errno2result.c:66: unexpected error:

Related posts 相關文章
DNS BIND 9.16.50 最後一個版本已釋出
More...
DNS BIND 9.16 版本將 EOL
More...
在 Windows 上面 Plesk Obsidian 18.0.60 後不再維護 BIND DNS
More...
google 搜尋上的廣告連結 keepass.info 不要亂點
More...

作者

留言

撰寫回覆或留言

發佈留言必須填寫的電子郵件地址不會公開。