1

When a client is physically on the network their IP address is 10.1.0.10. When they remote into the VPN server they are on the 10.250.0.0 VPN network, so their IP address may be something like 10.250.0.20. Is it possible to configure a route such that a client is always accessible on 10.1.0.10 regardless if they are physically on the network or remotely connected to the VPN?

1

If you want to use same ip address on same network, you have to bridge vpn network and physicial network.

If you are use OpenVPN, you have to use tap device for Layer2 communication.
Disable DHCP configuration in OpenVPN.
Bridge OpenVPN interface (such as tap0) to your interface which is connected to company network.
Now each client see physical network and VPN network at same time. But ip address might different due to different mac on Wi-Fi card and OpenVPN tap device.
You can set IP address to device via DHCP settings on router or server.
If you get a conflict err on DHCP server, you can represent same mac address which is Wi-Fi to vpn tap device or enter static IP to tap device on computer.

1
  • in fact it is possible but not best practice. on wireguard you can assign the ip statically to the same client but i am unaware if you want to do so as it does not make sense? For whatever reason do you want to do it so? – djdomi Nov 29 '20 at 11:41
0

As far as I know, you'll probably end creating a loop of some sort in your network. VPN is in another subnet for a reason, and overlapping it with your existing subnets it'll only create networking, and surely, security issues.

Edit for clarification: It should be "technically possible", modifying the VPN configuration to lease IPs in the same subnet as your local network and assigning static IPs manually in the VPN client config files, for example. But I strongly advise you against this practice for the aforementioned reasons.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.