SOLVED: Error accessing NAS via OpenVPN

How to customize and extend your OpenVPN installation.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
under72
OpenVpn Newbie
Posts: 3
Joined: Mon Oct 31, 2011 11:55 pm

SOLVED: Error accessing NAS via OpenVPN

Post by under72 » Mon Oct 31, 2011 11:57 pm

Hi,

I am trying to access my NAS via OpenVPN. I was able to connect and ping but I cannot map the network drive. I am getting the following error message in the OpenVPN log:

Mon Oct 31 10:05:29 2011 OpenVPN 2.0.9 Win32-MinGW [SSL] [LZO] built on Oct 1 2006
Mon Oct 31 10:05:29 2011 IMPORTANT: OpenVPN's default port number is now 1194, based on an official port number assignment by IANA. OpenVPN 2.0-beta16 and earlier used 5000 as the default port.
Mon Oct 31 10:05:29 2011 WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info.
Mon Oct 31 10:05:29 2011 LZO compression initialized
Mon Oct 31 10:05:40 2011 UDPv4 link local: [undef]
Mon Oct 31 10:05:40 2011 UDPv4 link remote: xx.xxx.xxx.xxx:1194
Mon Oct 31 10:05:41 2011 [server] Peer Connection Initiated with xx.xxx.xxx.xxx:1194
Mon Oct 31 10:05:42 2011 Options error: Unrecognized option or missing parameter(s) in [PUSH-OPTIONS]:3: topology (2.0.9)
Mon Oct 31 10:05:42 2011 TAP-WIN32 device [Local Area Connection 2] opened: \\.\Global\{912847F2-6771-4BAB-BF61-79E0ED01AFFC}.tap
Mon Oct 31 10:05:42 2011 Notified TAP-Win32 driver to set a DHCP IP/netmask of 10.8.0.6/255.255.255.252 on interface {912847F2-6771-4BAB-BF61-79E0ED01AFFC} [DHCP-serv: 10.8.0.5, lease-time: 31536000]
Mon Oct 31 10:05:42 2011 Successful ARP Flush on interface [25] {912847F2-6771-4BAB-BF61-79E0ED01AFFC}
Mon Oct 31 10:05:42 2011 Warning: address 192.168.0.1 is not a network address in relation to netmask 255.255.255.0
Mon Oct 31 10:05:42 2011 ROUTE: route addition failed using CreateIpForwardEntry: One or more arguments are not correct. [if_index=25]
Mon Oct 31 10:05:42 2011 ROUTE: route addition failed using CreateIpForwardEntry: One or more arguments are not correct. [if_index=25]
Mon Oct 31 10:05:42 2011 Initialization Sequence Completed


Here is my server config:

Code: Select all

# OpenVPN server configuration QNAP NAS
# basic settings
port 1194
proto udp
dev tun
#
# detect mtu if the connection is slow.
; mtu-test
#
# define mtu, if necessary
; tun-mtu xyz
#
# define the ip-addresses of the underlying tunnel 
server 10.8.0.0 255.255.255.0
#
# Route 
push "route 192.168.0.1 255.255.255.0"   #  <--- Enter the ip-address of your home network here!
#
# certificates & keys
dh /opt/etc/openvpn/keys/dh1024.pem
ca /opt/etc/openvpn/keys/ca.crt
cert /opt/etc/openvpn/keys/server.crt
key /opt/etc/openvpn/keys/server.key
#
# data compression
comp-lzo
#
# allow, that several clients with the same common name log on
; duplicate-cn
#
# different clients can "see" each other through the tunnel.
; client-to-client
#
# Keepalive
keepalive 15 120
#
# verbosity of status messages in the console. Activate for debugging (1-9 possible)
; verb 5
#
# Log files
; status /share/HDA_DATA/optware/opt/etc/openvpn/log/status.log
; log-append /share/HDA_DATA/optware/opt/etc/openvpn/log/openvpn.log
# 
# Run as daemon (activate, after everything is set up properly)
; daemon
#
# Management Interface. Access with "telnet localhost 7505"
management localhost 7505
Here is the client config:

