Key Pages: [ Rope Home Page | Basics (tutorial) | Language Reference | Download ]

Compiling IpTables Rope Scripts

Rope scripts must be compiled into a binary format (not machine code, I hasten to add) using the ropec command before they can be executed either in UserLand using the "rope" binary, or in KernelLand using IpTables.

The ropec command takes the source code file name as it's argument. The source file name must have the extension ".rope". If no options are specified, the compiled script is written to a file with the same name as the source, but with the extension ".rp". So the following creates "mytest.rp" in the working directory.

ropec mytest.rope

If you want to run your script in KernelLand, you must write it (as root) to the directory /etc/rope.d/scripts, like this..

ropec -i mytest.rope

or

ropec -o /etc/rope.d/scripts/mytest.rp mytest.rope

The "-i" option creates the compiled file in the /etc/rope.d/scripts directory. The "-o" option allows you to specify where the name of the output file yourself.

History

In versions before 20051223, the compiler perl script needed to be called directly and did not take any options, like this..

LANG=C perl ropec.pl < mytest.rope > mytest.rp

or

LANG=C perl ropec.pl < mytest.rope > /etc/rope.d/scripts/mytest.rp

Scroll to Top