Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The example was tested using a Windows system as the remote system from which the file is initially pulled. The example would work without change if the remote system were a UNIX system. The local test system on which the UDM Manager runs is Linux and the test system to which the file is sent using FTP is also Linux.


<pre>
1. 
set
 echo=yes
2. 
open
 rmt=192.168.20.47 user=joe pwd=abcdefg port=7887
3. 
mode
 type=text
4. 
attrib
 local createop=replace
5. 
cd
 rmt=C:\tmp\tmp
6. 
cd
 local=/home/joe/wrk/xmp/dmzFtp
7. 
copy
 rmt=file.txt.org local=file.txt
8. 
exec
 local cmd="sh /home/joe/wrk/xmp/dmzFtp/ftp.sh" user=joe pwd=abcdefg port=7887
9. 
exec
 dev-linux24 cmd="ls /home/joe/tmp" user=joe pwd=abcdefg port=7887
10. 
quit
 
<?pre>

Panel
Html bobswift
Html bobswift
Html bobswift
Html bobswift
Html bobswift
Html bobswift
Html bobswift
Html bobswift
Html bobswift
Html bobswift
Html bobswift

UDM Script Explanation

  1. Turns echo on to put the commands into the transaction log.
  2. Open a connection to the remote UDM server using remote port 7887. The open command assigns the logical name 'rmt' to the remote system at IP address 192.168.20.47 and assigns the logical name local to the system on which the UDM Manager is running. Setting up local is done automatically by UDM for two-party transfers when a second system is not specified.
  3. Change the transfer mode from binary to text.
  4. Change the Creation Option attribute for the local server from new to replace. Without this change, existing files cannot be replaced with new copies.
  5. Change the current directory on the remote Windows system to C:\tmp\tmp. This is the directory from which the file is pulled.
  6. Change the current directory on the local UNIX system to /home/joe/wrk/xmp/dmzFtp. This is the directory into which the file is pulled.
  7. Use the UDM copy command to transfer the file from the remote Windows system to the local UNIX system.
  8. Execute the shell script on the local system to FTP the file to the 2nd system inside the firewall. In this example, the exec command uses the UCMD server running on the local system to execute the shell script just as if it resided on a remote system. The port must be specified on the command if it is set to a value other than the default value.
  9. Execute the ls command on the remote system to show that the file was copied. In a production environment, a process could be started to do something productive with the transferred file.
  10. Quit command stops UDM script execution and the UDM script completes.

...