this post was submitted on 19 Dec 2023
20 points (85.7% liked)

Selfhosted

39224 readers
323 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

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.

you are viewing a single comment's thread
view the rest of the comments
[–] BearOfaTime@lemm.ee 1 points 9 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.