Code: Select all

# connect to QNAP OpenVPN Server
#
proto udp
dev tun
tls-client
remote xxx.xxxxxxxx.com 1194  #  <--- enter your dyndns-account here!
pull
# set mtu, if necessary
; tun-mtu xyz
#
resolv-retry infinite
nobind
persist-key
persist-tun
# certificates and keys
# Note the double \\ in the path for a windows config
ca "C:\\Program Files\\OpenVPN\\easy-rsa\\keys\\ca.crt"
cert "C:\\Program Files\\OpenVPN\\easy-rsa\\keys\\client1.crt"
key "C:\\Program Files\\OpenVPN\\easy-rsa\\keys\\client1.key"
#
comp-lzo
Thanks
Last edited by under72 on Fri Nov 04, 2011 1:33 am, edited 1 time in total.

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: Error accessing NAS via OpenVPN

Post by janjust » Tue Nov 01, 2011 9:02 am

push "route 192.168.0.1 255.255.255.0" # <--- Enter the ip-address of your home network here!
you have entered an IP address here , not a network address; if your home network is 192.168.0.0/24 then change the line to 192.168.0.0. If you want to access ONLY your NAS then use

Code: Select all

push "route 192.168.0.1 255.255.255.255"

User avatar
maikcat
Forum Team
Posts: 4200
Joined: Wed Jan 12, 2011 9:23 am
Location: Athens,Greece
Contact:

Re: Error accessing NAS via OpenVPN

Post by maikcat » Tue Nov 01, 2011 10:38 am

also try to use newer version of openvpn 2.0.9 is a little old...

win 7 and 2.0.9 dont work.

Michael
Amiga 500 , Zx +2 owner
Long live Dino Dini (Kick off 2 Creator)

Inflammable means flammable? (Dr Nick Riviera,Simsons Season13)

"objects in mirror are losing"

under72
OpenVpn Newbie
Posts: 3
Joined: Mon Oct 31, 2011 11:55 pm

Re: Error accessing NAS via OpenVPN

Post by under72 » Wed Nov 02, 2011 12:58 am

janjust wrote: you have entered an IP address here , not a network address; if your home network is 192.168.0.0/24 then change the line to 192.168.0.0. If you want to access ONLY your NAS then use
According to my router D-Link, my LAN address is:
IP Address : 192.168.0.1
Subnet Mask : 255.255.255.0
My NAS is currently on 192.168.0.196
push "route 192.168.0.1 255.255.255.255"
I tried your suggestion but I couldn't connect anymore as I got a new error message. By the way, I am forwarding port 1194

Code: Select all

TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Tue Nov 01 20:41:50 2011 TLS Error: TLS handshake failed
Tue Nov 01 20:41:50 2011 SIGUSR1[soft,tls-error] received, process restarting

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: Error accessing NAS via OpenVPN

Post by janjust » Wed Nov 02, 2011 8:12 am

IP Address : 192.168.0.1
Subnet Mask : 255.255.255.0
that is the address of your router... aha, then use

Code: Select all

push "route 192.168.0.0 255.255.255.0"
instead (note the zeroes!)

User avatar
maikcat
Forum Team
Posts: 4200
Joined: Wed Jan 12, 2011 9:23 am
Location: Athens,Greece
Contact:

Re: Error accessing NAS via OpenVPN

Post by maikcat » Wed Nov 02, 2011 11:40 am

TLS error has nothing to do with the push route statement...

check your firewalls (both router and openvpn server).

Michael.
Amiga 500 , Zx +2 owner
Long live Dino Dini (Kick off 2 Creator)

Inflammable means flammable? (Dr Nick Riviera,Simsons Season13)

"objects in mirror are losing"

under72
OpenVpn Newbie
Posts: 3
Joined: Mon Oct 31, 2011 11:55 pm

Re: SOLVED: Error accessing NAS via OpenVPN

Post by under72 » Fri Nov 04, 2011 1:34 am

Thank you guys...updating OpenVPN client and changing to: push "route 192.168.0.0 255.255.255.0" solved the problem

Post Reply