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

    Will changing router IP change all ips in firewall rules?

    Scheduled Pinned Locked Moved NAT
    4 Posts 2 Posters 2.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.
    • L Offline
      loudsubz
      last edited by

      I have a situation where I am looking at changing the router subnet from 192.168.1.1 to 192.168.100.1, and I have allot of rules in the firewall.

      If I change the pfsense IP is there an easy way for all the ips in the rule section to be changed to the new 192.168.100.X automatically?

      1 Reply Last reply Reply Quote 0
      • GruensFroeschliG Offline
        GruensFroeschli
        last edited by

        That depends on how you wrote your rules.

        If your LAN is 10.0.0.0/24 and you use in the default rule on the LAN as "source": "subnet: 10.0.0.0/24"
        Then yes you will need to rewrite all your rules.

        However if you use as "source": "subnet: lan-subnet" then you wont have to change the rule.

        We do what we must, because we can.

        Asking questions the smart way: http://www.catb.org/esr/faqs/smart-questions.html

        1 Reply Last reply Reply Quote 0
        • L Offline
          loudsubz
          last edited by

          I'm new to this so bear with me :D

          An example of a rule from the pfsense box right now is something like this:

          Proto Source Port Destination Port Gateway Schedule
          TCP  *  *  192.168.1.15  13500  *

          In NAT its:

          If Proto Ext. port range NAT IP Int. port range Description

          WAN  TCP  13500  192.168.1.25 (ext.: 67.69.12.98)  13500

          our LAN is 192.168.1.1 / 24

          1 Reply Last reply Reply Quote 0
          • GruensFroeschliG Offline
            GruensFroeschli
            last edited by

            Use aliases in your rules.
            Like this you only have to change the alias.

            We do what we must, because we can.

            Asking questions the smart way: http://www.catb.org/esr/faqs/smart-questions.html

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