Navigation

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

    Alias table bulk loading

    General pfSense Questions
    4
    7
    337
    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
      • KOM
        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
            • jimp
              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
                • Derelict
                  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
                  The pfSense Book is free of charge!
                  DO NOT set a source 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