Skip to content

Create a netfilter queue and display packets passing through. Can also save those packets to a pcap file.

Notifications You must be signed in to change notification settings

iznan/nfqueue_recorder

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

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 -lnfnetlink  -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
---------

About

Create a netfilter queue and display packets passing through. Can also save those packets to a pcap file.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 100.0%