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

    Use non-local gateway through interface specific route - fails

    Scheduled Pinned Locked Moved Routing and Multi WAN
    2 Posts 2 Posters 1.8k 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.
    • K
      krbvroc1
      last edited by krbvroc1

      My pfSense installation at my ISP requires the default gateway to be outside my subnet. This is an installation for personal use (VPN on the road).

      The IP of pfSense is 192.168.200.200/32 and my ISP gateway is 192.168.100.6 (public IP's redacted)

      For many years I have 'worked around' this by using 'shellcmd' to run the following script:

      route add 192.168.100.6 -interface vtnet0
      route add default 192.168.100.6

      The 'problem' with this setup is that is does not provide a default gateway under system->routing->gateways for IPv4
      Instructions for things like wireguard setup ask me to ensure this is setup.

      I removed my shellcmd, added a default gateway (needing to check the advanced setting 'Use non-local gateway through interface specific route.' and restarted pfsense.

      I could no longer connect to the gateway via the Internet (needed console/shell).

      When comparing tcpdump upstream between working and non-working setups...
      The shellcmd method showed the source IP of ping packets coming from the pfSense IP 192.168.200.200
      The 'correct method' showed the source IP of ping packets coming from '0.0.0.0' and thus does not work.

      Is this a bug or am I missing something?

      L 1 Reply Last reply Reply Quote 0
      • L
        lucasll @krbvroc1
        last edited by

        @krbvroc1
        Hello.
        You can use option SYSTEM - ROUTING - GATEWAYS - clic ADD - clic DISPLAY ADVANCED - check "Use non-local gateway"
        Regards.

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