I want to set up a VPN that uses the client’s IP when sending data out of the VPN server. I am able to use either OpenVPN (open-source edition), or Wireguard.

  • BearOfaTime@lemm.ee
    link
    fedilink
    English
    arrow-up
    2
    ·
    11 months ago

    Depends.

    Generally, yea, this isn’t how a client-server VPN works.

    If you’re interconnecting two subnets that are part of the same network (say a remote site that uses a subnet of corporate address space) with a site-to-site vpn, then it can make sense. But then the VPN is usually transparent to the devices.

    A client using VPN to connect to a VPN server as an entry point would need some kind of subnetting functionality to achieve this, something like what Tailscale does with Subnet Routing. But that would be reproducing the site-to-site, and you’d need to make sure IP addressing is peoperly configured (the remote site needs to be part of the same address space with no conflicts).

    If you control both ends, this is possible with proper DHCP scoping/reservations, or just static addresses.

    But without really understanding OP’s intent, it’s hard to say.