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?

Server config add

where? in server.ovpn?

Please refer to the following link, I am also testing

Did you succeed? I tried but nothing…

I had successed

First find the CN name that generated the certificate


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” >/etc/openvpn/ccd/OpenVpn_client

Remarks: 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
client-config-dir /etc/openvpn/ccd