Multiple routing tables by LAN address solution?
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
18.104.22.168 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. 22.214.171.124 is a public address and host on the Internet as an exception to table 10 rules.