I have a OpenVPN server hosted on a QNAP NAS. I am accessing it via Windows and Android OpenVPN Clients. The NAS and the OpenVPN work perfectly. The main IP address of the NAS server is 192.168.1.200 when I am inside the LAN. From Inside the Lan, I can access it without VPN on that IP Address without problem on both device types.
The VPN Server creates a subnet for the VPN clients in the 192.168.2.* range, with 192.168.2.1 being the NAS itself.
So when a computer inside the LAN, without VPN, accesses the NAS, I use the 1.200 address. Several software settings are linked to that address, for example shared drives under windows point to //192.168.1.200/folderShare
However, when I am outside of the LAN and access the network via VPN, this changes. While all other components on the network are accessible via their native IP address (192.168.1.*), the NAS can be accessed only via its VPN subnet address, 192.168.2.1. That means that for example a windows laptop that wants to access a shared folder on the NAS through LAN (w/o VPN) and through WAN (with VPN) needs to use 2 different IP Addresses for the same destination, depending on the situation. And this is the smallest issue. If I have different libraries in an application tied to the IP address of the resource, I need to maintain both of them (for example Lightroom images, Kodi media files etc).
How can I go around that? How can I make 192.168.1.200 a working destination for VPN/WAN and no VPN/LAN access? - All while keeping the internet access through VPN working of course? Can I use some routing rules on my dd-wrt router to route .1.131 to 2.1?
thanks!
192.168.0.0./22
(no mistake here!).