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

    Alias table bulk loading

    General pfSense Questions
    4
    7
    842
    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.
    • A
      aagaag
      last edited by

      Is there a way to load a table of (hundreds of) aliases onto pfSense via SSH, rather than inserting them one-by-one via the GUI?

      1 Reply Last reply Reply Quote 0
      • KOMK
        KOM
        last edited by

        Use an URL Table Alias.

        https://doc.pfsense.org/index.php/Aliases#URL_Table_Aliases

        1 Reply Last reply Reply Quote 0
        • A
          aagaag
          last edited by

          a million thanks!!!

          1 Reply Last reply Reply Quote 0
          • A
            aagaag
            last edited by

            However, the tables seem to hold only lists of IP addresses. To fully automate the generation of aliases, it would be convenient to upload the alias names as well. Can that be done?

            1 Reply Last reply Reply Quote 0
            • jimpJ
              jimp Rebel Alliance Developer Netgate
              last edited by

              Diag> Backup and Restore > Are: Aliases, make a backup

              Then visit the same page and restore the Aliases area. That clobbers any existing aliases but it's the closest you'll get to bulk import from an existing set.

              Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

              Need help fast? Netgate Global Support!

              Do not Chat/PM for help!

              1 Reply Last reply Reply Quote 0
              • A
                aagaag
                last edited by

                Thank you. That is a possible workaround.

                I was thinking that all these lists, rules, etc. are certainly held by pfSense in some database. Might it be possible to directly manipulate the database table with SQL commands?

                1 Reply Last reply Reply Quote 0
                • DerelictD
                  Derelict LAYER 8 Netgate
                  last edited by

                  They are not in a database.

                  They are in the config.xml file at /cf/conf/config.xml.

                  You might be able to create one, get the XML format, and then script the creation of other entries then insert them but, all in all, you are probably looking to do something that is outside the scope of what the aliases are designed to handle at present.

                  Chattanooga, Tennessee, USA
                  A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                  DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                  Do Not Chat For Help! NO_WAN_EGRESS(TM)

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