OPNsense Forum

English Forums => Virtual private networks => Topic started by: bdario on December 01, 2021, 02:21:48 pm

Title: OpnVPN client static IP [SOLVED]
Post by: bdario on December 01, 2021, 02:21:48 pm
Hello folks,
in OPNsense 21.7.5 I'm not able to force a static IP address to a VPN client.
The Tunnel Network configured in the vpn server is 10.10.10.0/28
I tried configuring  VPN / OpenVPN / Client Specific Overrides as follow:
- Servers: name of the OpenVPN servers (or blank)
- Common name: the name of the user as created in System / Access / Users (in this case the name is sandro.d)
- Advanced: ifconfig-push 10.10.10.10 255.255.255.240
When I connect the vpn client I expect to receive the address 10.10.10.10 but I always receive 10.10.10.2 or 10.10.10.3
Any suggestion?
Best regards
Dario
Title: Re: OpnVPN client static IP [SOLVED]
Post by: bdario on December 01, 2021, 04:25:11 pm
I solved the issue creating the file:
/var/etc/openvpn-csc/1/sandro.d
populated with the directive:
ifconfig-push 10.10.10.10 255.255.255.240
Title: Re: OpnVPN client static IP [SOLVED]
Post by: tverweij on August 12, 2023, 07:35:58 pm
Looks like this doesn't work anymore - as soon as the client logs in, the file is removed.

Has anyone else an idea how to give a fixed IP to a client?
Title: Re: OpnVPN client static IP [SOLVED]
Post by: tverweij on August 12, 2023, 07:50:21 pm
Already found the answer :

Miscellanious - Options: persist-remote-ip

Title: Re: OpnVPN client static IP [SOLVED]
Post by: apiening on April 22, 2024, 04:35:53 pm
Can you please describe where exactly I can find this setting "persist-remote-ip"?
Is it related to the Server instance or to client specific configuration?
I can't find it on my OpnSense 24.1.1 instance.