Hi, Am runing this code in the login hotspot script, but not working
:global d $address;
:foreach ipm in=[/ip firewall mangle find src-address=“$d”] do={:log info message=(“ipm:$ipm”);}
/ip firewall mangle
:foreach MR in=[find where src-address !=""] do={
:local SRCip [get $MR src-address];
:if ([:len "$SRCip"] > 0) do={
:put "$SRCip";
}
}
Test this code:
/ip firewall mangle
:foreach MR in=[find where src-address !=""] do={
:local SRCip [get $MR src-address];
:if ([:len "$SRCip"] > 0) do={
:log info "$SRCip";
}
}