0

I have a OpenVPN connection to access private services (service1, service2). To access them, I must connect using an OpenVPN client on "MacMini".

I would like use the OpenWRT router (192.168.1.1) to connect to a VM (192.168.1.10).

The VM has an OpenVPN client and connection to the private services.

The OpenWRT router has routes to 10.10.0.0/24 via 192.168.1.10

The VM has two interfaces, eth0 connected to router and tun0 connected to OpenVPN.

How can I make the "MacMini" to connect to the private services via VM?

I tried activating ip4_forward on VM but the connection is never established.

Network Example

chepe263
  • 101
  • 2

1 Answers1

0

Packets from Mac Mini with destination 10.10.0.0/24 are able to reach their target because there is a route in the default router that directs them to the VM and the VM is able to forward them.

But, how about response packets?. Let's think of the trivial target for the Mac Mini (the server 10.10.0.1/24). Imagine a ping to 10.10.0.1. The response packet has the destination address 192.168.1.8 but, you haven't mentioned that there is a route in the server to the IP 192.168.1.8 (in general, 192.168.1.0/24) through the OpenVPN address in the VM (by the way it should have a static IP address in the VPN). In the server case, this can be accomplished configuring their routes in the OS.

The rest of nodes in the VPN should also have such a route, but you could configure it through OpenVPN (the rest of the nodes could receive the route to the 192.168.1.0/24 network during the connection step)

J.M. Robles
  • 925
  • 6
  • 9