Access devices behind OpenVPN client through VPN Client Subnet IP

Business solution to host your own OpenVPN server with web management interface and bundled clients.
Post Reply
mani9876
OpenVpn Newbie
Posts: 1
Joined: Tue Jul 28, 2020 12:08 pm

Access devices behind OpenVPN client through VPN Client Subnet IP

Post by mani9876 » Tue Jul 28, 2020 12:13 pm

Hello,

I have a rather special configuration, but I know it's doable with OpenVPN and Linux, but don't know how ;-).

I have an OpenVPN Server (OpenVPN AS) running on the public internet with fixed IP.

I have one OpenWRT Client connected to this server
I have one Windows Client connected to this Server

The OpenVPN Subnet is e.g. 172.20.20.0/24

My OpenWRT Client has a 192.168.0.0/24 Subnet on the LAN side
My Windows Client has an IP Adress of a 192.168.1.0/24

I have one device behind my OpenWRT Client ( e.g. 192.168.0.100 ) which I would like to access from my Windows Client.
but I don't want to route the trafic, that means I don't want to have a static route on my Windows PC.

I know that there is an option to get another OpenVPN IP Address of the Subnet range, and this IP Address is just (I think) a static NAT to the device on the OpenWRT Client side.

For Example:
172.20.20.1 = OpenVPN IP of OpenWRT device
172.20.20.2 = "virtual" IP with static NAT to 192.168.0.100 (device on the LAN side of OpenWRT)
172.20.20.10 = OpenVPN IP of Windows device

So I should be able to access the device on the LAN side of OpenWRT with the OpenVPN IP address of 172.20.20.2.

But how am I able to set this up? I think I need to add that static NAT manually to my OpenWRT device, but how am I able to tell the OpenVPN Server, that my OpenWRT client has a second IP Address?

Thanks in advance!
Manuel

Post Reply