Page 1 of 1

Exposing a whole subnet to a VPN via just one connected client

Posted: Sat May 13, 2023 12:16 am
by freddieventura
I have got 3 devices

myVps
myAp
myHost

myVps , is a Linux VM hosted publicly , in which I run one instances of OpenVPN
myAp , is an Android phone with SIM WAN connectivity , acting as a router (AP) on tethering mode.
The phone has Openvvpn client and connects to the VPN
myHost , is a Linux Machine connected to myAp for WAN connectivity.

I want to be able to establish connections between myVps and myHost , without having to install an Openvpn client on myHost

I guess for this I would need myAp to do some sort of routing with iptables , but as it is an Android device I am afraid there no possibility on doing this.

If so I would be looking to add a "middleAp" sort of a RaspberryPi running Linux , with thisone connected with openvpn to that subnet and perform the routing there.
What rules do you reckon I would be looking at?

(btw the openvpn server is a TUN interface , no defaukt gateway pushed ...)

Thanks