×

RouterOS 实用脚本

hqy hqy 发表于2024-11-28 15:54:42 浏览252 评论0

抢沙发发表评论

更新 WireGuard peer 地址。

1
2
:global ip [:resolve vpn.example.com]
/interface/wireguard/peers/set endpoint-address=$ip [find where comment="test"]

获取公网 IP。

1
2
:global ip [([/tool/fetch "http://myip.dnsomatic.com/" output=user as-value]->"data")]
:put $ip

获取网页 response body。

1
2
:global result [([/tool/fetch "http://example.com" output=user as-value]->"data")]
:put $result

配置 NTP 服务器。

1
2
3
4
5
6
7
8
9
10
11
12
/system ntp client
set enabled=yes
/system ntp server
set enabled=yes
/system ntp client servers
add address=pool.ntp.org
add address=time.apple.com
add address=time.google.com
add address=time.windows.com
add address=time.cloudflare.com
add address=stdtime.gov.hk
add address=time1.cloud.tencent.com




推荐本站淘宝优惠价购买喜欢的宝贝:

image.png

本文链接:https://www.jinbel.cn/post/8660.html 非本站原创文章欢迎转载,原创文章需保留本站地址!

分享到:
打赏

群贤毕至

访客

您的IP地址是: