Page 1 of 1

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

Posted: Mon Aug 31, 2020 10:32 pm
by sebus
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

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

Posted: Mon Aug 31, 2020 10:44 pm
by mkx
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.

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

Posted: Tue Sep 01, 2020 3:56 am
by anav
as stated by mkx, what is mad, is not posting your requirements clearly.

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

Posted: Tue Sep 01, 2020 8:26 am
by sebus
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

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

Posted: Tue Sep 01, 2020 8:54 am
by vecernik87
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.

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

Posted: Tue Sep 01, 2020 2:42 pm
by anav
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.