Geometry of defense lines.
Managed entry points.
From unconditional access to temporary and subsequently vanishing doors. Each defense line has a purpose, a trigger, and an access concealment protocol. Predictability is more important than unconditional silence.
Defense lines overview
- Internal access — local loop (unconditional, lives throughout the entire relocation). Unconditional emergency gateway
127.0.0.1. Established for the entire duration of the castling, independent of protections, and not removed until reverse castling. - Unconditional external access (standard) — open external arbitrary port. Mirror of the port 22 rule (
allow/limit/reject) on the new port. Exists only when protections A and B are disabled; when they are enabled, the rule is automatically removed and restored upon disabling both. - External access (Option A) — Permanent door exclusively for the administrator's IP address. Whitelist only for the admin's IP. Created consciously when the option is enabled.
- External access (Option B) — Temporary door created via the web gateway (web knock). Requires Option A to be enabled. Temporary doors are created by knocking on the web gateway and vanish upon administrator idle timeout. After purging, access (the bridge) is possible only through a new knock. Requires Option A to be enabled.
- External access (ANTIDDOS) — A separate option that applies a
LIMITto the port, overlaying any of the above defense lines. Coexists with protection, throttling everyone not in the doors. Conserves server RAM under attack. Requires removal before relocation to a non-standard port.
Internal access
Internal access is always operational. During port relocation, a local loop rule for 127.0.0.1 is created with the signature "Amber Guard Lab. Localhost Core Loopback". It is established during the MOVE_PORT operation, before any doors begin to close, and remains active for the entire duration of the relocation. The server console remains accessible from within the host.
The local loop rule remains inviolable even if the Idle Watcher triggers during rule purging. Removal occurs only during reverse castling, with a return to the factory perimeter.
To view UFW rules in dynamic mode, simply enter the following command in the terminal:
watch -n 2 'ufw status numbered | grep -E "2244"'
Next, the terminal will display all rules related to the specific port. If the rules are changed, the list will update dynamically:
2244/tcp ALLOW IN 127.0.0.1 # Amber Guard Lab. Localhost Core Loopback
This node is completely isolated from the public network, and external detection of this address is technically impossible. All other requests are processed as 404.
Permanent door
The permanent door opens exclusively for the administrator's IP address. The admin enables the SSH access: admin IP only option in SETTINGS — the system creates an ALLOW rule with the signature "Amber Guard Lab. Master Admin Anti-Lockout".
How the declarative model works
- The admin explicitly toggles the switch — the system executes
- The IP is read from the current SSH session (
SSH_CONNECTION) - If the IP changes — the old door is removed, and a new one is created automatically
- Disabling the option removes the rule
Principle of least privilege: the system does exactly what the admin intends, and nothing more. No "auto-detection" without the admin's knowledge — if the option is disabled, the door is not created, even if the admin is inside the server.
Temporary door
The temporary door opens only via web knock through the secret gate of the password-protected web gateway.
More details about this option can be found in the dedicated Web Gateway section.
Choosing Option B must be a conscious decision.
Option B completely eliminates the ability to log into the server using standard SSH tools.
Option B requires Option A to be enabled. The web gateway operates only when the permanent door is enabled. The program interface will not allow this to be done in any other order.
Doors without duplicates
Every temporary door created via web knock has a single owner. All of them vanish (are purged) after the session of the last present administrator ends. Details are in the Idle Watcher section.
Declarative principle
The complex never creates rules without the explicit intent of the admin. If the address cannot be determined (for example, the admin logged in via console or VNC), the system logs a warning and leaves a pending marker. The IP address will be recorded in the system upon the next login via SSH or web knock.
Two synchronization paths
- Explicit path (saving in SETTINGS): full convergence, including door creation
- Automatic path (entering TUI): safe side only (removal when options are disabled)
Upon entering the TUI, the system checks the state but does not create doors: this is the automatic path, the safe side. Door creation occurs only when saving SETTINGS (explicit path, intent confirmed by the toggle). Admin inside the server — door is not created (redundant). Admin outside, option enabled — door is created (guarantee of future access).