http://gnumonks.org/ftp/pub/doc/packet-journey-2.4.html

I assume you are a linux user, considering your username

from there you could use the standard netfilter workings, etc, to do what it...