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

    Is it possible to set up static routes for aliasses with subnets?

    Scheduled Pinned Locked Moved Routing and Multi WAN
    3 Posts 2 Posters 419 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.
    • M
      mrpsycho
      last edited by

      Hello,

      i've created 2 lists:

      • whitedomains
      • whitenets

      whitedomains consists of single IP addresses per line. and it works fine with "Static Routes"
      and whitenets looks like that:

      54.92.128.0/17
      54.93.0.0/16
      54.94.0.0/16
      54.95.0.0/16
      64.233.160.0/18
      66.102.0.0/20
      66.249.64.0/19
      67.202.0.0/18
      70.132.0.0/18
      71.152.0.0/17

      is it possible to create Static Routes for subnets?

      1 Reply Last reply Reply Quote 0
      • M
        mrpsycho
        last edited by

        looks like not.

        one of solution - sh script on every route changes in web GUI

        1 Reply Last reply Reply Quote 0
        • ?
          A Former User
          last edited by

          @mrpsycho:

          Hello,

          i've created 2 lists:

          • whitedomains
          • whitenets

          whitedomains consists of single IP addresses per line. and it works fine with "Static Routes"
          and whitenets looks like that:

          is it possible to create Static Routes for subnets?

          Yes, when creating a static route, put the alias name in the Destination Network field.  This works for both host lists and network lists.  Downside is that if the alias name is changed, although pfSense will update other tables with the new name, it will not update the static routes entries, you'll have to update the name change in the static route entry manually.  Also if your host list has domain names that round-robbin, your route table will not be updated each time the DNS record is refreshed.  Best to use only fixed IP's in host list if using for static routes.

          As an added note, you can include single IP address in a network alias list by using /32 mask. (host list just assumes all entries are /32 mask).  This would allow you to only have to maintain one list and one static route entry associated to that list.

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