I have an openVPN server which allows me to connect through a VPN to my network. I want to make it possible for all devices on a LAN to connect through my local router to the remote network.
The networks in play:
- 88 my local subnet
- 22 the subnet used by openVPN server DHCP
- 20 the remote subnet where all the devices I want to connect to are located
Currently the OVPN server acts as a NAT from 22 to 20 and back. I don’t want to change this.
I want to have it work that when I request a subnet 20 IP I get routed through the tunnel towards the network.
Current situation:
I have set up the following things:
- a OVPN Client interface “ovpn-out1”, which connects to my server fine.
- a DHCP client on “ovpn-out1” but this doesn’t work giving me an error saying that:
interface is not running (6
- a NAT in the firewall as follows:
out-interface=ovpn-out1
chain=srcnat
action=masquerade
- routing destined for subnets 20 and 22 to gateway ovpn-out1 which it says is reachable
I seem to have gotten an IP as pinging 22.2 works but the gateway is still unreachable.
What am I doing wrong? As far as I understand it should be possible to have the router act as a middleman which relays messages destined for subnet 20 through the VPN tunnel and it’s server.
