🚀 automtu — Automatic Path MTU Detection for Linux & WireGuard
automtu is a small but powerful CLI tool that automatically detects your egress interface, probes the Path MTU (PMTU), computes a safe MTU for WireGuard, and optionally applies it — or simply prints it for automation tools like Ansible.
Perfect for:
Docker-in-Docker (DiD)
WireGuard tunnels
Cloud VPS setups
CI runners
NAT / overlay networks
No more TLS handshake timeouts. No more guessing MTU values.
Just reliable networking. ✅
✨ Features
🔍 Auto-detects your egress interface (eth0, ens3, etc.)
📡 Probes Path MTU using DF-ping (ping -M do)
🧮 Computes a safe WireGuard MTU (effective_mtu - overhead)
🔐 Supports WireGuard peer auto-discovery
⚙️ Optional automatic MTU application
🤖 Machine-readable output for Ansible / CI
📦 JSON output for automation pipelines
🧪 Fully unit-tested
📦 Installation
Option 1 — Install via pip (recommended)
pip install automtu
or editable mode for development:
pip install -e .
Option 2 — Local installation from source
git clone https://github.com/kevinveenbirkenbach/automtu.git
cd automtu
pip install -e .