[Resolved] VPN service can connect but not able to open shares

Samples of working configurations.
Locked
mcdbergh
OpenVpn Newbie
Posts: 4
Joined: Wed Jul 04, 2018 8:30 pm

[Resolved] VPN service can connect but not able to open shares

Post by mcdbergh » Wed Jul 04, 2018 8:42 pm

Hello i have some troubles with Qvpn on my Qnap NAS.
I have installed Qvpn on the nas and configured with a network pool adres
192.168.2.x
the server port what i use is UDP 1194 and also in my router the port is forwarded to the nas.
The encryption is set high and i use a dns of the nas

also the vpn connection is compressed.

When i try to connect from my workstation with the vpn client i import the generated certificate.
The connection will be made correctly. but when i try to open the share on my nas.
it returns me with a error that the nas not can;t be found.
also when i am trying to ping the nas. it cant ping it also.

Can someone help me so i can connect to the nas? or tell me what i am doing wrong.

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 6153
Joined: Fri Jun 03, 2016 1:17 pm

Re: VPN service can connect but not able to open shares

Post by TinCanTech » Thu Jul 05, 2018 10:42 am

Please post your client log at --verb 4

mcdbergh
OpenVpn Newbie
Posts: 4
Joined: Wed Jul 04, 2018 8:30 pm

Re: VPN service can connect but not able to open shares

Post by mcdbergh » Thu Jul 05, 2018 5:45 pm

C:\Program Files\OpenVPN\bin>openvpn --verb 4
Thu Jul 05 19:43:29 2018 us=645181 disabling NCP mode (--ncp-disable) because no
t in P2MP client or server mode
Options error: You must define TUN/TAP device (--dev)
Use --help for more information.

or did i entered the wrong syntax?

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 6153
Joined: Fri Jun 03, 2016 1:17 pm

Re: VPN service can connect but not able to open shares

Post by TinCanTech » Thu Jul 05, 2018 6:22 pm

Try using the Openvpn-GUI ..

mcdbergh
OpenVpn Newbie
Posts: 4
Joined: Wed Jul 04, 2018 8:30 pm

Re: VPN service can connect but not able to open shares

Post by mcdbergh » Thu Jul 05, 2018 6:24 pm

ok thanks

here the log
Thu Jul 05 19:54:09 2018 OpenVPN 2.4.6 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [LZ4] [PKCS11] [AEAD] built on Apr 26 2018
Thu Jul 05 19:54:09 2018 Windows version 6.2 (Windows 8 or greater) 64bit
Thu Jul 05 19:54:09 2018 library versions: OpenSSL 1.1.0h 27 Mar 2018, LZO 2.10
Enter Management Password:
Thu Jul 05 19:54:13 2018 TCP/UDP: Preserving recently used remote address: [AF_INET]x.x.x.x:1194
Thu Jul 05 19:54:13 2018 UDP link local: (not bound)
Thu Jul 05 19:54:13 2018 UDP link remote: [AF_INET]x.x.x.x:1194
Thu Jul 05 19:54:13 2018 [TS Series NAS] Peer Connection Initiated with [AF_INET]x.x.x.x:1194
Thu Jul 05 19:54:15 2018 open_tun
Thu Jul 05 19:54:15 2018 TAP-WIN32 device [Ethernet 2] opened: \\.\Global\{3A2BF47A-54CF-41C6-B7BE-A09DFDD1A756}.tap
Thu Jul 05 19:54:15 2018 Notified TAP-Windows driver to set a DHCP IP/netmask of 192.168.2.6/255.255.255.252 on interface {3A2BF47A-54CF-41C6-B7BE-A09DFDD1A756} [DHCP-serv: 192.168.2.5, lease-time: 31536000]
Thu Jul 05 19:54:15 2018 Successful ARP Flush on interface [14] {3A2BF47A-54CF-41C6-B7BE-A09DFDD1A756}
Thu Jul 05 19:54:15 2018 do_ifconfig, tt->did_ifconfig_ipv6_setup=0
Thu Jul 05 19:54:20 2018 Initialization Sequence Completed
Thu Jul 05 20:06:27 2018 SIGTERM received, sending exit notification to peer
Thu Jul 05 20:06:28 2018 SIGTERM[soft,exit-with-notification] received, process exiting

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 6153
Joined: Fri Jun 03, 2016 1:17 pm

Re: VPN service can connect but not able to open shares

Post by TinCanTech » Thu Jul 05, 2018 6:31 pm

Once you have connected to your vpn enter this in a command prompt:

Code: Select all

