0

I have a following scenario (see also 1):

  • OpenVPN access server on DigitalCloud to make secure connection between configuration PC and IOT-gateway
  • IOT-gateway PC Ubuntu 20.04 connected to the VPN server as a client via ethernet interface eth0. IOT-device network is connected to the another ethernet interface eth1
  • IOT devices are connected to the IOT-gateway via layer 2 switch. No router on network all devices have static IP's.
  • Client configuration PC connected to the VPN server as a client (Windows)

Question: I want achieve a connection from configuration PC to the IOT-devices on network 192.168.50.0 via OpenVPN access server. What configuration is needed on OpenVPN server and IOT-gateway?

I have successfully SSH-connected from configuration PC to the IOT-gateway via VPN.

Network configuration

Edit: Improved network diagram based on comments, removed OpenVPN server configuration

network diagram

4
  • your network documentation is very unclear, is the switch Layer3? what are the sample IPs of each device, what is doing the routing and I don't follow the random NAT when speaking of routes, you would only NAT if you want to change the source IP addresses (say for a non-routable private address to a routable public address) which will prevent direct access in the reverse without static port address translations (portmap, called a few different things). Generally speaking, your should advertise all connected networks on the VPN to the VPN clients if you want them to talk directly to each other. Aug 31, 2020 at 12:32
  • Diagram updated and sample IP's added to the diagram. Network behind the "eth1" is usually without router and all the devices have static IP, switch is layer 2. Question is how can i forward subnet 192.168.50.0 to VPN server and expose it to configuration PC.These IOT-devices shall not be directly connected to internet therefore we have two separate NIC's on IOT-gateway and in most cases these are part of the factory network.
    – deafleaf
    Aug 31, 2020 at 13:21
  • 1
    I think this link documents what you want to do: community.openvpn.net/openvpn/wiki/RoutedLans. It's all about routing (system+internal OpenVPN's aka "iroute" ). There's no need for NAT or iptables here.
    – A.B
    Aug 31, 2020 at 23:44
  • (1) Your IOT gataway is or should be a router, you need to add route to the destination network there. (2) You probably need to have site-to-site VPN on this gateway, which is different from client-to-server VPN. (3) If there is no site-to-site VPN, then you need some kind of NAT on the gateway and also port forwarding into your IOT network in order for your PC to reach IOT network. Sep 10, 2020 at 9:40

0

You must log in to answer this question.

Browse other questions tagged .