I have asus router RT-AC58U (fw and have successfully set up OpenVPN. Here are my custom settings: OpenVPN custom settings

these setting automatically generate file


# Automatically generated configuration

# Tunnel options
proto udp
port 1194
dev tun21
sndbuf 0
rcvbuf 0
keepalive 15 60
daemon vpnserver1
verb 3
status-version 2
status status 10
comp-lzo adaptive
plugin /usr/lib/openvpn-plugin-auth-pam.so openvpn

# Server Mode
client-config-dir ccd
push "route vpn_gateway 500"
push "redirect-gateway def1"
push "dhcp-option DNS"

# Data Channel Encryption Options
auth SHA1

# TLS Mode Options
ca ca.crt
dh dh.pem
cert server.crt
key server.key

# Custom Configuration

I know it is possible to to create file in ccd directory with

ifconfig-push ip mask

but I cannot create them manually, everything is generated. I can enable client specific options and add clients throught ui, which generates ccd directory with client files, but the generated content looks like this:


Is it possible to assign VPN clients static IP addresses?

I also have only one client.ovpn possible to export which has always the same CN == client

  • 1
    Can you generate an "iroute" ? This will generate a static on each side with a /30 netmask. (You can use as that is not a valid IP when dealing ng with /30's) – davidgo Oct 26 '19 at 23:01
  • Yes, I generated also "iroute" but nothing changed, still got some IP like – Iwaneez Oct 27 '19 at 8:50

I managed to make it work by applying following steps:

  1. You need to activate ssh access to your router (+ setup username and password)
  2. Login to your router ssh username@routerIp
  3. There is a writable directory /jffs. Create some config structure under it e.g. /jffs/configs/openvpn/ccd (use mkdir)
  4. In ccd dir create file with same name as your vpn client username (e.g. touch nuc)
  5. Write config for your client in this file (vi nuc)
  6. Write your client's config there using format ifconfig-push staticIP mask (e.g. ifconfig-push and save
  7. Leave secure shell (exit)
  8. Log into your router's ui, go to OpenVpn setup menu and fill the path to your client config into "Custom Configuration" field: client-config-dir /jffs/configs/openvpn/ccd Also don't forget to switch Username / Password Auth. Only to "Yes" (otherwise client config files should be named by client's CN)
  9. Save router config clicking on Apply button

Now you can connect with vpn client and you will get the set up IP (mine was

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.