Community discussions

MikroTik App
 
andrescamino
Member Candidate
Member Candidate
Topic Author
Posts: 198
Joined: Wed Aug 19, 2009 7:07 pm
Location: Guayaquil-Ecuador

add ip address automatically with script

Thu Sep 23, 2010 2:58 am

Hello to all

I am new at scripting, I thought I understood but seems like not...
I would like to add 100 ip address to the address list in firewall...and this was what I did
:for e from 1 to 100 do={
    /ip firewall address-list add list=algo address=1.1.1. . $e 
}

then what i did was Selecting that script called test and clicking on Run Script and checked for the address list in the firewall but no luck...

What is the problem here??
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: add ip address automatically with script

Thu Sep 23, 2010 3:59 am

:for e from=1 to=100 do={
    /ip firewall address-list add list=algo address="1.1.1.$e" 
}

Who is online

Users browsing this forum: No registered users and 11 guests