๐Ÿฐ Your Last Line of Defense

Production-ready application firewall built for Zorin OS 18. Like a medieval bastion protecting a fortress, Bastion stands guard over your network connections, giving you the control you had on Windows.

โœ… Stable Release
v1.4.0
Major Security Audit Release
Download Stable
๐Ÿงช Pre-release
v1.4.1
GUI & Tray Improvements
View Pre-releases
Stable Release Latest Release Zorin OS 18 Security Hardened
๐Ÿ”’
Secure by Default
โšก
Real-time Protection
๐ŸŽฏ
Per-App Control

๐Ÿšจ The Problem

Linux by default allows ALL outbound connections. Any application can connect to any server without your knowledge or permission. This is a security risk.

โœ… The Solution

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.

Production-Ready Features

๐Ÿ”Œ

Real Packet Interception

Integrates with netfilter/iptables NFQUEUE to intercept actual packets in real-time

๐Ÿ”

Application Identification

Matches packets to processes via /proc filesystem for accurate app detection

โšก

Fast Decision Engine

Cached rules provide instant decisions for known connections

๐ŸŽจ

Beautiful GUI

Enhanced dialogs show hostname, port description, process info, and risk level

โš™๏ธ

Control Panel

Full-featured GUI with beautiful progress dialogs, instant rule reload, and pkexec integration for secure permissions

๐Ÿ›ก๏ธ

Decoupled Architecture

Internal rule engine prevents conflicts with system firewall; UFW handles inbound, Bastion handles outbound.

โฑ๏ธ

Timeout Protection

Auto-deny after 30 seconds (configurable) to prevent hanging connections

๐Ÿ”

Learning Mode

Safe testing mode that shows popups but always allows connections. Rules are automatically saved!

๐Ÿ’พ

Auto-Save Rules

All decisions are saved immediately to disk, even in learning mode. No data loss on restart!

๐ŸŽฏ

Interactive Installation

Guided setup with whiptail dialogs - choose mode, autostart, and start now during installation

โšก

Instant Rule Reload

Delete rules and they take effect immediately via SIGHUP - no restart needed!

Two-Process Architecture

๐Ÿ”ง Bastion Daemon (Root)

  • Intercepts packets via NetfilterQueue
  • Identifies applications via eBPF/proc
  • Checks whitelist & cached rules
  • Internal decision engine (Decoupled from UFW)
โฌ

๐Ÿ–ฅ๏ธ GUI Client (User)

  • Shows popup dialogs with DISPLAY access
  • System tray icon with menu
  • Sends decisions back to daemon
  • Control panel for management
1

Application tries to connect

โ†’
2

Packet queued to NFQUEUE

โ†’
3

Daemon identifies app

โ†’
4

GUI shows popup

โ†’
5

User decides

Quick Installation

๐Ÿ”ง Build from Source

# 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

System Requirements

OS: Zorin OS 18 (or any Debian-based distribution)
Python: 3.6 or higher
Display: X11 or Wayland
Privileges: Root/sudo access

How to Use

1๏ธโƒฃ

Start the Firewall

Search for "Bastion Firewall" in your application menu and click to launch. The tray icon will appear automatically.

2๏ธโƒฃ

See Connection Requests

When an app tries to connect, a popup appears showing the application name, destination, and risk level.

3๏ธโƒฃ

Make Your Decision

Choose "Allow Once", "Allow Always", or "Deny". Your decision is saved and applied instantly.

4๏ธโƒฃ

Manage Rules

Open the Control Panel to view, edit, or delete saved rules. Monitor logs and adjust settings.

Screenshots

System Status

System Status

Live overview of outbound and inbound protection with real-time statistics

Firewall Rules

Firewall Rules

Manage per-application rules with allow/deny actions

Connection Logs

Connection Logs

View recent connection activity and daemon events

Settings

Settings

Configure learning mode, startup behavior, and UFW integration

Documentation

Built For

๐ŸŽฏ Zorin OS 18 Ubuntu 20.04+ Debian 11+ Linux Mint 21+ Pop!_OS Elementary OS

๐Ÿฐ Ready to Defend Your System?

Start protecting your Linux system with Bastion - Your Last Line of Defense.