i need a script to add a range of ips to my address list smtp-allow
range is 192.168.80.1-192.168.80.254
Is there any particular reason you can’t just use 192.168.80.0/24 as one entry? Blocking the network and broadcast address isn’t going to do much good, and evaluating just one entry is considerably faster than evaluating 254.
Edit: but just for completion’s sake:
:for OCTET from=1 to=254 do={ /ip address-list add address="192.168.80.$OCTET" list=myListName }
by the way, in address-list you can add not only “192.168.80.0/24”, but also “192.168.80.1-192.168.80.254”, “192.168.80.80-192.168.80.90”, etc =)