pktanon(1)
π pktanon π
okay so bestie, welcome to the pktanon manual page β that's section 1 of the manuals, the "run this in your shell" section, and trust me this one is a whole vibe π¦
β¨ NAME β¨
pktanon β profile-based traffic anonymizer π
πΈ SYNOPSIS πΈ
pktanon [-c profile_file] input_file output_file
pktanon [options] [input_file] [output_file]
π DESCRIPTION π
So like, pktanon is a generic framework for network traffic anonymization β¨ Its whole thing β its main character energy, if you will β is making it possible for people to actually share realistic network traces without doxxing everybody in them, by doing fine-grained, profile-based anonymization π
And the way you steer it? anonymization profiles. Those profiles are literally where you define how the network traffic should be made anonymous, so you get to decide exactly how much information actually gets scrubbed π
ngl the reason profiles are so iconic is that they make it super easy to adapt which info gets anonymized to different environments or local legislation. like, different place, different rules, same tool. slay π
π OPTIONS π
Configuration π«Ά
-c,--config <config_file>β the anonymization profile, aka the file that tells pktanon what to hide β¨
Input Parameters π
-s,--snaplen <number>β read the first snaplen bytes from each packet (works for both captures and files) β [default:256]-i,--interface <interface>β capture packets from this interface πΈ-p,--no-promiscuous-modeβ do not set the interface in promiscuous mode-e,--pcap-filter <filter>β filter specification for libpcap-r,--use-raw-socketsβ use linux raw sockets instead of libpcap (heads up: the-eoption is not available when you do this π)
Output Parameters π
-U,--packet-bufferedβ output (to file) is flushed every N packets-n,--network <interface>β send packets to <interface> using libpcap-inject β β οΈ EXPERIMENTAL, bestie, you've been warned-o,--socket <Addr:Port>β send packets to Addr:Port using sockets
(if '--socket' option is set:) π₯
-6,--use-ipv6β Use IPv6-u,--use-udpβ Use UDP
Miscellaneous π
-l,--use-libpcapβ use libpcap for file i/o-h,--help,--usageβ print this message and exit π-q,--quietβ Reduce output π€«-v,--verboseβ Increase output π£οΈ
π§ RUNNING PKTANON π§
okay so first thing's first: PktAnon needs a configuration file. periodt. π
Sample configuration files live in the profiles directory in the distribution β and that same directory also includes a sample network trace, so you can play immediately π
Two of the included configuration files are profile-identity.xml and profile.xml:
- the first one copies all the fields from original packets into anonymized packets, except that the packets content is cropped βοΈ
- the second one anonymizes mac addresses, ip addresses, and ports in the packets π
To anonymize the sample trace using the sample configuration files, run:
pktanon -c /usr/share/doc/pktanon/examples/profiles/profile-identity.xml profiles/sample.pcap out.pcap
or
pktanon -c /usr/share/doc/pktanon/examples/profiles/identity.xml profiles/sample.pcap out.pcap
The output should look like this:
-----------------------------------------------
pktanon --- profile-based traffic anonymization
-----------------------------------------------
initializing PktAnon, configuration = /usr/share/doc/pktanon/examples/profiles/profile-identity.xml
istream: opened file profiles/sample.pcap
ostream: opened output file out.pcap
initialized
complete
statistics for input file 'profiles/sample.pcap'
processed packets: 9
errors in packets: 0
elapsed time: 22us
Mpps: 0.409
The anonymized trace out.pcap will be created in the root directory of the distribution π
π¨ bestie listen β if the output file already exists, it will be trimmed and rewritten without any warning π no prompt, no vibe check, nothing. know that before you run it, fr fr.
that's it, that's the page π«Ά this was the pktanon entry from the section 1 manuals β version 2~git20240314.84e136f..., dated 16 March 2026. go forth and anonymize responsibly, icon πβ¨
π¦ where this page comes from
- ubuntu stonking: pktanon 2~git20240314.84e136f+dfsg-1 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms