I have asus router RT-AC58U (fw 3.0.0.4.382_51899) and have successfully set up OpenVPN.
Here are my custom settings:
OpenVPN custom settings
these setting automatically generate file
config.ovpn
# Automatically generated configuration
# Tunnel options
proto udp
multihome
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
server 10.8.0.0 255.255.255.0
client-config-dir ccd
client-to-client
duplicate-cn
route 10.8.0.8 255.255.255.128
push "route 192.168.1.0 255.255.255.0 vpn_gateway 500"
push "redirect-gateway def1"
push "dhcp-option DNS 192.168.1.1"
# 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:
iroute 10.8.0.8 255.255.255.128
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
Best Answer
I managed to make it work by applying following steps:
ssh username@routerIp
/jffs
. Create some config structure under it e.g./jffs/configs/openvpn/ccd
(usemkdir
)ccd
dir create file with same name as your vpn client username (e.g.touch nuc
)vi nuc
)ifconfig-push staticIP mask
(e.g.ifconfig-push 10.0.8.10 255.255.255.0
) and saveexit
)"Custom Configuration"
field:client-config-dir /jffs/configs/openvpn/ccd
Also don't forget to switchUsername / Password Auth. Only
to"Yes"
(otherwise client config files should be named by client's CN)Apply
buttonNow you can connect with vpn client and you will get the set up IP (mine was 10.0.8.10)