Crates.io | iptrap |
lib.rs | iptrap |
version | 1.0.7 |
source | src |
created_at | 2014-12-05 19:11:14.480364 |
updated_at | 2020-12-21 08:37:54.997334 |
description | A fast, stateless TCP sinkhole |
homepage | https://github.com/jedisct1/iptrap |
repository | https://github.com/jedisct1/iptrap |
max_upload_size | |
id | 462 |
size | 32,657 |
A fast, stateless TCP sinkhole, implemented in Rust. Performs TCP handshakes on all ports and logs the initial payload.
See A sinkhole that never clogs for an introduction.
Dependencies:
Compilation:
git submodule update --init --recursive
cargo build --release
IPTrap implements its own TCP/IP stack, and the network interface it is listening on shouldn't have any IP address configured for the kernel.
However, IPTrap doesn't respond to ARP requests: a tool such as fakearpd
can
be used for that purpose.
iptrap <device> <local ip address> <uid> <gid>
Starts the sinkhole. Although it requires root privileges in order to directly open the network interface, it also requires a non-root uid to drop its privileges as soon as possible.
IPTrap listens to all TCP ports, with the exception of port 22.
The sinkhole logs are available as JSON data on a ZeroMQ PUB socket on port 9922.