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

    How do I set up a static route without a local gateway?

    Scheduled Pinned Locked Moved General pfSense Questions
    3 Posts 2 Posters 1.9k 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
      mgaudette
      last edited by

      Hi,

      Ive done the following on a Linux server (lets say at address 66.66.66.66), and would like to replicate the equivalent function on a pfSense router :
      ip route add 192.168.1.0/24  via 55.55.55.55 (<–- pfSense router)

      This allows me to ping 192.168.1.x addresses even if I am completely outside this LAN.  (firewall rules being properly configured)

      I want to do the same for PCs behind a second pfSense router, in effect linking 192.168.2.x and 192.168.1.x as if they were connected locally). How do I setup this route on that other pfSense machine?

      I can't create a new gateway (55.55.55.55) that isn't on the same subnet as that other pfSense machine.

      1 Reply Last reply Reply Quote 0
      • C
        cmb
        last edited by

        That's not a valid network topology. Some OSes don't care and will ARP anything you want them to, FreeBSD won't (without some trickery that's best avoided). Static routes have to point to a local gateway.

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

          Too bad, thanks a lot for this clear answer.

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