Production-ready application firewall with a high-performance Rust daemon and kernel-level eBPF for <1ยตs process identification. Like a medieval bastion protecting a fortress, Bastion stands guard over your network connections, giving you complete control over outbound traffic.
Linux by default allows ALL outbound connections. Any application can connect to any server without your knowledge or permission. This is a security risk.
Bastion intercepts every outbound connection and shows you a GUI popup. You decide which applications can access the network - Allow or Deny, Once or Always.
Integrates with netfilter/iptables NFQUEUE to intercept actual packets in real-time
Kernel-level hooks capture process info at connection creation with ~<1ยตs latency - solves timing issues with short-lived connections
High-performance memory-safe daemon with eBPF + /proc fallback for maximum compatibility
Dialogs show Organization/ISP info for unknown IPs, reverse DNS hostnames, and risk levels.
Full-featured GUI with beautiful progress dialogs, instant rule reload, and pkexec integration for secure permissions
Internal rule engine prevents conflicts with system firewall; UFW handles inbound, Bastion handles outbound.
Auto-deny after 60 seconds (configurable) to prevent hanging connections
Safe testing mode that shows popups but always allows connections. Rules are automatically saved!
All decisions are saved immediately to disk, even in learning mode. No data loss on restart!
Allow or deny an application on ALL ports with a single rule - perfect for Zoom, Slack, Teams
Automatic inbound firewall via UFW integration or standalone INPUT rules - blocks unsolicited connections
No popups for local network discovery - .local hostnames just work out of the box
Guided setup with whiptail dialogs - choose mode, autostart, and start now during installation
Delete rules and they take effect immediately via SIGHUP - no restart needed!
Application tries to connect
Packet queued to NFQUEUE
Daemon identifies app
GUI shows popup
User decides
# Download the latest .deb from GitHub Releases page
# Then install with:
sudo dpkg -i bastion-firewall_*.deb
# Fix dependencies if needed
sudo apt-get install -f
# Clone the repository
git clone https://github.com/shipdocs/bastion-firewall.git
cd bastion-firewall
# Build the package
./build_deb.sh
# Install the generated .deb
sudo dpkg -i bastion-firewall_*.deb
# Fix dependencies if needed
sudo apt-get install -f
Search for "Bastion Firewall" in your application menu and click to launch. The tray icon will appear automatically.
When an app tries to connect, a popup appears showing the application name, destination, and risk level.
Choose "Allow Once", "Allow Always", or "Deny". Your decision is saved and applied instantly.
Open the Control Panel to view, edit, or delete saved rules. Monitor logs and adjust settings.
Live overview of outbound and inbound protection with real-time statistics
Manage per-application rules with allow/deny actions
View recent connection activity and daemon events
Configure learning mode, startup behavior, and UFW integration
Start protecting your Linux system with Bastion - Your Last Line of Defense.