/nethook

LKM to use netfilter hooks to intercept/log TCP packet information

Primary LanguageC

nethook

LKM to use netfilter hooks to intercept/log TCP packet information

Overview

The module uses the Netfilter framework to register a hook that captures incoming TCP packets before they are routed. It logs the source and destination IP addresses and ports of the packets.

What it does:

  • Intercepts packets at the NF_INET_PRE_ROUTING stage
  • Logs source and destination IP addresses and ports
  • Filters for TCP packets only (unless I can be bothered to change that)

Prerequisites

A brain, usually