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

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
freddieventura
OpenVpn Newbie
Posts: 1
Joined: Mon May 08, 2023 4:45 pm

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

Post by freddieventura » Sat May 13, 2023 12:16 am

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

Post Reply