Score:0

How to connect to VPN clients on the VPN server of a different machine on the same network

cn flag

I have a cloud infrastructure with 10 servers and I have a local infrastructure and I want to connect them together. I have a VPN server in the cloud and I connected my local machines to the server on the cloud. I can access other machines on the cloud from my local machines but I can only access local machines on my VPN server, I want to be able to use the VPN server as a gateway so that I can connect to local machines from the VMs on the cloud without installing VPN clinet on each one of them. How can I do that?

My VPN server runs both Wireguard and OpenVPN servers.

Example ping codes (10.66.66.0/24 is the VPN subnet, 192.168.1.0/24 is the cloud subnet):

user@localmachine» ping -c4 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.727 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.716 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=0.690 ms
64 bytes from 192.168.1.1: icmp_seq=4 ttl=64 time=0.631 ms

user@cloudmachine» ping -c4 10.66.66.1
PING 10.66.66.1 (10.66.66.1) 56(84) bytes of data.
us flag
Let me get it straight: Do you want to connect to other VPN clients via the VPN server or do you want to connect to machines located **behind** said VPN client? Both things is possible with the right setup.
Enes Doğan avatar
cn flag
I want to connect to the machines that run VPN clients from the machines within the network of the VPN server without installing a VPN server.
us flag
Ah. That sound like classical `hub-and-spoke` setup. That is you are able to connect to a VPN client from another VPN client via the server. The solution varies depending on which technology you are using (OpenVPN, IPSec, WireGuard), but use Google and combine my keyword with the VPN technology you are using and I am pretty sure you will find **plenty** of guides. They way you are connecting is by calling the VPN ip address of the other client.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.