File corruption copying a file from client to server
Posted: Wed Jan 06, 2016 12:59 am
I am experiencing file corruption copying a file from various clients to a SoftEther server.
The files I attempt to copy vary in size and contain compressed data. The saved file is sometimes or often found to be corrupted.
The nature of the file corruption is that a 32 KByte block within the file, starting and ending exactly on 32 KByte boundaries, will be totally different to the original. I've seen various 32K blocks corrupted (e.g. 0x18000-0x1FFFF or 0x98000-0x9FFFF or 0xC0000-0xC7FFFF). A number of bytes at the end of the corrupted block are null in the corrupted version (and non-null in the original) but the length of this varies and is sometimes interspersed with some non-null data. In one case I've examined, a few recognisable null-terminated ascii strings were evident late in the corrupted block including the following two strings (without quotes):
"/lib/libm.so.6" "/lib/libs.so.6"
The original file did not contain anything resembling these strings ("lib" was not found anywhere) and the (Windows) client is very unlikely to be the source.
SERVER:
SoftEther is running on a NAS box as an "add-on" application.
The NAS box is a D-Link DNS-320L, hardware Version: A3
NAS Firmware Version 1.05 Firmware Date 07/16/2015
One hard drive is fitted, 1GB, standard format.
with add-on SoftetherVPN as described at
http://dlink.vtverdohleb.org.ua/Add-On/
The problem was reconfirmed using:
- Version 1.01
- reported by SoftEther VPN Server Manager as:
- Version 4.19 Build 9599 (English)
- Compiled 2015/10/19 20:09:09 by yagi at pc30
Most testing was done using:
- Version 1.00
- reported by SoftEther VPN Server Manager as:
- Version 4.10 Build 9473 (English)
- Compiled 2014/07/12 02:14:33 by yagi at pc26
Server Settings are generally defaults except:
- Virtual Hub properties
-- Edit virtual hub extended options list
--- 'DisableKernelModeSecureNAT' = 1
- "Virtual NAT and Virtual DHCP Function (Secure NAT) Setting"
-- Enable SecureNAT
-- SecureNAT Configuration
--- 'edit the static routing table to push' (this enables me to establish a remote connection to file shares offered on the NAS's only ethernet port.)
Settings (edited for security) are in the attached file.
The support forum for the NAS box and its add-on applications is unable to solve this issue.
http://forums.dlink.com/index.php?topic ... #msg263558
CLIENT 1:
Windows 7 Pro SP1 64 bit.
SoftEther VPN 4.0 (Ver 4.18, Build 9570)
(File corruption regularly occurs on a file of about 1 MByte)
or
CLIENT 2:
Windows 7 Pro SP1 64 bit.
Windows in-built VPN ('Connect to a workplace')
(File corruption observed frequently on a file of about 12 MByte)
or
CLIENT 3:
Windows 7 Starter SP1 32 bit.
Windows in-built VPN ('Connect to a workplace')
(File corruption not observed while client 1 remained connected to the same server)
(File corruption observed on file of about 12 MByte after client 1 disconnected)
USAGE:
The problem occurs when running copy or robocopy in a command window on the client, copying a file from the client to the server. The destination is a file share of the NAS box, either as a mapped drive or a UNC path.
Running fc /b after copying the file shows that the destination file (on the server) is corrupt.
OTHER TESTS DONE:
I was told to try 'reducing the MTU' so I ran a test with the server's Secure NAT configuration changed from
MTU value = 1500
to
MTU value = 500
This has no effect - the problem remained.
The corruption may be more likely when VPN traffic is heavier, such as copying 2 files simultaneously or just viewing the mapped drive in Windows explorer - but this may be just my perception.
Rebooting the NAS does not fix the problem, nor did upgrading to the latest SoftEther version offered by the D-Link add-on developer.
Copying the same file through the NAS's MyDlink interface yielded no problem (but it isn't practical for my application).
Any ideas on how to fix or diagnose this further would be appreciated.
The files I attempt to copy vary in size and contain compressed data. The saved file is sometimes or often found to be corrupted.
The nature of the file corruption is that a 32 KByte block within the file, starting and ending exactly on 32 KByte boundaries, will be totally different to the original. I've seen various 32K blocks corrupted (e.g. 0x18000-0x1FFFF or 0x98000-0x9FFFF or 0xC0000-0xC7FFFF). A number of bytes at the end of the corrupted block are null in the corrupted version (and non-null in the original) but the length of this varies and is sometimes interspersed with some non-null data. In one case I've examined, a few recognisable null-terminated ascii strings were evident late in the corrupted block including the following two strings (without quotes):
"/lib/libm.so.6" "/lib/libs.so.6"
The original file did not contain anything resembling these strings ("lib" was not found anywhere) and the (Windows) client is very unlikely to be the source.
SERVER:
SoftEther is running on a NAS box as an "add-on" application.
The NAS box is a D-Link DNS-320L, hardware Version: A3
NAS Firmware Version 1.05 Firmware Date 07/16/2015
One hard drive is fitted, 1GB, standard format.
with add-on SoftetherVPN as described at
http://dlink.vtverdohleb.org.ua/Add-On/
The problem was reconfirmed using:
- Version 1.01
- reported by SoftEther VPN Server Manager as:
- Version 4.19 Build 9599 (English)
- Compiled 2015/10/19 20:09:09 by yagi at pc30
Most testing was done using:
- Version 1.00
- reported by SoftEther VPN Server Manager as:
- Version 4.10 Build 9473 (English)
- Compiled 2014/07/12 02:14:33 by yagi at pc26
Server Settings are generally defaults except:
- Virtual Hub properties
-- Edit virtual hub extended options list
--- 'DisableKernelModeSecureNAT' = 1
- "Virtual NAT and Virtual DHCP Function (Secure NAT) Setting"
-- Enable SecureNAT
-- SecureNAT Configuration
--- 'edit the static routing table to push' (this enables me to establish a remote connection to file shares offered on the NAS's only ethernet port.)
Settings (edited for security) are in the attached file.
The support forum for the NAS box and its add-on applications is unable to solve this issue.
http://forums.dlink.com/index.php?topic ... #msg263558
CLIENT 1:
Windows 7 Pro SP1 64 bit.
SoftEther VPN 4.0 (Ver 4.18, Build 9570)
(File corruption regularly occurs on a file of about 1 MByte)
or
CLIENT 2:
Windows 7 Pro SP1 64 bit.
Windows in-built VPN ('Connect to a workplace')
(File corruption observed frequently on a file of about 12 MByte)
or
CLIENT 3:
Windows 7 Starter SP1 32 bit.
Windows in-built VPN ('Connect to a workplace')
(File corruption not observed while client 1 remained connected to the same server)
(File corruption observed on file of about 12 MByte after client 1 disconnected)
USAGE:
The problem occurs when running copy or robocopy in a command window on the client, copying a file from the client to the server. The destination is a file share of the NAS box, either as a mapped drive or a UNC path.
Running fc /b after copying the file shows that the destination file (on the server) is corrupt.
OTHER TESTS DONE:
I was told to try 'reducing the MTU' so I ran a test with the server's Secure NAT configuration changed from
MTU value = 1500
to
MTU value = 500
This has no effect - the problem remained.
The corruption may be more likely when VPN traffic is heavier, such as copying 2 files simultaneously or just viewing the mapped drive in Windows explorer - but this may be just my perception.
Rebooting the NAS does not fix the problem, nor did upgrading to the latest SoftEther version offered by the D-Link add-on developer.
Copying the same file through the NAS's MyDlink interface yielded no problem (but it isn't practical for my application).
Any ideas on how to fix or diagnose this further would be appreciated.