Chapter 21. Remote Script Settings

Table of Contents
Remote for Windows Mobile

'Remote-Scripts' are small programs that are executed on a remote computer. The result of the execution is sent back to 'Net-Probe' for evaluation. To run these scripts on a remote computer the use of NetProbe-Probe ( or NetProbe-Probe-Service) is required. is a Perl script. This enables the remote executor to be setup and used on any Perl supported operating system, including Windows and Linux. It is also open source allowing the user to modify how it works to suit some specific requirement.

The NetProbe-Remote-Service is a Windows Service. Although the Perl version will work on windows computers, the Service version has a number of advantages. The most important is that it is easy to get the service to start when the computer boots. For Linux uses this can be easily done with the perl version by adding the startup commands to, say the rc.local file.

Both programs are bundled with Net-Probe and both operate in very much the same way. They will open a TCP connection from the Remote Computer to Net-Probe. Net-Probe will also send controlling instructions back to the remote computer via UDP. To ensure only desired computers communicate with each other, a 'Shared Secret' must match in the settings of NetProbe-Remote and Net-Probe. This is not carried in plain text on the network. To offer additional protection Net-Probe will only communicate with computers that are in the 'Access List'. The '' should also have its 'Net-Probe Server' setting set. This will ensure that any requests coming from any source other than the computer specified will be ignored. Additionally scripts sent to are checked with an MD5 checksum to ensure their integrity.

By default Net-Probe will have the Remote-Probe features disabled. Under the menu item 'Aquirer', the 'Remote Script Setting' item will open the configuration window. Here you can enable this feature. Next decide which TCP and UDP ports will be used by Net-Probe and As long as no other service is using the port, it can be used. It would be recommended to select ports above 1024, the reason for this will be discussed later. Then you will need to decide on a shared secret. This can be thought of as a password. You will need to match the UDP, TCP and Shared Secret entries with the setting for all '' setup. There is one remaining setting required in Net-Probe, and that is the IP block ranges that will be permitted access to the Server. If the request does not come from a host in the specified block ranges it will be ignored. Block ranges can be added and removed within the 'Remote Script Settings' window.

Figure 21.1. Remote Script Settings

Remote Script Settings

The next step is to install '' on the computer's that need to execute the scripts. The script has been kept as simple as possible. Open the script with a text editor and enter the Server, TCPPort, UDPPort and Shared Secret options at the top of the file. Once done you are ready to start. The script is written in Perl and will require that the Digest::MD5 be installed. The other modules required are most lightly already installed (IO::Socket and Sys::Hostname). To start the script you could enter from the prompt:

>perl 2>1&

You will most lightly want to add this line to one of your startup scripts so that it starts when the server starts (an example might be your rc.local file under /etc/rc.d directory on some Unix box or Windows boxes with cygwin installed -

Copyright (c) Warren Flemmer