Support / Knowledge Base / How to configure FTP Relay in TransPort routers

How to configure FTP Relay in TransPort routers

Why use FTP Relay
The FTP Relay agents allow any files to be transferred onto the router by a specified user using the File Transfer Protocol to be temporarily stored in memory and then relayed to a specific FTP Server. This is useful when the router is being used to collect data files from a locally attached device such as a webcam which must then be transferred to a host system over a slower data connection such as W-WAN. In effect, the router acts as a temporary data buffer for the files.
Configure FTP Relay on a TransPort router

Browse to Configuration – Network > FTP Relay> FTP Relay n and configure the agent like in the following screenshot:
User-added image
Please find details for all the fields below:
Relay Files for user: is the name of the local user and should be one of the usernames assigned in the Configuration – Security > Users web page. This name is then used as the FTP login username when the local device needs to relay a file.
To FTP Server: is the name (IP address) of the FTP Server to which the files from the locally attached device are to be relayed.
Server Username: is the username required to log in to the specified FTP Server
Server Password/Confirm Server Password: is the password to be used to log in to the Server.
Remote directory: is the full name of the directory on the FTP Server to which the file is to be saved. Please note that if you use a Filezilla Server and you set for example “C:/” as Home directory for the server, when the transport will connect to it, the server won’t recognize “C:/” as home directory but only “\”, so in this case, this fields should contain only the subdirectories path contained in the Server home directory where you need to save the file. In this example this Path is “TestFTPRelay\T1” that correspond in the Server to the Path “C:/TestFTPRelay/T1”.
Rename file: When checked, this checkbox causes the router to store the uploaded files internally with a filename in the form “relnnnn” where nnnn is a number that is incremented for each new file received. When the file is relayed to the FTP Server the original filename is used. When unchecked, the file is stored internally using its original filename. This parameter should be set if it a file having a filename longer than 12 characters is to be uploaded. This is due to the internal file system having the 8.3 filename format (i.e. autoexec.bat).
Transfer Mode ASCII / Binary: These two radio buttons select between the two possible file transfer modes, binary data or ASCII data.
Transfer Command STORE / APPEND: These two radio buttons select between the two possible storage methods, either append to or replace existing file.
Attempt to connect to the FTP Server n times: The value in this text box specifies the number of connection attempts that the router should make if the first attempt is not successful.
Wait s seconds between attempts: The value in this text box specifies the interval (in seconds) that the router should wait in between successive connections attempts.
Remain connected for s seconds after a file has been transferred: The value in this text box specifies how long (in seconds) that the router will maintain the connection to the FTP host after transferring a file.
If unable to relay file Delete File / Retain file: These two radio buttons select the behavior with respect to storing the file if the router fails to connect to the FTP host (after retrying for the specified number of attempts). Select Delete File if the file should not be stored permanently. If the file is retained, manual intervention will be required to recover it at a later stage. Note:  If the file is not retained, it will be lost if the power is removed from the router.
The correspondent CLI commands for the configuration in this example are:
frelay 0 locuser "username"
frelay 0 ftphost ""
frelay 0 ftpuser "user1"
frelay 0 ftpepwd "KD5lSVJDVVgD"
frelay 0 ftpdir "TestFTPRelay\T1"
Testing the FTP Relay feature
Configure the remote FTP server with an User (corresponding to the one configured on the TransPort FTP Relay agent), allowed at least to read/write on the Home directory specified:
User-added image

User-added image
Connect the local FTP client to the TransPort FTP server and transfer the file:
User-added image
Check the eventlog on the TransPort browsing to Management - Event Log, you will see the FTP transfer from the Local Host to the TransPort (in orange) and the FTP relay of the file from the TransPort to the remote FTP Server (in red)
User-added image
The successful transfer can be also checked on the FTP remote server:
User-added image
Last updated: Aug 08, 2017

Recently Viewed Articles

No recently viewed articles
Contact a Digi expert and get started today! Contact Us