C:\> net use x: \\192.168.2.1\sharename
sharename would be the name of the shared directory you have configured.

mcdbergh
OpenVpn Newbie
Posts: 4
Joined: Wed Jul 04, 2018 8:30 pm

Re: VPN service can connect but not able to open shares

Post by mcdbergh » Thu Jul 05, 2018 6:42 pm

thanks it works... you are a life savior ;-)
now i can setup my survailance system...

PatG
OpenVpn Newbie
Posts: 1
Joined: Fri Oct 11, 2019 8:24 am

Re: VPN service can connect but not able to open shares

Post by PatG » Fri Oct 11, 2019 11:32 am

Hello,
I have the same problem, the connection to the Qnap VPN is OK, but on the client computers under W10 I can not connect the shared folder.

I tried your solution:
C: \> net use x: \\ 10.8.0.1 \ sharename
but it does not work.

Here is my log OPENVPN :
Fri Oct 11 12:35:10 2019 OpenVPN 2.4.7 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [LZ4] [PKCS11] [AEAD] built on Apr 25 2019
Fri Oct 11 12:35:10 2019 Windows version 6.2 (Windows 8 or greater) 64bit
Fri Oct 11 12:35:10 2019 library versions: OpenSSL 1.1.0j 20 Nov 2018, LZO 2.10
Enter Management Password:
Fri Oct 11 12:35:21 2019 WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info.
Fri Oct 11 12:35:22 2019 TCP/UDP: Preserving recently used remote address: [AF_INET]80.14.133.160:1194
Fri Oct 11 12:35:22 2019 UDP link local: (not bound)
Fri Oct 11 12:35:22 2019 UDP link remote: [AF_INET]80.14.133.160:1194
Fri Oct 11 12:35:22 2019 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Fri Oct 11 12:35:22 2019 WARNING: 'link-mtu' is used inconsistently, local='link-mtu 1557', remote='link-mtu 1558'
Fri Oct 11 12:35:22 2019 WARNING: 'comp-lzo' is present in remote config but missing in local config, remote='comp-lzo'
Fri Oct 11 12:35:22 2019 [TS Series NAS] Peer Connection Initiated with [AF_INET]80.14.133.160:1194
Fri Oct 11 12:35:24 2019 open_tun
Fri Oct 11 12:35:24 2019 TAP-WIN32 device [Ethernet 5] opened: \\.\Global\{B67A61C4-4A4C-480D-9F03-DD46DDEA7CC5}.tap
Fri Oct 11 12:35:24 2019 Notified TAP-Windows driver to set a DHCP IP/netmask of 10.8.0.2/255.255.255.252 on interface {B67A61C4-4A4C-480D-9F03-DD46DDEA7CC5} [DHCP-serv: 10.8.0.1, lease-time: 31536000]
Fri Oct 11 12:35:24 2019 Successful ARP Flush on interface [20] {B67A61C4-4A4C-480D-9F03-DD46DDEA7CC5}
Fri Oct 11 12:35:29 2019 Initialization Sequence Completed
Fri Oct 11 12:35:43 2019 write to TUN/TAP : Unknown error (code=122)
Fri Oct 11 12:35:53 2019 write to TUN/TAP : Unknown error (code=122)
Fri Oct 11 12:36:03 2019 write to TUN/TAP : Unknown error (code=122)
Fri Oct 11 12:36:13 2019 write to TUN/TAP : Unknown error (code=122)
Fri Oct 11 12:36:23 2019 write to TUN/TAP : Unknown error (code=122)
Fri Oct 11 12:36:33 2019 write to TUN/TAP : Unknown error (code=122)
Fri Oct 11 12:36:43 2019 write to TUN/TAP : Unknown error (code=122)
Fri Oct 11 12:36:53 2019 write to TUN/TAP : Unknown error (code=122)
Fri Oct 11 12:37:03 2019 write to TUN/TAP : Unknown error (code=122)
Fri Oct 11 12:37:13 2019 write to TUN/TAP : Unknown error (code=122)
Fri Oct 11 12:37:23 2019 write to TUN/TAP : Unknown error (code=122)
I have this error : write to TUN/TAP : Unknown error (code=122)

Since a connection on my MAC with TunnelBlick it works fine.
In PPTP connection on W10 it's OK

Thank

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 6153
Joined: Fri Jun 03, 2016 1:17 pm

Re: VPN service can connect but not able to open shares

Post by TinCanTech » Fri Oct 11, 2019 2:54 pm

@PatG

I believe error code 122 may be something to do with your --comp-lzo setting being incorrect, please check it.


For further help please see:
viewtopic.php?f=30&t=22603

Locked