OpenVPN connectivity lost for 64 seconds when mounting SFTP directory as a drive in Windows

This forum is for general conversation and user-user networking.

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

Post Reply
em
OpenVpn Newbie
Posts: 2
Joined: Tue Jun 27, 2017 11:23 am

OpenVPN connectivity lost for 64 seconds when mounting SFTP directory as a drive in Windows

Post by em » Tue Jun 27, 2017 12:00 pm

OK, so this is a really bizarre problem, so please, bear with me...

I have a Raspberry Pi set up as a wireless router to tunnel all traffic via OpenVPN. A Windows 7 client machine connects to the Pi via WiFi. The Pi is connected to the Internet via a wired connection (eth0), runs OpenVPN 2.3.4 and has iptables rules to forward all traffic from wlan0 (the home WiFi) to tun0 (the OpenVPN tunnel over eth0). This has all been set up and working for a long time.

Today I downloaded SFTP Net Drive 2017 and configured it to mount an SFTP folder on a remote server as a drive on the Windows 7 client machine. Of course, this connection goes through OpenVPN on the Pi, like everything else. It connects OK, but as soon as I browse 1-2 folders on the mounted drive in Windows Explorer I lose all Internet connectivity on the Windows machine for about a minute! If I just wait a minute I am connected once again. This is 100% reproducible! Sometimes just opening the root of the mounted drive is enough, other times I have to open 1 sub-folder.

Digging deeper, it turns out that not only the Windows machine, but even the Pi has no connectivity over the OpenVPN tunnel! Screenshot 1: Image

On the left I have the OpenVPN client on the Pi with --verb 5 - it continues to output "RWrw..." the whole time. No errors or any other log messages while the problem occurred. On the right is me attempting to ping a remote host from both the Pi and the Windows client. Both are unsuccessful for about a minute, then resume working again. In the Pi screenshot you can see icmp_seq incrementing by 64 (at 1 attempt/sec).

Then I tried also pinging the OpenVPN server at the same time. Screenshot 2: Image

Pings to the OpenVPN server (right) continued uninterrupted, while pinging 8.8.8.8 (middle) stopped for 64 seconds again.

I've repeated this at least 4 times and each time the icmp_seq difference is 64.

I've also tried:
1) Connecting to the same SFTP folder via WinSCP - no issues.
2) Mounting the same SFTP folder via win-sshfs - no issues.
3) Configuring the Pi to route from wlan0 to eth0 directly, without VPN - no issues.

Any ideas on what's going on and how to get to the bottom of this? Does this seem like an OpenVPN bug?

em
OpenVpn Newbie
Posts: 2
Joined: Tue Jun 27, 2017 11:23 am

Re: OpenVPN connectivity lost for 64 seconds when mounting SFTP directory as a drive in Windows

Post by em » Tue Jun 27, 2017 2:15 pm

I dug further into this and managed to isolate it to one NetBIOS Name Service (NBNS) packet sent from the Windows machine to the SFTP server. Replaying that one packet reproduces the problem. I can even capture and replay it from the Pi, leaving the Windows machine out of the picture entirely.

Interestingly, even restarting OpenVPN does not restore connectivity until a minute has elapsed since the packet, so it appears that the OpenVPN server is temporarily blacklisting me (intentionally or not). I'll try contacting the OpenVPN server owner.

Post Reply