Running ROPE Scripts In The Linux Kernel

KernelLand mode is the usual "production" mode for ROPE scipts. In this mode, a ROPE script becomes a match-module for IpTables, allowing complex tests to be performed on any combination of packet header fields (IP, UDP, TCP) and data payload.

A Rope script can be installed in the kernel at run time using IpTables by following the steps..

iptables -A FORWARD -m rope --script limewire -j LOG

Command Line Options

In versions after 20050315, the "-m rope" argument may be followed by one or more of the following options..

See PassingArguments for a description of how the various --rope-push-XXX options can be used to pass arguments into a rope script.

Here's an example command line showing some of these features in use..

iptables -A INPUT -m rope \
    --rope-script contlen \
    --rope-push-int 2000000 \
    --rope-push-ip www.lowth.com \
    -j ACCEPT

This command appends a call to the "contlen" script to the INPUT chain, and arranges that the number 2000000 and the IP address of www.lowth.com are pushed onto the stack when the script starts to run. If the script returns a yes state, the packet is accepted.

See Also

UserLand, Compiling, Basics, IpAddress