Page 1 of 1

Later add the ip address-list logging on to the hotspot

Posted: Mon Jan 03, 2011 5:28 pm
by binhorp
Hello everyone!
I'm trying to make a script to add ips for a profile to a hotspot-address list in version 3.30 is the script executed by all who are part of this profile the problem is that I am not able to get the ip of these customers
here's the script so that someone can help me figure out where this error.


:global ipadd "";
:foreach i in=[/ip firewall filter find chain="bloqueio" ] do={
:set ipadd [/ip firewall filter find chain="bloqueio" get $i src-address];
/ip firewall address-list add address=$ipadd list=Bloqueio
};



thank you all and a happy 2011!

Re: Later add the ip address-list logging on to the hotspot

Posted: Mon Jan 03, 2011 9:41 pm
by SurferTim
I haven't tested it but this should work:
:global ipadd "";
:foreach i in=[/ip firewall filter find chain="bloqueio" ] do={
   :set ipadd [/ip firewall filter get $i src-address];
   /ip firewall address-list add address=$ipadd list=bloqueio
};