You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
:local primaryDns "172.16.0.10"
:local backupDns1 "223.5.5.5"
:local backupDns2 "223.6.6.6"
:local currentDns [/ip dns get servers]
:if ([/ping $primaryDns count=3] = 3) do={
:if ($currentDns != $primaryDns) do={
/ip dns set servers=$primaryDns
/ip dns cache flush
:log info "DNS set to $primaryDns and cache flushed"
}
} else={
:local backupDnsList "$backupDns1,$backupDns2"
:if ($currentDns != $backupDnsList) do={
/ip dns set servers=$backupDnsList
/ip dns cache flush
:log info "DNS set to backup DNS servers: $backupDns1, $backupDns2 and cache flushed"
}
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
配置 paopaodns
ppdns ip:172.16.0.10/16 ppgateway:10.10.0.10
配置防火墙劫持53到ROS
在配置完ppdns+ppgw后 system->script 添加脚本
然后在system->scheduler 添加定时器 dns-check为script的名称
另外 可以用
来检查youtube的连通性,来进行故障转移,在ppgw/ppdns故障后 不影响访问正常的国外网站.
后续会完善脚本.
Beta Was this translation helpful? Give feedback.
All reactions