Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    command line to add new host/net in alias

    Scheduled Pinned Locked Moved General pfSense Questions
    6 Posts 3 Posters 1.2k Views 3 Watching
    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.
    • T
      tomli
      last edited by

      HI all,

      Can I use command line to add a new host / net in the existing alias?

      Thanks

      1 Reply Last reply
      Reply Quote 0
      • NogBadTheBadN
        NogBadTheBad
        last edited by NogBadTheBad

        https://www.freebsd.org/cgi/man.cgi?query=pfctl(8)&sektion=

        [2.4.5-RELEASE][admin@pfsense]/root: pfctl -t h_dl_snom -T add 1.2.3.4/32
        1/1 addresses added.
        [2.4.5-RELEASE][admin@pfsense.]/root: 
        
        [2.4.5-RELEASE][admin@pfsense]/root: pfctl -t h_dl_snom -T delete 1.2.3.4/32
        1/1 addresses deleted.
        [2.4.5-RELEASE][admin@pfsense]/root: 
        
        [2.4.5-RELEASE][admin@pfsense]/root: pfctl -t h_dl_snom -T show
           188.40.44.83
        [2.4.5-RELEASE][admin@pfsense]/root: 
        

        Where h_dl_snom = the table name

        Andy

        1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

        1 Reply Last reply
        Reply Quote 0
        • T
          tomli
          last edited by

          thank you very much.

          1 Reply Last reply
          Reply Quote 0
          • kiokomanK
            kiokoman LAYER 8
            last edited by

            it will not survive a reboot or a reload if you don't put that inside the config.xml

            ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
            Please do not use chat/PM to ask for help
            we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
            Don't forget to Upvote with the 👍 button for any post you find to be helpful.

            NogBadTheBadN 1 Reply Last reply
            Reply Quote 1
            • NogBadTheBadN
              NogBadTheBad @kiokoman
              last edited by NogBadTheBad

              @kiokoman said in command line to add new host/net in alias:

              it will not survive a reboot or a reload if you don't put that inside the config.xml

              Oops forgot about that, there is a bulk import if you need to add a load of entries.

              Firewall -> Aliases -> Bulk import

              You might be able to do something a bit funky like pfBlocker does with URLs, not sure how often they fetch the list.

              Screenshot 2020-09-03 at 14.44.08.png

              Screenshot 2020-09-03 at 14.48.44.png

              Andy

              1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

              1 Reply Last reply
              Reply Quote 0
              • T
                tomli
                last edited by

                This post is deleted!
                1 Reply Last reply
                Reply Quote 0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                • First post
                  Last post
                Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
                Privacy Policy · Cookie Policy