One of the most common tasks required for demilitarized network zones (DMZs) is the automatic forwarding of files across the zone.
The example described in this article shows how to poll an FTP server in a DMZ and start the execution of a job chain for each file found. The example uses the JobScheduler's YADE Client JITL job, which is a preconfigured job delivered with the JobScheduler and can be easily parametrized as required. More information about this Job can be found in the links at the end of this article.
In the example:
- each file found on the FTP server in the DMZ is transferred to local (using the YADE copy command)
- files transferred are renamed
- the remote files are deleted
- an order for a follow-up job chain is created for each file.
Step-by-step instructions for setting up the YADE JITL job can be found in:
The configuration sets up 2 job chains - one to carry out the polling of the FTP server and the file transfer and a second, follow-up job chain that is to be executed after each file has been transferred from the DMZ.
The polling job chain
Polling and file transfer are carried out by the job_chain_ftp_file_order_source job chain, which contains one step with the YADE Client job.
The order for the polling job chain sets the parameters for polling (10s) and poll_timeout (1m). Polling is restarted after the timeout has been reached.
The order also defines how to create the order for each file by setting the value for order_jobchain_name to a valid job chain name.
It also describes how to transfer the files. In this case copying with source protocol is ftp and target protocol is local.
The parameters for the polling job chain order are shown in the following screenshot:
The Follow-Up Job Chain
The job chain job_chain_file_order_source_execute can be an job chain you want to execute. Note that the orders for this job chain will be created by the polling job chain. These orders will have the same parameters as the polling order plus the following: