原Gfx有協助我寫一個,結果這幾天連不回去Hap只好重置,殊不知之前備份的設定檔案忘記備份密碼
然後就連不回去了
用處大概是這樣
當inter1 counter tx >10G 關閉interface 1
:local up [/interface get ether1 fp-tx-byte]
:local down [/interface get ether1 fp-tx-byte]
:if {[up>=10630044057]do[/interface inter1 = disable]}
:if {[down>=10630044057]do[/interface inter1 = disable]{
然後還有一個是每天重置Ether1的計數器,想麻煩大家指點哪邊有問題
印象中內容大概這樣,但忘記怎麼寫了
a22548546 wrote:
想請問一下有關MikroTik...(恕刪)
#取得ether1目前是on或off
:local eth1 (![/interface get ether1 disabled])
#取得系統時間
:local time [/system clock get time]
#取得ether1傳輸數值
:local up [/interface get ether1 fp-tx-byte]
:local down [/interface get ether1 fp-rx-byte]
:local total ($up+$down)
#單位換算
:local kb ($total/8)
:local mb ($kb/1024)
:local gb ($mb/1024)
#若系統時間是00時00分,重置ether1數值,並將ether1強制on
:if ($time<00:01:00) do={/interface ethernet reset-counters ether1 ; /interface enable ether1}
#若系統時間大於00時00分,ether1為on,數值大於10gb,關閉ether1
:if ($time>00:00:59 && $eth1=yes && $gb>10) do={/interface disable ether1}
附上網路環境圖

設備:MikroTik Hapac2
版本:7.1.1

WireGuard Interface設定值


測試端Client設定值

只有NAT有設定其他防火牆都關閉

有詢問過新永安有沒有擋Port,他們回說沒有擋
內文搜尋

X