Import an alias list?
-
I did several searches on the forum, but I couldn't find this answer. I have a large list of IPs I'd like to put in an alias list, but the only way I can see doing this is by entering 1 IP at a time. Is there any way to import the list from a text file? Or maybe if anyone could tell me where the alias lists are located on the the file system, I'll just use SCP to get it done.
-
If you open a saved config with an alias list they appear to be in one field. I would try creating the alias and adding one ip, then edit the XML file and edit the address field. If you selected hosts, the field is a list of the ips:
1.2.3.4 1 1.2.3.5 1.2.3.6
If you selected networks, there is a network notation:
1.2.3.0/24 1.3.3.0/24 1.5.6.128/25
etc…
I would paste the list in with an xml editor then reload the box with the edited config. And hope it worked. I haven't tried doing this myself. -
That'll work. Just make sure you keep a copy of the original unedited file in case you mess it up.
-
Thanks for the replies. I did some digging and I do see that the config.xml file has the alias lists. I see that the address section is pretty straight forward, but do I need to put information in the corresponding <detail>section?
Since this information would be right in the config.xml file, I'm a bit concerned about putting in too many aliases for fear this will slow down bootup and general operation of my pfSense box. The list I might want to import may have hundreds or thousands of IPs. Would such a large alias list negatively impact the performance of pfSense?</detail>