From er453r on stackoverflow : http://unix.stackexchange.com/questions/143745/preprocess-packets-send-to-from-interface
compile : cc -lnetfilter_queue -lnfnetlink -o preprocess preprocess.c
tell iptables to fwd packets : sudo iptables -A OUTPUT -p udp --dport 4444 -j NFQUEUE --queue-num 0
test : nc -lu 4444 and nc -u 127.0.0.1 4444