宅就是顧家 wrote:
我目前的環境是PPP...(恕刪)
原來如此,瞭解了
| [/ip route rule get number=0 table]."的IP為".[/ip route rule get number=0 src-address] |
宅就是顧家 wrote:通知pppoe-out2更新的script:
請問 若想要抓pppoe...(恕刪)
| :local public /interface pppoe-client monitor pppoe-out2 once do={:set public $"local-address"} :local past [/ip route rule get *2 src-address] :set past [:pick $past 0 [:find $past "/"]] :if ($past!=$public) do={ :local date [/system clock get date] :local mm [:find 0,jan,feb,mar,apr,may,jun,jul,aug,sep,oct,nov,dec [:pick $date 0 3]] :if ($mm<10) do={:set mm "0$mm"} :set date "$mm$[:pick $date 3 11]" :local title "Update pppoe-out2 : $past => $public" :local content "pppoe-out2 address changed at $[/system clock get time] $date" /tool e-mail send to=[/tool e-mail get from] \ subject=$title body="$content\\n\\r$title" } |