@scroll_dp said in redirecting local network to openvpn network:
OpenVpn network -- 192.168.1.0/24
local network -- 192.168.0.0/24
Best practice would be to not use these networks, since they are default on many routers and hence widely used.
But yes, it's possible to workaround the routing issue with an additional IP on the OpenVPN interface, which lies outside of these networks.
To set this up, assign an interface to the OpenVPN server instance and activate it, say it's OPT1.
Then go to Firewall > Virtual IPs and add an a new IP of type "IP alias" to this interface, e.g. 10.47.23.41/32.
Then add a port forwarding rule to OPT1 for the destination IP 10.47.23.41 and target it to the concerned server. So you can use 10.47.23.41 to connect to the server from the OpenVPN.
If you don't have "redirect gateway" in the OpenVPN server settings you have to add the virtual IP to the "Local networks", 10.47.23.41/32 in this example.
If you have multiple IPs to be redirected you can use a /24 subnet mask for the virtual IP and add a NAT 1:1 rule to redirect the whole subnet.