Skip to content
← Back to the app

How to use Firewall Manager

Firewall Manager

Connect DigitalOcean, open temporary SSH access for your IP, close it and use the companion CLI.

Free to read. You can explore the guide before buying the app.

On this page

Install and connect

Firewall Manager needs macOS 14 or later, on Apple silicon or Intel. After purchasing, connect GitHub in Polar and accept the invitation. Download the ZIP from the private Firewall Manager releases, unzip it, and move the app to Applications. Open the signed and notarized app and confirm the normal first-launch prompt.

Keep the app in a stable location before opening access. Its cleanup job needs to find the bundled executable later.

Create a DigitalOcean custom API token with these permissions:

  • account:read
  • droplet:read
  • firewall:read
  • firewall:update

Paste it into the connection screen and click Connect DigitalOcean. If you already use doctl, Use doctl login imports its default context. The app stores the token in macOS Keychain. You do not need doctl for ordinary use.

Prepare one firewall

Temporary access requires a dedicated DigitalOcean firewall attached to one Droplet. It must have no tag attachments, and that Droplet must have no additional attached firewalls. The app checks this before opening access.

Select the firewall for your server. If it already allows SSH, review those rules first. Close existing SSH access… asks you to confirm removal of existing rules for exactly port 22. Rules with wider port ranges need manual review.

Do this while you have another way to recover access, such as the provider console. An SSH connection already established may remain alive after a firewall rule closes; check new connections when verifying the result.

Open SSH for a maintenance session

Suppose you want to update a server and allow 15 minutes for the work:

  1. Select its firewall.
  2. Choose 15 minutes.
  3. Click Open SSH.
  4. Use your normal SSH command in Terminal.
  5. When finished, click Close now and check the firewall status.

The app allows only your current public IPv4 address. It shows the remaining time. Choose 5, 15, 30 or 60 minutes for other sessions. HTTP, HTTPS, outbound rules and attachments are left alone.

A per-user background job retries expired access every 15 seconds, even after you close the app. It starts again at login. Expiry depends on your Mac: sleep, shutdown, lost internet, a revoked token or removing the app can delay cleanup. This version has no server-side timer. Close access explicitly when the work is finished.

Install the CLI

Open Settings and choose Install Companion CLI. This creates a link in ~/.local/bin; put that folder on your PATH if it is not there already.

The app and CLI share the Keychain token and local access records. Start by listing firewalls and checking tracked sessions:

firewall-manager list
firewall-manager status

Copy the firewall’s UUID from list. Replace FIREWALL_ID in these commands with that value:

firewall-manager open FIREWALL_ID --minutes 15
firewall-manager close FIREWALL_ID

For a command that should close its temporary rule when it exits, use run. Replace the server address and username with your own:

firewall-manager run FIREWALL_ID -- ssh [email protected] uptime

run also closes at its lease deadline. Closing a rule blocks new connections; it does not guarantee that an established SSH session disconnects.

firewall-manager auth --from-doctl default imports a saved doctl login. Tokens passed directly to CLI authentication are accepted through stdin, never as command arguments. firewall-manager capabilities --json gives coding agents the command manifest.

Recovery and troubleshooting

Use one access manager at a time for a firewall. Other scripts do not share these recovery records.

If the app says Close overdue · retrying, restore internet access and check the token. Settings lets you update an expired token without discarding tracked access. The replacement token must see every firewall with an outstanding session. Close tracked access before disconnecting DigitalOcean.

The records live in ~/Library/Application Support/Firewall Manager/leases.json. They contain IP addresses and deadlines, without tokens. Do not delete them to dismiss an error: the cleanup job uses them to recover failed requests.

If you move the app, reinstall the CLI link. Opening access once from its new location updates the cleanup job’s executable path. Download updates manually from Releases and replace the app after closing temporary access.