Routing through connector

Next-generation cloud-hosted OpenVPN business solution.
Post Reply
theodoros-medifil
OpenVpn Newbie
Posts: 2
Joined: Mon Oct 24, 2022 4:56 am

Routing through connector

Post by theodoros-medifil » Mon Oct 24, 2022 5:05 am

I am a brand new user of OpenVPN Cloud services and till now i am happy with the service.
I installed the connector to one RPi4 running Ubuntu 22.04 LTS and through this connector i have access to my internal network.
My question is:
In case that i am updating the subnets in the network that the connector is installed, how the connector will know the updated subnets to route traffic accordingly? If for example the connector has access to two subnets, lets say 192.168.10.0/24 and 192.168.20.0/24. During the creation of the network i added the first subnet but later on i decided to add the second one also. How will the connector know about my changes in order to function as a gateway to 2 subnets?

User avatar
openvpn_inc
OpenVPN Inc.
Posts: 1333
Joined: Tue Feb 16, 2021 10:41 am

Re: Routing through connector

Post by openvpn_inc » Mon Oct 24, 2022 11:11 am

Hello theodoros-medifil,

The routing has to occur in all places for things to work;

1.) OpenVPN Cloud has to be told the new subnet is reachable through this Connector. That will ensure that the routing in OpenVPN Cloud is updated so that the new subnet gets routed to the Connector, which will then in turn forward it onto its local network.
2.) The Connector itself has to be made aware somehow that there is a new subnet in the local network. There are different ways of dealing with this depending on what you want to do. Most commonly there will be a router that serves as the default gateway for Internet access and access to other local subnets that will take care of this routing to the new subnet. If your Connector has this router configured as its default gateway then when packets come in from OpenVPN Cloud with a destination in the new subnet, it will not know where to send it, but instead will forward it to the default gateway, which will then forward it to the new subnet. Alternatively, a route can be added in the operating system of the Connector to point this new subnet to a particular router that can take care of dealing with this traffic. Another option is to add another (alias) network interface to add the Connector to the new subnet so it is then aware of it and can forward the traffic there directly. That is probably not such a good option given the need to route back to OpenVPN Cloud, and having multiple gateways to do that will be confusing to all.
3.) The new subnet itself needs to have a path back to OpenVPN Cloud, and usually this is accomplished again by using a router that serves as default gateway and has some routes set up that point the OpenVPN Cloud subnet to the Connector's local IP address, ideally the same router that serves as default gateway for the OpenVPN Connector.

So in short to answer your question more directly - you ensure that the Connector can reach the new 192.168.20.0/24 subnet somehow. Perhaps easiest to rely on the default gateway and ensure that that has access to the new subnet. Next you ensure that this new subnet also knows how to reach the OpenVPN Cloud network, through the Connector's local IP. And you add the new subnet to the Connector on OpenVPN Cloud. That's it.

Kind regards,
Johan
Image OpenVPN Inc.
Answers provided by OpenVPN Inc. staff members here are provided on a voluntary best-effort basis, and no rights can be claimed on the basis of answers posted in this public forum. If you wish to get official support from OpenVPN Inc. please use the official support ticket system: https://openvpn.net/support

theodoros-medifil
OpenVpn Newbie
Posts: 2
Joined: Mon Oct 24, 2022 4:56 am

Re: Routing through connector

Post by theodoros-medifil » Mon Oct 24, 2022 2:17 pm

Thank you so much for your answer, it was so clear.

Post Reply