OpenVPN and static IP on client

I have OpenVPN server running on an AR750, and clients connecting (as default, with dynamic IPs).
I’d need static IPs on client.

Any suggestions?

Hi
Server config add
ifconfig-push 10.8.0.5 10.8.0.6

where? in server.ovpn?

Hi
Please refer to the following link, I am also testing

Did you succeed? I tried but nothing…

Hi
I had successed

First find the CN name that generated the certificate

/usr/bin/cert_manager

Client certificate

openssl req -nodes -days 3650 -newkey rsa:2048 -outform PEM -out \

       $CLIENT_CSR -keyout $CLIENT_KEY -sha1 -subj '/CN=**OpenVpn_client**' >/dev/null 2>&1

Modify ovpn server configuration

  1. The directory /etc/openvpn increases the ccd directory and stores the client IP.
    mkdir -p /etc/openvpn/ccd

  2. Create a file in the /etc/openvpn/ccd directory. The file name must be exactly the same as CN.
    touch /etc/openvpn/ccd/OpenVpn_client

  3. Enter the following in OpenVpn_client
    echo “ifconfig-push 10.8.0.5 255.255.255.0” >/etc/openvpn/ccd/OpenVpn_client

Remarks:

10.8.0.5 is the static IP to be assigned by the client.

Modify the /etc/openvpn/server.conf configuration file
The content is as follows
#route-gateway dhcp
#duplicate-cn
client-config-dir /etc/openvpn/ccd