OPNsense Forum

Archive => 22.1 Legacy Series => Topic started by: abel408 on October 12, 2022, 08:26:47 PM

Title: Static Route for a network behind OpenVPN
Post by: abel408 on October 12, 2022, 08:26:47 PM
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!
Title: Re: Static Route for a network behind OpenVPN
Post by: bartjsmit on October 13, 2022, 07:45:40 AM
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...