修复上下线脚本 snat 查找逻辑
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
:log debug "用户 $"remote-address" 下线"
|
||||
|
||||
# 删除旧的分配规则
|
||||
:local "snat-address" [/ip/firewall/nat/get [find src-address $"remote-address"] to-addresses]
|
||||
/ip/firewall/nat/remove [find where src-address $"remote-address"]
|
||||
:local "snat-address" [/ip/firewall/nat/get [find comment~"snat $"remote-address""] to-addresses]
|
||||
/ip/firewall/nat/remove [find comment~"snat $"remote-address""]
|
||||
|
||||
:log debug "删除旧的 nat 规则"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
:log debug "用户 $"remote-address" 上线"
|
||||
|
||||
# 删除旧的分配规则
|
||||
/ip/firewall/nat/remove [find where src-address $"remote-address"]
|
||||
/ip/firewall/nat/remove [find comment~"snat $"remote-address""]
|
||||
|
||||
:log debug "删除旧的 nat 规则"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user