Posts Tagged ‘file transfer’

How to share your Windows local drives via Remote Desktop (RDP) – Safe file copy with RDP protocol

Tuesday, October 14th, 2014

remote-desktop-connection-options-button-screenshot

Just had a task to install Tomcat 7, Java JRE 1.7 and .NET Framework 3.5 and MS Visual C++ x86 on a Windows 2008 RC2 system situated behind a firewalled network NAT. To do the installation I had to use a special jump host (which was also a MS Windows system). The end system where installation had to occur did not have access to the Internet was in special DMZ-ed network so to install above 3 software packages I had to transfer them from my notebook to install host.
To depic what had to happen, I had to:

Transfer files from (host A – my notebook) -> via host (B – jump host) to host (C – the end install host).

Default Windows RDP Client command (mstsc.exe) supports transferring files between host A and RDP-ed host B via standard file copy / paste, so I tried transferring files between my work Windows PC to (jump host B), by copy pasting the files, but as the DotNetFx35Client.exe file was 261 Megabytes and the network between host A and B has some shapings and network firewalls the file transfer timed out. Copy / Paste method via RDP Protocol by default, doesn’t support Transfer Resume thus in order to transfer the 261 MB file, I tried Sharing C:Temp Folder and transfer that way, but unfortunately I didn’t have the permissions in that Windows Domain to create sharings (even though on the remote system I was already logged in with admin accounts). I’ve consulted a colleague on advise on how to transfer the files and I was told about a Win RDP client option to share drives.

Here is how to share your PC drive letters C: D: E: etc. via Remote Desktop Protocol


1. Run mstsc.exe

2. Click the Options button

remote-desktop-connection-options-button-screenshot

3. Click Local Resources tab

4. Click More button

remote-desktop-connection-more-options-button-screenshot

5. Click on Drives

remote-desktop-connection-share-windows-disk-drives-option-screenshot

Then after connecting to the Remote RDP host, all your local PC drive partitions C: D: E: will be visible as (attached) ones in mounted in My Computer / MS Explorer with assigned new drive letters

Once, I transferred the .NET Framework 3.5 while using the installer I was notified that .NET Framework 3.5 is by default included in Windows 8 and I need only to enable it.

To enable .NET Framework 3.5 in Windows 8 from Control Panel

Choose Programs, and then choose Turn Windows features on or off.

Select the .NET Framework 3.5 (includes .NET 2.0 and 3.0) check box.
enable-dot-net-framework-windows-8-windows-8.1-add-feature-screenshot

Enabling Active FTP connections on CentOS 5.5

Tuesday, January 4th, 2011

If you experience problems with making your CentoOS 5.5 work with active ftp connections , e.g. every connection you make to the FTP needs to be in a passive mode or the file transfer or FTP directory listing doesn’t initialize at all, here is how you can solve it:

Edit the file /etc/sysconfig/iptables-config and change their the line:

IPTABLES_MODULES="ip_conntrack_netbios_ns"

to look like:

IPTABLES_MODULES=”ip_conntrack_netbios_ns ip_nat_ftp ip_conntrack_ftp”

Adding the two modules ip_nat_ftp and ip_conntrack_ftp will instruct the CentOS’s /etc/init.d/iptables firewall rules to initialize the kernel modules ip_nat_ftp and ip_conntrack_ftp

This modules solves problems with Active FTP not working caused by a host running behind a firewall router or behind a NAT.

This will hopefully resolve your issues with Active FTP not working on CentOS.

If loading this two kernel modules doesn’t solve the issues and you’re running vsftpd FTP server, then it’s likely that the Active FTP non-working problems are caused by your VSFTPD configuration.

If that’s the case something that might help is setting in /etc/vsftpd/vsftpd.conf the following variables:

pasv_enable=NO
pasv_promiscuous=YES

Of course as a final step you will need to restart the iptables firewall:

[root@centos: ~]# /etc/init.d/iptables restart
Flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: filter [ OK ]
Unloading iptables modules: [ OK ]
Applying iptables firewall rules: [ OK ]
Loading additional iptables modules: ip_conntrack_netbios_ns
ip_nat_ftp ip_conntrack_ftp [ OK ]

As you can see the two modules ip_nat_ftp and ip_conntrack_ftp are now loaded as additional modules.
Moreover if you have also modified your vsftpd.conf you need to restart the vsftpd via the init script:

[root@centos: ~]# /etc/init.d/vsftpd restart
Shutting down vsftpd: [ OK ]
Starting vsftpd for vsftpd: [ OK ]

If adding this two modules and adding this two extra variables in vsftpd configuration doesn’t help with making your FTP server to work in Active FTP mode , it’s very likely that the whole troubles comes from the firewall configuration, so an edit of /etc/sysconfig/iptables would be necessary;

To find out if the firewall is the source of the FTP not able to enter active mode, stop your firewall for a while by issuing the cmd:

[root@centos:~]# /etc/init.d/iptables stop

If iptables is the source of thepassive ftp troubles, an iptables rules similar to this should make your firewall allow active ftp connections;

*filter :INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT
[0:0] -A INPUT -i lo -j ACCEPT -A INPUT -d 127.0.0.0/255.0.0.0 -i ! lo -j REJECT –reject-with icmp-port-unreachable
-A INPUT -m state –state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m tcp –dport 80 -j ACCEPT
-A INPUT -p tcp -m state –state NEW -m tcp –dport 44444 -j ACCEPT
-A INPUT -p tcp -m state –state NEW -m tcp –dport 21 -j ACCEPT -A INPUT -p icmp -m icmp –icmp-type 8 -j ACCEPT
-A INPUT -j REJECT –reject-with icmp-port-unreachable -A FORWARD -j REJECT –reject-with icmp-port-unreachable
-A OUTPUT -j ACCEPT -A OUTPUT -p tcp -m tcp –dport 21 -m state –state ESTABLISHED,RELATED -j ACCEPT