Community discussions

MikroTik App
 
sebus
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 67
Joined: Sun Mar 12, 2017 6:29 pm

[Q] how to add multiple firewall ip address in a single list?

Mon Aug 31, 2020 10:32 pm

There was a question here - viewtopic.php?t=64777

Which does not answer anything. Doing it this way creates separate lists with exact the same name (which looks mad to me!)

sebus
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 12990
Joined: Thu Mar 03, 2016 10:23 pm

Re: [Q] how to add multiple firewall ip address in a single list?

Mon Aug 31, 2020 10:44 pm

Commands, posted by @mrz, create single address list with certain name and add multiple IP addresses (or, by defining subnet mask, rather multiple IP subnets). That address list can then be referred in certain firewall rules.

If you describe a particular use case, we can show you how to use address list.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 21933
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: [Q] how to add multiple firewall ip address in a single list?

Tue Sep 01, 2020 3:56 am

as stated by mkx, what is mad, is not posting your requirements clearly.
 
sebus
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 67
Joined: Sun Mar 12, 2017 6:29 pm

Re: [Q] how to add multiple firewall ip address in a single list?

Tue Sep 01, 2020 8:26 am

Exactly like per title:

I need a single list called MyList which contains two separate IPs xx.xx.xx.xx & yy.yy.yy.yy
They are not subnets, just two external IPs
It is impossible to add in GUI
In CLI
add list=

creates in my case:
Flags: X - disabled, D - dynamic 
 #   LIST         ADDRESS            CREATION-TIME        TIMEOUT             
 0   vlan99       192.168.99.0/24    apr/07/2017 12:49:26
 1   internal     192.168.88.0/24    apr/07/2017 12:50:08
 2   MyList       xx.xx.xx.xx        apr/07/2017 21:12:09
 9   MyList       yy.yy.yy.yy        aug/31/2020 20:29:26
Unless it is such unfortunate display
 
User avatar
vecernik87
Forum Veteran
Forum Veteran
Posts: 891
Joined: Fri Nov 10, 2017 8:19 am

Re: [Q] how to add multiple firewall ip address in a single list?

Tue Sep 01, 2020 8:54 am

It is not unfortunate display. You are not really creating lists. You are creating address entries which have property "list". As long as the property "list" is same, entries are considered to be part of the same list. Once you use the list somewhere, all entries with the same property will be used.

In your example, there are not two lists named same way. There is a single one. There are, however, two entries which belong to it.
Items number 2 and 9 are part of the same list named "MyList".

In GUI it is possible to do the same way as you did in CLI.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 21933
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: [Q] how to add multiple firewall ip address in a single list?

Tue Sep 01, 2020 2:42 pm

address lists works great!
I will agree that it would be way cooler to have a more sophisticated way to add them and delete them in the GUI, but it works just fine.

Who is online

Users browsing this forum: kymo2 and 21 guests