Here is our network setup:

enter image description here

The Device Manager software on Server A needs to open connections to Device B and Device C, which are on private subnets behind Servers B and C. I was told that it would be possible to do that if we put an OpenVPN server in front of Server A, and have an OpenVPN client on each of Servers A, B, and C that established a VPN connection to the OpenVPN server.

(Not shown in the diagram is that both Server B and Server C have a tun0 interface created by OpenVPN with a 10.0.8.x IP address. I also added a unique 172.16.1.x IP address to each tun0 interface.)

What we want to do is to have the Device Manager open a connection to Server B's 172.16.1.x address and have that connection attempt automatically go to Device B. Can we achieve this by adding routes to Servers A and B, and/or adding bridges, and/or doing some iptables forwarding? (Right now Server A cannot ping Server B's 172.16.1.x address, and I am not an expert at configuring those things.)

BTW, I installed OpenVPN server using https://github.com/Nyr/openvpn-install. The OpenVPN server.conf file contains:

local x.x.x.x
port 1194
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh.pem
auth SHA512
tls-crypt tc.key
topology subnet
ifconfig-pool-persist ipp.txt
keepalive 10 120
cipher AES-256-CBC
user nobody
group nogroup
status openvpn-status.log
verb 3
crl-verify crl.pem

The OpenVPN client config file contains:

dev tun
proto udp
remote x.x.x.x 1194
resolv-retry infinite
remote-cert-tls server
auth SHA512
cipher AES-256-CBC
ignore-unknown-option block-outside-dns
verb 3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.