Article 541KA openvpn and static ip

openvpn and static ip

by
aLinux14
from LinuxQuestions.org on (#541KA)
I've installed openvpn on Centos 7 server. My client can connect but I need use a static ip. I 've search many solutions on web but I've not fix the problem.
Beneath you can view my configuration files

Thanks a lot for any suggestions

server.conf
Quote:
proto udp
dev tun

ca /usr/share/easy-rsa/3.0.7/pki/ca.crt
cert /usr/share/easy-rsa/3.0.7/issued/server1.crt
key /usr/share/easy-rsa/3.0.7/pki/private/server1.key

dh /usr/share/easy-rsa/3.0.7/pki/dh.pem
ifconfig-pool-persist ipp.txt

push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
topology subnet
remote-cert-eku "TLS Web Client Authentication"

tls-auth /usr/share/easy-rsa/3.0.7/pki/private/server1.key 0
keepalive 10 120
cipher AES-256-CBC
persist-key
persist-tun

status openvpn-status.log

log /var/log/openvpn.log
log-append /var/log/openvpn.log

verb 3
explicit-exit-notify 1
client configuration
Quote:
client
dev tun
proto udp

remote xxx.xxx.xxx.xxx 1193

nobind

persist-key
persist-tun

ca ca.crt
cert client01.crt
key client01.key

cipher AES-256-CBC
auth SHA512
auth-nocache
tls-version-min 1.2
tls-cipher TLS-DHE-RSA-WITH-AES-256-GCM-SHA384:TLS-DHE-RSA-WITH-AES-256-CBC-SHA256:TLS-DHE-RSA-WITH-AES-128-GCM-SHA256:TLS-DHE-RSA-WITH-AES-128-CBC-SHA256

resolv-retry infinite
compress lzo
nobind
persist-key
persist-tun
mute-replay-warnings
verb 3

ipp.txt
Quote:
clientIP10,10.8.0.10
clientIP11,10.8.0.11
clientIP12,10.8.0.12
clientIP13,10.8.0.13
clientIP14,10.8.0.14
clientIP15,10.8.0.15
clientIP16,10.8.0.16
clientIP17,10.8.0.17
clientIP18,10.8.0.18
clientIP19,10.8.0.19
clientIP20,10.8.0.20
The file clientIP10 for static ip contain
Quote:
ifconfig-push 10.8.0.10 10.8.0.1
latest?d=yIl2AUoC8zA latest?i=QiZHOwNXgZ4:CahUDRaAAV0:F7zBnMy latest?i=QiZHOwNXgZ4:CahUDRaAAV0:V_sGLiP latest?d=qj6IDK7rITs latest?i=QiZHOwNXgZ4:CahUDRaAAV0:gIN9vFwQiZHOwNXgZ4
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments