Static Route for a network behind OpenVPN

Started by abel408, October 12, 2022, 08:26:47 PM

Previous topic - Next topic
Hi all,

I have OpenVPN set up with several clients. Each client has a /24 network in the 10.1.0.0/16 range (client1 is 10.1.1.0/24, client 2 is 10.1.2.0/24, etc...). This works great, although I'm not sure how these routes are created. I notice in my routes -> Status I have this entry for my VPN networks: ipv4   10.1.0.0/16   10.1.0.2   UGS   214746   1500   ovpns1

It looks like a static route, but I don't believe I have that defined anywhere. It's not in my Route -> All list and I don't have an interface assigned nor a gateway setup for OpenVPN.

Everything currently it working great, but I want to add another VPN network that has a 10.2.0.0/16 subnet behind it. I'm not sure how to create a route for this network that would direct traffic destined to 10.2.0.0/16 to OpenVPN. I tried to create an interface for ovpns1, but when I enabled it and assigned it the 10.1.0.2 address, it killed all my other VPN connections.

How are these VPN routes created in OpnSense? Any help is greatly appreciated!

The tunnels have direct interfaces on OPNsense (ovpns1, ovpns2, etc.)

Open a console to your firewall and select 8 for shell, then run ifconfig. You'll see them all listed.

Since the firewall has an interface on each subnet, it doesn't need an explicit route.

Bart...