Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Import an alias list?

    Scheduled Pinned Locked Moved Firewalling
    4 Posts 3 Posters 4.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      fcapizzo
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • dotdashD
        dotdash
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • C
          cmb
          last edited by

          That'll work. Just make sure you keep a copy of the original unedited file in case you mess it up.

          1 Reply Last reply Reply Quote 0
          • F
            fcapizzo
            last edited by

            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>

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.