Public IP on VPN clients without a entire public prefix

Scripts with setup, destroy, and modify routing tables and firewall rulesets for client connections.
Post Reply
OpenVpn Newbie
Posts: 1
Joined: Thu Sep 14, 2017 9:12 pm

Public IP on VPN clients without a entire public prefix

Post by RAnders00 » Thu Sep 14, 2017 9:35 pm

Hello everyone,

I have a specific use case that I think OpenVPN might be able to accomplish:

  • A hosted VServer (Machine A) has multiple /32 IPv4 addresses on eth0.
  • An application server (Machine B) has a normal internet uplink, but without a public-facing IPv4 address.
  • I want to set up a OpenVPN server on Machine A (the VServer).
  • Witht the configuration, Machine B (the application server) should have one of the currently public-facing IPv4s of Machine A (the VServer) on its virtual interface.
The following second image should illustrate the situation I desire:


Is this kind of passthrough possible?

Note: I am explicitly looking for a solution that preserves the public IP on the network interface on Machine B. Therefore just using NAT would be inappropriate for the use-case.

Thank you very much in advance.

Post Reply