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

    Multiple routing tables by LAN address solution?

    Scheduled Pinned Locked Moved Routing and Multi WAN
    1 Posts 1 Posters 282 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.
    • F
      fleece
      last edited by

      I've been using Linux VMs for a routing via VPN solution with multiple routing tables by source address.  I would like to consolidate to a single pfsense instance with OpenVPN…

      Before I spend a lot of time learning and trying in pfSense, can (and how) pfSense do this Linux equivalent?

      [user@host ~]# ip rule list
      0:      from all lookup 255
      32765:  from 192.168.0.176/29 lookup 10
      32766:  from all lookup main
      32767:  from all lookup default

      [user@host ~]# ip route list
      10.21.1.4 dev tun2  proto kernel  scope link  src 10.21.1.3
      192.168.0.0/24 dev eth0  proto kernel  scope link  src 192.168.0.2
      169.254.0.0/16 dev eth0  scope link
      default via 192.168.0.1 dev eth0

      [user@host ~]# ip route list table 10
      98.138.252.38 via 192.168.0.1 dev eth0
      192.168.0.0/24 dev eth0  scope link
      default via 10.21.1.4 dev tun2

      Explanation:  This is routing config above on my VPN gateway (192.168.0.2).  The default gateway and Internet router is 192.168.0.1 with a WAN interface.  10.21.1.4 is the remote VPN tunnel endpoint and default for table 10.  Table 10 applies to only traffic going to and from hosts 192.168.0.176/29 on the LAN.  All traffic to and from other hosts on LAN route through default 192.168.0.1.  98.138.252.38 is a public address and host on the Internet as an exception to table 10 rules.

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