AntiNix-Panzer-Gateway – Ultra-lightweight, systemd-free Tor & I2P Gateway based on antiX

Hi everyone,

First, a clear disclaimer: This is an independent, Whonix-inspired open-source hobby project and not an official Whonix derivative.

I wanted to share a project I have been working on and would greatly appreciate technical feedback or a security review from this community.

Motivation & Concept

I love the Whonix Gateway architecture, but I wanted to explore building a minimal, 100% systemd-free Tor Gateway tailored for older or resource-constrained hardware (runs smoothly with 512 MB RAM, ~250–300 MB idle footprint, ~6 GB core disk size). It is built on top of antiX Linux (Debian Trixie base) using SysVinit/runit and IceWM.

Key Architectural Highlights

  • Fail-Closed Firewall & eBPF/XDP: Uses an xdp-filter shield on eth0 combined with a strict fail-closed nftables ruleset (forward drop, zero MASQUERADE NAT). All Workstation traffic on eth1 is forced in kernel-space into Tor’s TransPort (9040) and DNSPort (5353).
  • Strict UID Service Isolation: Desktop sessions (user, UID 1000) and root shells are blocked from direct WAN access via nftables (meta skuid). Only dedicated system users (debian-tor / UID 107 and i2pd / UID 105) are permitted to initiate outbound traffic on eth0.
  • Automated Censorship Circumvention (Snowflake Auto-Fallback): Upon login via Slimski PAM and dhcpcd hooks, Tor attempts a direct bootstrap first. If blocked, it automatically switches to Snowflake (using Mozilla and Freifunk STUN servers, zero Google dependencies).
  • Optional Parallel I2P Routing (i2pd): Includes a lightweight C++ i2pd daemon (~35 MB RAM) toggleable via a custom YAD control panel, exposing isolated HTTP (4444) and SOCKS5 (4447) proxies exclusively to eth1.
  • Kernel & OPSEC Hardening: Includes page_poison=1 slub_debug=P, libpam-tmpdir, libpam-pwquality, disabled USB mass-storage auto-mounting, Lynis auditing, and an emergency desktop kill-switch that physically brings down eth0/eth1, force-kills crypto daemons (SIGKILL), flushes caches, and triggers poweroff -f.

Known Minor UI Quirks

  • Since the focus of this release was primarily on kernel hardening and network isolation, there are still a few minor cosmetic flaws in the custom IceWM theme—such as missing window titlebar icons for close, minimize, and maximize (standard keyboard shortcuts like Alt+F4 or Esc work normally, and the visual polish will be addressed in a future update).

Links & Transparency

Specific Questions for Review

  1. Do you see any potential edge-case leak vectors in combining xdp-filter on eth0 with meta skuid-based nftables output filtering and prerouting redirect rules on eth1?
  2. Are there any subtle pitfalls with running i2pd alongside Tor’s transparent proxy when isolating ports 4444/4447 via return rules in the NAT table?

Thanks in advance for any constructive criticism or hardening suggestions!

First of all, I would like to express my thanks to the Whonix-Forum-Team for reinstating my post!!

There was an issue with the previous .ISO file, which I have now resolved. If anyone has already downloaded it, please do not use it for testing. During the final cleanup process before creating the .ISO, two important files were accidentally removed: the startup file for `nftables` and the file required to launch the DHCP server. I have fixed this, and it should not happen again.

I hope you enjoy testing it, and I look forward to hearing your feedback.

Thanks Boxenknacker

Edited the post to include the link to the project since the post that got approved was missing the link.

Overall what you’ve done looks cool (especially the BPF firewall). I may take a look and give some feedback later.

1 Like

Thank you—hearing these words from you, or rather reading them, feels like being knighted.:blush:

Why am I not getting an 8-out-of-8 score on the audit test? I’ve been working on this for ages; sometimes everything passes with an “OK,” and other times it doesn’t.

I’m about to lose my mind over it.

:loudspeaker: UPDATE (Migration to Codeberg):

For privacy reasons and to fully support free Open-Source infrastructure, I have permanently removed this project from GitHub and migrated everything to Codeberg.

The new official home for the AntiNix-Panzer-Gateway is now live here:

:globe_with_meridians: Official Project Page: https://boxenknacker.codeberg.page/
:package: New Code Repository: Boxenknacker/AntiNix-Panzer-Gateway - Codeberg.org

You will find all scripts (install.sh), nftables configurations, and the usual ISO/Appliance downloads over there. All previous GitHub links are now inactive.