| 85 |
85 |
|
console goes through. It needs no root, and wiki `alloy-privilege` is the table
|
| 86 |
86 |
|
it checks against.
|
| 87 |
87 |
|
|
|
88 |
+ |
## Checking the firewall
|
|
89 |
+ |
|
|
90 |
+ |
The one thing a container build cannot answer, and it needs the guest to be
|
|
91 |
+ |
reachable from outside. User-mode networking gives the guest no inbound path
|
|
92 |
+ |
except a `hostfwd`, so a port the host simply cannot reach proves nothing:
|
|
93 |
+ |
`run-vm.sh` forwards :2223 to guest :5555 for exactly this, next to ssh on
|
|
94 |
+ |
:2222. Override the host side with `PROBE_PORT=` if 2223 is taken.
|
|
95 |
+ |
|
|
96 |
+ |
Listen inside the guest, then knock from the host:
|
|
97 |
+ |
|
|
98 |
+ |
python3 serial.py 'socat TCP-LISTEN:5555,reuseaddr,fork EXEC:/bin/echo &'
|
|
99 |
+ |
python3 -c 'import socket;s=socket.socket();s.settimeout(6);s.connect(("127.0.0.1",2223));print(s.recv(64))'
|
|
100 |
+ |
|
|
101 |
+ |
**A blocked port reads as a timeout, not as a refusal.** qemu accepts the host
|
|
102 |
+ |
side of a forward before it knows what the guest will do, so the connect always
|
|
103 |
+ |
succeeds and the drop shows up as silence. Read the data, never the connect.
|
|
104 |
+ |
|
|
105 |
+ |
**Prove the silence is the firewall, or it proves nothing.** A listener that was
|
|
106 |
+ |
not running looks identical. Open the port, knock again, close it:
|
|
107 |
+ |
|
|
108 |
+ |
python3 serial.py 'firewall-cmd --add-port=5555/tcp' # data arrives
|
|
109 |
+ |
python3 serial.py 'firewall-cmd --remove-port=5555/tcp' # silence returns
|
|
110 |
+ |
|
|
111 |
+ |
On a server-profile medium the live ISO and the machine it installs differ by
|
|
112 |
+ |
one service on purpose: `alloy-installer-firewall.service` adds mdns at runtime
|
|
113 |
+ |
so a headless install is findable at `<name>.local`, and the installed system
|
|
114 |
+ |
must not have it. `firewall-cmd --list-services` on both is the check;
|
|
115 |
+ |
`--permanent --list-services` on the live medium shows the runtime add is not
|
|
116 |
+ |
written anywhere.
|
|
117 |
+ |
|
| 88 |
118 |
|
## What it caught
|
| 89 |
119 |
|
|
| 90 |
120 |
|
The two defects fixed in `crates/alloy/src/install.rs` on 2026-08-09: the
|