boren wrote:
我設定完第4步驟後,執行第6步驟的結果並沒有成功將src address加入address list...(恕刪)
誠如 Y 大所說, 原因太多了, 你可以多調整幾個參數 debug, 另外做 content filter 是很消耗系統資源的, 建議儘可能將條件設的更嚴謹, 例如針對 protocol & port number 加此限制, 這樣效能上會更好些.
YAWPYNG wrote:
這有太多種可能了。。...(恕刪)
pctine wrote:
誠如 Y 大所說, ...(恕刪)
/system scripts scripts
新增:
source欄內文:#定義 no.ip 相關設定,以下自行修改:
#============================================================
:local DDNSUser "no-ip帳號"
:local DDNSPassword "no-ip密碼"
:local DDNSHost "申請的no-ip地址"
#============================================================
#以下程式如不瞭解,建議不要修改:
#------------------------------------------------------------------------------------------
#定義 IP 變數
:local DDNSIP
:global DDNSLastIP
#定義變數預設值
:if ([ :typeof $DDNSLastIP ] = nil ) do={ $DDNSLastIP "0.0.0.0" }
#利用HTTP查詢Public IP
/tool fetch address=checkip.dyndns.com src-path=/ mode=http dst-path=("PublicIP");
:delay 1;
#讀取檔案
:set DDNSIP [/file get PublicIP contents];
:set DDNSIP [:pick $DDNSIP 0 [:find $DDNSIP "</body>"]];
:set DDNSIP [:pick $DDNSIP ([:find $DDNSIP ":"]+2) 100];
#刪除檔案
/file remove PublicIP;
#判斷是否要更新 IP
:if ([ :typeof $DDNSIP ] = nil ) do={
:log error ("DDNS no.ip: 網路未取得 IP 位址")
} else={
:if ($DDNSIP != $DDNSLastIP) do={
# 更新 DDNS IP
:local url "/nic/update?hostname=$DDNSHost&myip=$DDNSIP"
/tool fetch address=dynupdate.no-ip.com src-path=$url mode=http user=$DDNSUser password=$DDNSPassword dst-path=("DDNS_no_ip")
:delay 1
# 檔案內容
:local filestr [ /file get "DDNS_no_ip" contents];
# 刪除檔案
:local filename [ /file find name="DDNS_no_ip"];
/file remove $filename
# 變更是否成功
:if ( [ :find $filestr "good"] = "0" || [ :find $filestr "nochg"] = "0" ) do={
:log warning ("DDNS no.ip: 網路更新 IP 位址 " . $DDNSIP)
:set DDNSLastIP $DDNSIP
} else={
:log error ("DDNS no.ip: 網路更新 IP 位址失敗 " . $DDNSIP)
}
}
}
#------------------------------------------------------------------------------------------
/system scheduler
新增:
On Event欄內文:/system script run no-ip_ddns_update
pctine wrote:
RouterOS 6...(恕刪)