The only door
in a sealed wall.
When the vault shuts, the keyhole vanishes from the door along with the door itself. Thus, the perimeter turns into an impenetrable brick wall. All that remains is an autonomous HTTPS web gateway on a secret port, behind a secret path and a master password. The vault can only be opened in one way — by knocking through the web knock at the emergency gates.
Temporary door
Option B is a radical isolation perimeter where compromise is unacceptable. The complex eliminates traditional entry points by completely disabling external SSH access to the server.
Through the secret gate of the password-protected web gateway, it becomes possible to open a temporary door. This "temporary door" activates access only for the administrator's IP address and is automatically removed (purged) after the session ends.
The option is enabled in SETTINGS: SSH access: web knock. The system activates the port and opens access. The default port is 55111.
Temporary door lifecycle protocol
- Automatic cleanup: As soon as the administrator's session ends, the door is automatically removed (purged) by timeout.
- Zero legacy: After purging, no external open SSH ports remain in the system.
- Two-tier protection: System access requires two independent checks (web gateway + SSH password). This ensures that even in the event of a successful first-level breach, system control will remain inaccessible, while the complex simultaneously logs the intruder's IP address for further investigation.
IMPORTANT
ACTIVATION
The web gateway is activated only after a password has been set. Until then, all web-based features remain unavailable, even if they have been enabled.
Requirement
Option B requires Option A to be enabled. The web gateway only works with the permanent door enabled — the program interface will not allow this to be done in reverse order.
Warning
This option implements the principle of attack surface minimization, completely eliminating the possibility of using standard SSH interfaces for external access. The option is designed for highly secure environments where maximally restricted and controlled access to the system core is required, and minimizing the attack vector by eliminating permanent open entry points is critical. The mode is suitable for operation on servers where access must be exclusively controlled and strictly temporary.
Address prefix of 12 hex characters
The complex uses a unique 12-character hexadecimal address prefix generated on the first run. This key serves as the identifier for your instance. All other requests to the gateway are processed as a standard 404 response (stub). This ensures that automated scanners and bots cannot discover the service.
# unique 12-character hex prefix, generated on first start https://<SERVER_IP>:55111/a3f9c2e1b4d0/rescue # everything else → 404 stub: scanners see nothing
By default, the complex uses port 55111. In the settings section (SETTINGS), the port number can be changed to any available one. Thanks to built-in automation, the complex instantly reconfigures and ensures stable HTTPS operation on the new port without manual intervention in firewall settings.
Bruteforce trap
This set of parameters represents a comprehensive anti-bruteforce mechanism designed to actively protect the service from automated attacks and scanning. The system operates on the principle of rate limiting, artificial slowing of suspicious traffic, and temporary IP blocking after recording a critical number of failed attempts.
- 5 failed attempts lock the gateway for 60 seconds.
- Every request is artificially slowed down to 5 seconds.
- Scanner traffic is politely redirected to a search engine.
Self-signed AGL certificate
The complex uses a self-signed and completely autonomous HTTPS certificate. The modern TLS 1.2+ standard is supported using the ECDSA P-256 algorithm (valid for up to 10 years). All transmitted data, including user credentials, is encrypted with this protocol. To prevent man-in-the-middle attacks, a SHA-256 fingerprint is used for pinning. In the absence of a valid certificate, the server does not start (fail closed), ensuring maximum reliability.
UFW rules
To view UFW rules in dynamic mode, simply type 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:
[ 1] 2244/tcp ALLOW IN XXX.XX.XX.XXX # Amber Guard Lab. Private SSH Invisible Port 2244 [15] 2244/tcp ALLOW IN 127.0.0.1 # Amber Guard Lab. Localhost Core Loopback
To ensure exclusive access, the web knock rule is added to the firewall in the first position relative to all other rules.
Bcrypt at the input — marker at the output. Two-stage access opening
- The master password lives in
/etc/amberguard/config.json. The value is written as a bcrypt hash with salt. Plaintext is nowhere in settings or backups. - After password verification and validation, the IP address from which the admin performed the web knock is written to a special file — the tmpfs marker
/dev/shm/agl_proto_web_rescue/agl_proto_web_knock.ipwithO_NOFOLLOWflags and0600permissions. - Within a minute at most, the watcher reads it and adds a personal access rule to the first position in the UFW list.
# stage 1: instantly, in nanoseconds iptables -I ufw-user-input 1 -s <admin_ip> # stage 2: persistently ufw insert 1 allow from <admin_ip> to any port 2244 comment "Amber Guard Lab. Private SSH Invisible Port 2244" # marker: irrevocably wiped from /dev/shm
Thus, within a minute at most after the web knock is performed, the administrator can log into the server via an SSH connection.