Skip to content

Setup: let in addresses from other networks (--allow-from), 1.4.0 - #2

Merged
usermaneGermane merged 1 commit into
mainfrom
allow-from
Oct 8, 2026
Merged

usermaneGermane merged 1 commit into
mainfrom
allow-from

Conversation

@usermaneGermane

Copy link
Copy Markdown
Owner

The setup's firewall rule covered only the networks this machine is on. A PC elsewhere (172.17.17.2 talking to the Ubuntu server on 10.10.10.3) needed a ufw rule typed by hand, and a port change left that rule on the old port.

What changes

  • setup asks a third question, "Also let in [none]:". It takes addresses or networks, comma-separated; Enter keeps the current ones and - clears them. Scripts use --allow-from ADDRESS, which can be repeated; none clears.
  • The addresses are saved in sync.env as PASSMAN_ALLOW_FROM. The server ignores this key.
  • Linux (ufw on): the setup adds, moves and removes their rules along with the network rules. Changing only the extra addresses touches the firewall but does not restart the service.
  • Windows: the addresses join the one inbound rule (-RemoteAddress 'LocalSubnet','172.17.17.2'). setup --keep on upgrade keeps them.
  • The question is skipped when flags set the address or port, with --keep, and for this-machine-only.
  • Refused: /0 ("everyone"), IPv6, and anything that is not an address. A single address is stored without /32, so it matches a rule typed by hand.
  • The menu item is renamed "Change network, port or allowed addresses". README updated. Version 1.4.0.

Tests

  • New tests cover the question, the flag, the ufw rules (add, move on a port change, delete on none, no restart), the Windows rule and keeping the addresses on upgrade. Existing setup tests now answer the third question.
  • Mutation-checked: dropping the allow-change trigger, the /0 refusal or the extras from the ufw sources each fails tests.
  • The Windows -RemoteAddress list was checked with New-NetFirewallRule -WhatIf only (a dry run).
  • passman_setup.py is byte-identical in PassMan-Server-Linux and PassMan-Server-Windows.

🤖 Generated with Claude Code

https://claude.ai/code/session_0112U7feygA25aiK8LrArXZB

….4.0

The firewall rule only covered the networks this machine is on, so a PC
behind a router or on another VPN needed a ufw rule typed by hand, which a
later port change left behind. The setup now asks for such addresses (or
takes --allow-from), saves them in sync.env as PASSMAN_ALLOW_FROM, and
manages their rules with the others: added, moved on a port change, removed
with --allow-from none. Changing only them touches the firewall, never the
service. On Windows they join the one inbound rule; upgrades keep them.

passman_setup.py stays byte-identical in both server repos.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0112U7feygA25aiK8LrArXZB
@usermaneGermane
usermaneGermane merged commit 9783ffb into main Oct 8, 2026
3 checks passed
@usermaneGermane
usermaneGermane deleted the allow-from branch November 8, 2026 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant