I have two OpenWRT routers. There's a main router, connected to the internet; and a second router, a client for the main router.
The second router has OpenVPN client an a connection to OpenVPN server.
I have a client from main router, and I need to route traffic going to 10.10.0.1/24 to second router, and second router to send the incoming traffic to OpenVPN server.
The main router has
- route (interface lan, target 10.10.0.1/24, gateway 192.168.1.10)
The second router has
- eth0 (ip is from main router dhcp) (this is the wan)
- tun0 (openvpn client interface)
- route (interface wan, target 10.10.0.1/24, gateway 10.10.0.1)
- no bridges.
- no lan interface.
How can I make it so request to "Service1" (10.10.0.11) from "MacMini" (192.168.1.8) go throught the vpn client on second router?
I'm aware I could simply install the openvpn client on main router or in each individual computer on the lan. The purpose is to learn about routing and networking in general.
Thank you!