0

Usually, when using a VPN, you can route all client traffic(s) through a VPN tunnel with a exit point on the VPN server. Is there a reverse possibility: to organize an exit point to the WWW on the side of one of the VPN clients?

For example, there is a VPN server server1 (172.16.0.1) and two VPN clients client1 (172.16.0.2) and client2 (172.16.0.3). Is it possible to configure the client1 device in such a way that the ip route add default via 172.16.0.2 can be executed on the client2 device?

I'm interested in whether it is possible to do this, provided that client1 runs on OpenWRT (with OpenVPN client).

And if it is possible, then what settings should I pay attention to on the client1 device?

Updated: In fact, I am interested in organizing access to multiple subnets on the side of some clients (for some clients, this is not needed). I would like to avoid the need to prescribe routes to dozens of subnets to the openvpn configurations. At best, I would like to shift the writing of routes to OSPF, at worst - to configure routes on routers (i.e. in the routing tables of routers, not in the VPN config). For many reasons, it is impossible to install BGP, so I need to work with what is there. The tap option is as undesirable as possible.

Alex A.
  • 101
  • 3
  • 2
    It is possible on OpenWRT and OpenVPN. Notice that configuration might be not very simple, on either site. For the sake of clarity, draw a network diagram with all desired IP addresses and add into the question. // Also, what *business environment* do you represent with this question? ServerFault is [inappropriate for home-user questions](https://serverfault.com/help/on-topic), consider asking mods to move it to SuperUser. – Nikita Kipriyanov Aug 14 '22 at 09:11
  • @NikitaKipriyanov what business environment do I represent? I didn't quite understand what was meant. If you talking about a physical environment, then there are several offices, each of which has several subnets and routers with OSPF. I cannot draw a diagram of a real network for security reasons (especially - static IPs), and besides, it is not required. Is there a difference between 2 networks in the office or 32 if the task is to shift routing to OSFP? "Not very simple" configuration will be where? In OpenVPN? In iptables? Please elaborate. – Alex A. Aug 15 '22 at 14:16

0 Answers0