Community discussions

MikroTik App
 
binhorp
newbie
Topic Author
Posts: 39
Joined: Wed Mar 05, 2008 4:40 pm

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

Mon Jan 03, 2011 5:28 pm

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!
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

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

Mon Jan 03, 2011 9:41 pm

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
};

Who is online

Users browsing this forum: No registered users and 3 guests