Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Create a netfilter queue and display packets passing through. Can also save those packets to a pcap file.
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README
nfqueue_recorder.c

README

Launch the program as root, either with a destination pcap file or not, and send any ipv4 traffic that you want to it.

---------
$ gcc -g -Wall -o nfqueue_recorder nfqueue_recorder.c -lnetfilter_queue -lpcap

$ sudo ./nfqueue_recorder -o todays-traffic.pcap

$ sudo iptables -I FORWARD -j NFQUEUE
---------

stdout will output the ip/tcp/udp headers in the console

dependencies:
 * libpcap-dev
 * libnetfilter-queue-dev

you can open the pcap file with tcpdump or wireshark:
---------
$ tcpdump -qns 0 -X -r todays-traffic.pcap
---------
Something went wrong with that request. Please try again.