npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

firewall-for-humans

v1.0.1

Published

Intuitive CLI wrapper for UFW with human-readable commands, 100+ service presets, named IP groups, diagnostics, and tab completion.

Readme

💡 Why?

UFW is already "uncomplicated" — but fw makes it human:

  • Service names instead of port numbers (ssh not 22)
  • Named groups for IP ranges (cloudflare, office)
  • Comma-separated ports in one command (http,https)
  • Interactive mode for guided rule creation
  • Doctor diagnostics to find problems
  • Beautiful status with colors and rule numbers

📦 Installation

Requirements: Debian/Ubuntu with UFW. Optionally jq for group management (auto-installed).

Quick Install (recommended)

git clone https://github.com/jindrichstoklasa/firewall-for-humans.git
cd firewall-for-humans
sudo bash install.sh

Manual Install

git clone https://github.com/jindrichstoklasa/firewall-for-humans.git
cd firewall-for-humans
chmod +x fw
sudo cp fw /usr/local/bin/fw

Uninstall

sudo bash uninstall.sh

🚀 Usage

fw <command> [arguments]
sudo fw <command> [arguments]   # commands that modify rules require root

Most commands require sudo (allow, deny, limit, on, off, reset). Read-only commands like status, services, and help work without it.

Run fw help to see all available commands and options.

⚡ Quick Start

| Command | Description | |---------|-------------| | sudo fw on | Enable the firewall | | sudo fw allow ssh | Allow SSH (don't lock yourself out!) | | sudo fw allow http,https | Allow web traffic | | sudo fw limit ssh | Rate-limit SSH to prevent brute force | | fw status | Check firewall status |

📋 Commands

🖥️ Basic Rules

fw allow <port|service> [tcp|udp] [from <ip|group>] [comment <text>]
fw deny <port|service> [tcp|udp] [from <ip|group>] [comment <text>]
fw reject <port|service> [tcp|udp] [from <ip>]
fw limit <port|service> [tcp|udp]
fw remove <rule_number>
fw remove <allow|deny> <port|service>

🏷️ Service Names

Use human-readable service names anywhere you'd use a port number:

| Command | Port | |---------|-------------| | fw allow ssh | 22 | | fw allow http,https | 80,443 | | fw deny ftp | 21 | | fw allow mysql | 3306 | | fw allow postgres | 5432 | | fw allow redis | 6379 | | fw allow mongodb | 27017 |

100+ built-in services — see them all:

fw services              # list all
fw services redis        # filter by name

Categories: Web, SSH, FTP, Email, DNS, Databases, Message Queues, Monitoring, CI/CD, Containers, VPN, Remote Desktop, and more.

👥 Named Groups

Group IP ranges under memorable names:

# Create groups
fw group create office 192.168.1.0/24 10.0.0.0/24
fw group create cloudflare 173.245.48.0/20 103.21.244.0/22 103.22.200.0/22

# Use in rules
fw allow 443 from cloudflare
fw allow mysql from office

# Manage groups
fw group list
fw group show office
fw group add office 172.16.0.0/16
fw group remove office 10.0.0.0/24
fw group delete old-group

Groups are stored in ~/.config/fw/groups.json.

⚙️ Management

| Command | Description | |---------|-------------| | fw status | Pretty status table with rule numbers | | fw on | Enable firewall | | fw off | Disable firewall | | fw reset | Reset all rules (with confirmation) |

🧭 Interactive Mode

Don't remember the syntax? Let fw guide you:

fw add

Walks you through: Action → Port/Service → Protocol → Source → Comment → Confirm.

🔧 Advanced

# Test if a connection would pass
fw test 192.168.1.50 443
fw test 10.0.0.1 ssh

# View logs
fw log                      # Recent entries
fw log blocked              # Only blocked
fw log blocked --last 1h    # Last hour

# Export / Import rules
fw export                    # → fw-rules.json
fw export backup.json
fw import backup.json

# Compare with remote server
fw diff user@production-server

# Diagnose issues
fw doctor

🩺 Doctor

fw doctor checks for:

  • ✗ Firewall inactive
  • ✗ Default incoming policy set to allow
  • ! Duplicate rules
  • ! SSH open to anywhere (not limited)
  • ! Listening ports without firewall rules
  • ! Logging disabled

⌨️ Tab Completion

Bash and Zsh completions are installed automatically. Supports:

  • Command names
  • Service names
  • Protocol names (tcp/udp)
  • Group names (from your groups.json)

📁 File Structure

~/.config/fw/
  └── groups.json      # Named IP groups
/usr/local/bin/fw      # Main script
/etc/bash_completion.d/fw  # Bash completions

💻 Compatibility

| Distribution | Version | Status | |-------------|---------|--------| | Ubuntu | 20.04+ | ✅ Fully supported | | Ubuntu | 22.04+ | ✅ Fully supported | | Ubuntu | 24.04+ | ✅ Fully supported | | Debian | 11 (Bullseye) | ✅ Fully supported | | Debian | 12 (Bookworm) | ✅ Fully supported |


📄 License

This project is licensed under the MIT License — see the LICENSE file for details.