Route one subnet through VPN, another one through regular gateway?
I have been fiddling around with this quite a while now and could not find out how to solve this problem - to be honest, I thought it was simpler than it turned out to be. I have subscribed to a VPN service which I already configured in pfSense. My LAN is 192.168.0.0/24 with DHCP. Now I want to manually assign some devices an address from the 192.168.1.0/24 range. These will be connected to the same physical interface. Now I want all that 192.168.1.0/24 devices to be routed through the VPN. I somehow need to configure a virtual IP 192.168.0.1 that I can use as a gateway for this subnet. The connection is established through OpenVPN and it was assigned a 10...* IP address.
Now do I need to create a new gateway with this address? What if this address changes at some stage? Do I need to set up additional rules for routing/NAT? Is it generally possible to achieve what I want?
These will be connected to the same physical interface.
Doesn't work that way if your network is 192.168.0/24 you can not just add devices using 192.168.1/24
I would suggest you do some research on basic networking 101 before you start playing with policy routing. Change your lan network to /23 if you want to use both .0.x and .1.x addresses. Or put this .1/24 on its own vlan, etc.
Then its very simple to policy route out any clients you want via your vpn. Just make sure to turn off default route from your vpn connection in pfsense and just policy route who you want to use or not use the vpn connection.