FTP Server issue

Discussion of application development using iX Developer, including but not limited to getting started, using the functions tab, properties, objects and installation.
Post Reply
s1fis
Posts: 3
Joined: Mon Oct 22, 2018 2:36 am
Location: Greece
Contact:

FTP Server issue

Post by s1fis »

Hello to everybody.

Recently I made a project with an X2 Pro4 with some signals to log and saved to the USB. Our customer wanted to get the csv files to their office, so we concluded to use the FTP Server function. We did all the tests and everything worked fine using FTP client (filezilla) from the office.
The system is installed on a ship, so we asked from the IT engineers to do some port forwarding to port 21, 5900 and 9600 (for my plc).
But when the system was installed on the ship, the FTP did not work. The other ports are working (remote access and plc programming).
Then we realized that the FTP needs a bunch of random ports to work and all these ports are closed from the satellite supplier of the ship for security reasons and cannot be opened. They need to know specific ports to prepare the rules for FTP server.

My question is:
a. can we have further settings of the FTP server at the iX developer to configure active/passive mode, etc.?
b. what other options I have for sending the csv files?

Thank you all in advance!!!

User avatar
Russ C.
Posts: 213
Joined: Thu Nov 16, 2017 3:32 pm
Contact:

Re: FTP Server issue

Post by Russ C. »

Hmm, interesting about the FTP needing random ports.

In any case, attached is an example project that will push CSV's to a specified network location. The only caveat is that if you're trying to push to a Windows 10 machine, SMB 1.0 server must be enabled under "Turn Windows Features On/Off"
Attachments
ReadWriteNetworkLocation.zip
(29.21 KiB) Downloaded 438 times
Best regards,

Russ
(801) 708-6690
Technical Support
Contact Us

Beijer Electronics AB
http://www.beijerelectronics.us

s1fis
Posts: 3
Joined: Mon Oct 22, 2018 2:36 am
Location: Greece
Contact:

Re: FTP Server issue

Post by s1fis »

Russ C. wrote:Hmm, interesting about the FTP needing random ports.

In any case, attached is an example project that will push CSV's to a specified network location. The only caveat is that if you're trying to push to a Windows 10 machine, SMB 1.0 server must be enabled under "Turn Windows Features On/Off"
Thanks for that, I did test the sample and it works. But what I have to change to push my attachment @"\FlashDrive\Project\Project Files\DatabaseExport\Data Loggers\DataLogger1.csv" ?

I'm not so familiar with scripting... :-(

But what is your opinion regarding the FTP? Did it sound wrong to you? I was informed by the IT engineer about that and as I has a look on the web it is like that, depending the mode. Satellite providers have a lot of restrictions so I have to be very precise with the ports, etc.
The FTP server used on iX is active or passive? or this is depending on the client?

Thanks.

AMitchneck
Posts: 137
Joined: Mon Jun 11, 2012 2:10 pm

Re: FTP Server issue

Post by AMitchneck »

s1fis,

Using ftp in active or passive mode is determined by the client not the server. The client opens a control connection via port 21. As part of the initial handshake, the client requests active or passive mode. In active mode, the ftp server opens the data transfer port as specified by the client. In passive mode, the client opens the data transfer port as specified by the server. The default is passive mode.

For my application, I worked with our router's manufacturer to enable passive ftp forwarding. What the router does is it sniffs the ftp packets and recognizes the passive request's response and does the following with it. First, it creates a temporary port forwarding that is white listed to only be usable by the ftp client's IP (that is disabled/removed once the client disconnects). Second, it modifies the response to indicate the IP address of the router (rather than the ftp server behind the router) along with the temporary port the router assigned to forward to the ftp server. This enables the client to connect to the ftp server using the router's IP address and forwarding table without breaking passive connections.

If you prefer to use active ftp and you are using a windows computer, go to Control Panel > Internet Options, go to the Advanced tab, and uncheck "Use Passive FTP (for firewall and DSL modem compatibility)". I will note that if you are doing this over the internet you may still have an issue as the router/firewall on your site may block the ftp traffic rather than the router on the ship.

If none of the above options work for you, the only other option I know of is to create a VPN connection to the ship so you can virtually connect directly to the ftp server as if your computer was on the ship. This method would be the most secure. (The above methods openly send login credentials and file data, without encryption, over the internet.)
Adam M.
Controls Engineer
FlexEnergy

Post Reply