997 B
997 B
Tool Gateway enforcement — reference agent
Дата: 2026-11-29.
Что сделано
- создан системный пользователь
agent-gw(UID 999); - его единственный разрешённый TCP egress —
127.0.0.1:9137; - DNS UDP 53 разрешён;
- остальное —
REJECT; - агент запускается как
agent-gwи ходит только через Tool Gateway.
Проверка
runuser -u agent-gw -- python3 /opt/agent-gw/agent.py
gateway_agent_ok catalog.read 6884
runuser -u agent-gw -- curl http://127.0.0.1:9120/catalog
connect failed / direct=000
Ограничение
Это enforcement для reference-агента.
Production-агенты (hub-bots, hub-agents) ещё не переведены; Gate G5 не закрыт.
Откат
iptables -D OUTPUT -m owner --uid-owner 999 -j AGENT_GW_OUT
iptables -F AGENT_GW_OUT
iptables -X AGENT_GW_OUT
userdel agent-gw