Skip to content

Report a missing UFW rule for the receiver - #88

Open
netmojo wants to merge 2 commits into
mainfrom
fix/firewall-readiness
Open

netmojo wants to merge 2 commits into
mainfrom
fix/firewall-readiness

Conversation

@netmojo

@netmojo netmojo commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Fixes the last part of #52. With UFW enforcing and no rule for the receiver, Apple devices find this computer and every connection to TCP 8771 is dropped, while omdrop doctor and the panel show nothing wrong. Thanks to @riegojerey for the report and the diagnosis.

Both stacks change, omdrop-core and the bash, as an agreed exception to the Rust-only rule: omdrop-owl runs the bash until it ships core's hooks, and this failure is silent.

  • doctor: reports a firewall item, last, when UFW is active and enforcing (ENABLED=yes; ufw.service stays active after ufw disable), drops incoming traffic by default (DEFAULT_INPUT_POLICY in /etc/default/ufw), and no allow or limit rule in /etc/ufw/user6.rules could admit TCP 8771 on awdl0. A broader rule, such as ufw allow 8771/tcp, ufw allow in on awdl0 or a port range, counts. Rule addresses aren't compared, so a rule that might match counts as one that does. Reading those files needs no root; when one can't be read, nothing is reported.
  • install-driver: adds the rule whenever UFW is active and the rule isn't known to be there, and no longer when it is. With everything else current, it opens a terminal for the rule alone; before, bash said "Nothing to do" and core re-added it every time.
  • firewall joins the plugin's reserved item IDs, so a backend's firewall item shows as backend-firewall.
  • Panel: it asked doctor only while unusable, and a machine in this state looks healthy. It now also asks each time Omdrop turns on, shows the firewall sentence while receiving, and offers "Add the firewall rule", which runs install-driver.
  • Docs: docs/radio-backend.md (item IDs) and the README's Privileges section.

Verified:

  • New tests in both stacks: the item when nothing admits the receiver; none when Omdrop's rule or a broader one is there, the default policy accepts, the files can't be read, or UFW is disabled or inactive; rules for other ports, ranges, interfaces, directions, protocols and actions don't count; install-driver with the rule absent, unknown and present.
  • On a Mac, with UFW active, both stacks against the real /etc/ufw and against a copy without the rule: no item and "Nothing to do" with the real one; the item and a firewall-only terminal (launcher stubbed) with the copy.
  • Python suite with OMDROP_IMPLEMENTATION=python: 313 tests OK. cargo test --locked --workspace: 473 passed. fmt --check, clippy, cargo +1.88 check and omarchy-plugin-validate are clean.
  • qmllint Panel.qml: the same warnings before and after. The panel change hasn't been run in a live shell.

@riegojerey, could you please test this on your T480? With UFW on, remove the rule (omdrop firewall remove); omdrop doctor should report it, and the panel should show it with its button once Omdrop is on.

doctor reports a firewall item when UFW is active and enforcing and its
rules lack the receiver's; install-driver adds the rule unless it is known
to be there; the panel asks doctor when Omdrop turns on and offers the
fix. Both stacks, as an agreed exception: omdrop-owl runs the bash.

Refs #52
@netmojo netmojo added the waiting for info Waiting on information or testing from the reporter label Oct 17, 2026
@greptile-apps

greptile-apps Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the previous false-warning finding is addressed.

Summary

Adds a UFW warning to doctor and the panel, plus a button that opens the firewall-rule installer.

  • Omdrop reports when UFW blocks its receiver.
  • install-driver adds the receiver rule only when it is needed.
  • The panel explains blocked receiving and offers a firewall button.

Reviews (2) · Last reviewed commit: "Don't report a firewall that admits the ..." · Reviewed by Greptile

Comment thread core/crates/omdrop-cli/src/driver.rs Resolved
The firewall item now needs UFW's default incoming policy to drop or reject,
and no allow or limit rule that could admit TCP 8771 on awdl0. Broader
rules, such as a port list or range, any port, or any interface, count,
and rule addresses aren't compared. Raised by Greptile on #88.
@netmojo netmojo added the waiting to merge Approved, but on hold for a reason outside the PR label Oct 18, 2026
@brentkearney brentkearney removed the waiting to merge Approved, but on hold for a reason outside the PR label Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting for info Waiting on information or testing from the reporter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Readiness reporting: nothing detects the missing receiver UFW rule, and receiver_libs_installed tests a shadowed python3

2 participants