Hi,
For some reason, my client is not adding appropriate routes when I connect using the OpenVPN GUI. It is adding the tun0 IP address and the routes for the two subnets close to it (192.168.yyy.1-4, and 192.168.yyy.5-8). But I have a push route to access the internal network adjacent to the OpenVPN Server (push route 192.168.xxx.1 255.255.255.0). This route is no longer being added to the client.
The configuration worked the first time I used it, but no longer. Also, the same client config still works when I run OpenVPN as a service - it adds the route correctly.
Also, my dad is using an identical config file on his client (with the key files changed of course), and his client works.
Any thoughts?
There is no log generated when I use the OpenVPN-GUI to connect, so I cannot show a log file for that. But I have attached a copy of the log from the latest attempt (successful) from launching as a service.
SERVER CONF:
port 1194
proto udp
dev tun
ca /etc/openvpn/easy-rsa/2.0/keys/ca.crt
cert /etc/openvpn/easy-rsa/2.0/keys/server.crt
key /etc/openvpn/easy-rsa/2.0/keys/server.key
dh /etc/openvpn/easy-rsa/2.0/keys/dh2048.pem
server 192.168.yyy.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "route 192.168.xxx.0 255.255.255.0" <-- this is the routed network I am trying to reach
keepalive 10 120
cipher AES-128-CBC # AES
comp-lzo
max-clients 10
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
verb 4
mute 3
CLIENT CONF:
client
dev tun
proto udp
remote aaa.bbb.ccc.ddd 1194
resolv-retry infinite
nobind
persist-key
persist-tun
mute-replay-warnings
ca ca.crt
cert mycert.crt
key mykey.key
ns-cert-type server
cipher AES-128-CBC
comp-lzo
verb 3
mute 5
CLIENT SERVICE LOG FILE
Tue Apr 23 11:03:43 2013 OpenVPN 2.3.1 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [PKCS11] [eurephia] [IPv6] built on Mar 28 2013
Tue Apr 23 11:03:43 2013 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Tue Apr 23 11:03:43 2013 Socket Buffers: R=[8192->8192] S=[8192->8192]
Tue Apr 23 11:03:43 2013 UDPv4 link local: [undef]
Tue Apr 23 11:03:43 2013 UDPv4 link remote: [AF_INET]aaa.bbb.ccc.ddd:1194
Tue Apr 23 11:03:43 2013 TLS: Initial packet from [AF_INET]aaa.bbb.ccc.ddd:1194, sid=13d52c99 f961bbb9
Tue Apr 23 11:03:43 2013 VERIFY OK: depth=1, C=CA, ST=ON, L=Toronto, O=TheInfoMason, CN=TheInfoMason CA, emailAddress=
icman@rogers.com
Tue Apr 23 11:03:43 2013 VERIFY OK: nsCertType=SERVER
Tue Apr 23 11:03:43 2013 VERIFY OK: depth=0, C=CA, ST=ON, L=Toronto, O=TheInfoMason, CN=server, emailAddress=
icman@rogers.com
Tue Apr 23 11:03:44 2013 Data Channel Encrypt: Cipher 'AES-128-CBC' initialized with 128 bit key
Tue Apr 23 11:03:44 2013 NOTE: --mute triggered...
Tue Apr 23 11:03:44 2013 4 variation(s) on previous 5 message(s) suppressed by --mute
Tue Apr 23 11:03:44 2013 [server] Peer Connection Initiated with [AF_INET]aaa.bbb.ccc.ddd:1194
Tue Apr 23 11:03:46 2013 SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)
Tue Apr 23 11:03:46 2013 PUSH: Received control message: 'PUSH_REPLY,route 192.168.xxx.0 255.255.255.0,route 192.168.yyy.1,topology net30,ping 10,ping-restart 120,ifconfig 192.168.yyy.6 192.168.yyy.5'
Tue Apr 23 11:03:46 2013 OPTIONS IMPORT: timers and/or timeouts modified
Tue Apr 23 11:03:46 2013 OPTIONS IMPORT: --ifconfig/up options modified
Tue Apr 23 11:03:46 2013 OPTIONS IMPORT: route options modified
Tue Apr 23 11:03:46 2013 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Tue Apr 23 11:03:46 2013 open_tun, tt->ipv6=0
Tue Apr 23 11:03:46 2013 TAP-WIN32 device [Local Area Connection 2] opened: \\.\Global\{3FF40AB7-7C12-4890-801A-8CFADDF5162A}.tap
Tue Apr 23 11:03:46 2013 TAP-Windows Driver Version 9.9
Tue Apr 23 11:03:46 2013 Notified TAP-Windows driver to set a DHCP IP/netmask of 192.168.yyy.6/255.255.255.252 on interface {3FF40AB7-7C12-4890-801A-8CFADDF5162A} [DHCP-serv: 192.168.yyy.5, lease-time: 31536000]
Tue Apr 23 11:03:46 2013 Successful ARP Flush on interface [26] {3FF40AB7-7C12-4890-801A-8CFADDF5162A}
Tue Apr 23 11:03:51 2013 TEST ROUTES: 2/2 succeeded len=2 ret=1 a=0 u/d=up
Tue Apr 23 11:03:51 2013 C:\Windows\system32\route.exe ADD 192.168.xxx.0 MASK 255.255.255.0 192.168.yyy.5
Tue Apr 23 11:03:51 2013 ROUTE: route addition failed using CreateIpForwardEntry: The object already exists. [status=5010 if_index=26]
Tue Apr 23 11:03:51 2013 Route addition via IPAPI failed [adaptive]
Tue Apr 23 11:03:51 2013 Route addition fallback to route.exe
Tue Apr 23 11:03:51 2013 env_block: add PATH=C:\Windows\System32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
The route addition failed: The object already exists.
Tue Apr 23 11:03:51 2013 C:\Windows\system32\route.exe ADD 192.168.yyy.1 MASK 255.255.255.255 192.168.yyy.5
Tue Apr 23 11:03:51 2013 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=30 and dwForwardType=4
Tue Apr 23 11:03:51 2013 Route addition via IPAPI succeeded [adaptive]
Tue Apr 23 11:03:51 2013 Initialization Sequence Completed