OpenVPN 2.3.11 x86_64-redhat-linux-gnu
[root@Z-Router openvpn]# vi client.conf
client
dev tunnel870
proto udp
remote vpn1.abc.com 443
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca870.crt
cert Senegal870.crt
key Senegal870.key
comp-lzo yes
verb 3
route-method exe
log-append /var/log/openvpn.log
--script-security 2
route 172.16.0.0/24
before openvpn
[root@Z-Router openvpn]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default DD-WRT 0.0.0.0 UG 100 0 0 enp2s0
192.168.70.0 0.0.0.0 255.255.255.0 U 100 0 0 enp2s0
192.168.110.0 0.0.0.0 255.255.255.0 U 100 0 0 enp2s0
systemctl -f start
openvpn@client.service
Sun Aug 21 17:52:39 2016 /usr/sbin/ip link set dev tunnel870 up mtu 1500
Sun Aug 21 17:52:39 2016 /usr/sbin/ip addr add dev tunnel870 local 10.5.6.209 peer 10.5.6.210
Sun Aug 21 17:52:39 2016 /usr/sbin/ip route add 10.5.0.0/16 via 10.5.6.210
Sun Aug 21 17:52:39 2016 /usr/sbin/ip route add 192.168.0.0/16 via 10.5.6.210
Sun Aug 21 17:52:39 2016 /usr/sbin/ip route add 10.6.0.0/16 via 10.5.6.210
Sun Aug 21 17:52:39 2016 /usr/sbin/ip route add 10.5.0.0/16 via 10.5.6.210
RTNETLINK answers: File exists
Sun Aug 21 17:52:39 2016 ERROR: Linux route add command failed: external program exited with error status: 2
Sun Aug 21 17:52:39 2016 Initialization Sequence Completed
after vpn starts
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default DD-WRT 0.0.0.0 UG 100 0 0 enp2s0
10.5.0.0 10.5.6.210 255.255.0.0 UG 0 0 0 tunnel870
10.5.6.210 0.0.0.0 255.255.255.255 UH 0 0 0 tunnel870
10.6.0.0 10.5.6.210 255.255.0.0 UG 0 0 0 tunnel870
192.168.0.0 10.5.6.210 255.255.0.0 UG 0 0 0 tunnel870
192.168.70.0 0.0.0.0 255.255.255.0 U 100 0 0 enp2s0
192.168.110.0 0.0.0.0 255.255.255.0 U 100 0 0 enp2s0