CPXE Ghost (cpxeghost) - About

The cpxeghost application traps AMD magic packets (wake on LAN) sent from the Symantec Ghost console prior to starting a job (AI-package install, clone, image dump etc).

Upon recepient of one such packet the MAC-address is extracted and mapped onto one or more ip-addresses associated with that MAC-address (see the Setup section). For each address an external script is executed until either the list of addresses is finished or the script returns 0.

Requirements:

You need to have the arping utility installed to collect MAC-addresses. A C++ compiler is needed to built the source code.

Install:

Download the tar.gz archive an unpack it somewhere. Build the source by running 'make'.

Setup:

You have to generate the database (flat file, plain text) of MAC- and IP-addresses. This is done by first scanning your subnets using the make-maclist.sh script:

bash$ ./make-maclist.sh > maclist.log

Then transform this list into the finial format:

bash$ cat maclist.log | ./make-nodelist.sh > nodes.txt

If you like to generate the nodes.txt file yourself, then each record should be tab-separated where the first column is the MAC-address followed by one or more IP-addresses:

00:12:3F:92:2C:26  118.223.37.17  192.168.10.15  192.168.11.15
00:12:3F:BA:EE:5E  118.223.37.31  192.168.10.16  192.168.11.16
00:12:3F:BA:E2:B3  118.223.37.45  192.168.10.17  192.168.11.17

Testing:

Now test that everything works by running cpxeghost with debug enabled:

bash$ ./cpxeghost --map=nodes.txt -d

Once you see that everything works, then run cpxeghost in daemon mode:

bash$ ./cpxeghost --map=nodes.txt -x

The script to execute on trap of magic packets are cpxeghost.sh. You have to tweak it because by default it do nothing except logging. You can use and alternative script by passing --script=name.sh to cpxeghost.