FlowFence
FlowFence is a minimal, fast, and low-level firewall built in C. It captures and inspects raw Ethernet and IP packets using libpcap, then filters or blocks traffic based on customizable rules.
Summary
| Latest Version | Unknown |
|---|---|
| License | Unknown |
| CI Status | Failing |
| Stars | 1 |
| Forks | 0 |
| Open Issues | 0 |
| Last Commit | 2025-06-16 |
| Downloads | 0 |
| Last Indexed | 2026-11-23 09:07 |
Installation
nimble install FlowFence
choosenim install FlowFence
git clone https://gitlab.com/networking-research/flowfence
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| FlowFence | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Source
| Repository | https://gitlab.com/networking-research/flowfence |
|---|---|
| Homepage | https://gitlab.com/networking-research/flowfence |
| Registry Source | gitlab |
README
🔥 FlowFence - Lightweight C Firewall with Raw Packet Filtering
FlowFence is a minimal, fast, and low-level firewall built in C. It captures and inspects raw Ethernet and IP packets using libpcap, then filters or blocks traffic based on customizable rules.
Whether you're building a security appliance, a packet inspection tool, or learning about network protocols, FlowFence is an ideal starting point.
🚀 Features
- 📦 Packet Capture using
libpcap - 🔍 Layer 2 and Layer 3 Parsing
- Ethernet
- IPv4
- TCP / UDP / ICMP
- 🧱 Rule-Based Filtering
- Match by IP address, port, protocol
- Drop or allow packets based on flexible logic
- 📊 Logging
- Log dropped packets with metadata (source/destination, protocol, timestamp)
- 🧪 Modular Design
- Easy to extend to support IPv6, application-layer protocols, etc.
- ⚡ Built for Performance
- No kernel overhead
- Processes packets in real time
🛠️ Architecture Overview
```txt ┌────────────┐ │ libpcap │ ← Captures raw packets └────┬───────┘ │ ▼ ┌────────────┐ │ Ethernet │ ← Parses src/dst MAC, ethertype └────┬───────┘ ▼ ┌────────────┐ │ IP Layer │ ← Version, IHL, TOS, Checksum... └────┬───────┘ ▼ ┌────────────┐ │ Protocol │ ← TCP, UDP, ICMP match └────┬───────┘ ▼ ┌────────────┐ │ Rule Set │ ← Allow / Drop decision └────┬───────┘ ▼ ┌────────────┐ │ Logging │ ← (Optional) Log dropped packets └────────────┘