Checking Firewall access
One of the most common issues that affects File Transfer is network connectivity.
You can check that your firewall is correctly configured by opening powershell on the source machine and checking that you are able to reach the destination server on the expected port.
The command to check this is:
Test-NetConnection <servername> -port <portnumber>
For example Test-NetConnection myserver -port 22
This gives output similar to the following:
ComputerName : myserver.com
RemoteAddress : 123.123.123.123
RemotePort : 22
InterfaceAlias : Wi-Fi
SourceAddress : 192.168.10.152
TcpTestSucceeded : True
Test-NetConnection can be abbreviated to TNC
There are two potential problems with this method for resolving firewall issues - the first is that only TCP is supported (not UDP), the second is that if the listener is not actively running, the test will fail.
The second issue can be addressed by using the following command on the target server in powershell:
$Listener = [System.Net.Sockets.TcpListener]22;$Listener.Start();
(Replace 22 with the port required)
This creates a listener. Once you've done this, you can run the Test-NetConnection
Finally, after you have tested, you can stop the listener again by issuing this command:
$Listener.Stop();