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

    Allow all external IP's listed in text file - possible?

    Scheduled Pinned Locked Moved Firewalling
    5 Posts 2 Posters 1.7k 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.
    • N
      netphreak
      last edited by

      This is maybe a stupid idea… But here it goes:

      I want to allow external IP's from a text file, to access some services on my network. This text file is updated frequently, and holds from 20 - 50 public IP addresses.

      I am willing to get my hands dirty to achieve this. Is it possible?

      edit: forgot to mention - I currently run v. 1.2.3 on CF card. I may switch to hdd if it makes it easier.

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

        Take a look at the URL table alias package, it lets you load the contents of a url (containing IP and IP/CIDR entries, one per line) into an alias. You can add a cron job that runs the update script and it will pull in entries periodically.

        Then you can use that alias however you want in rules (though in 1.2.3 since it's a pf table, you can't negate it, e.g. ! <alias>)</alias>

        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
        • N
          netphreak
          last edited by

          What a wonderful solution! :)

          Thanks a million!

          Though, this means I need to abandon CF, right?

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

            No, it should work on NanoBSD/CF, unless you plan on updating that list every few minutes. The URL table package is designed to update no more than once per day (though that could be changed by editing the update script)

            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
            • N
              netphreak
              last edited by

              I just realized the firewall in subject is 1.2.3-RC1. I will upgrade that first.

              I tested the package on an vSphere server an hour ago - works exactly as it is designed to. This feature makes things so much easier for me :D Thank you for your work!

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