Showing posts with label ftp. Show all posts
Showing posts with label ftp. Show all posts

Monday, April 14, 2014

Sick FTP service

On Windows 2008R2 server, a freshly installed FTP service does not accept an external connection attempts, even if the FTP firewall rule is enabled.
Could be cured by issuing the following command:
netsh advfirewall set global StatefulFTP disable
Then restart of the ftpsvc service.

Wednesday, July 7, 2010

Curl

curl is a very powerful utility. It even can upload a file to a FTP server (-T option) and it's possible to create a directory on the remote FTP folder by sending an arbitrary command:

curl ftp://server/existed_parent_folder/ -Q -"mkd new_subfolder_name"

Here "mkd" is the server's command.

To know the list of the server commnads, execute:

curl ftp://server/ -Q -"help" -v

Sunday, November 1, 2009

ftp thru a NAT firewall

I always was wondering, how ftp data connection gets through a firewall with NAT.
A ftp client on a machine with local IP (192.168.x.x) sends its own local address, like:
---> PORT 192,168,0,2,150,117
but the server still manages to establish the data connection to the client machine.
The answer to this question is simple - the NAT router works also on the application level and understands the ftp commands. When it sees the "PORT" command in the control connection, it translates the internal address to the external and adds a temporary record to the firewall table.

It's funny, but my simple cheap WiFi all-in-one box at home does the job when the ftp commands are upper cased and ignores it when it lowercased.

Good article about the subject here: