You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -116,8 +116,21 @@ sudo awf \
116
116
### What This Protects Against
117
117
- Unauthorized egress to non-whitelisted domains
118
118
- Data exfiltration via HTTP/HTTPS
119
+
- DNS-based data exfiltration to unauthorized DNS servers
119
120
- MCP servers accessing unexpected endpoints
120
121
122
+
### DNS Server Restriction
123
+
124
+
DNS traffic is restricted to trusted servers only (default: Google DNS 8.8.8.8, 8.8.4.4). This prevents DNS-based data exfiltration attacks where an attacker encodes data in DNS queries to a malicious DNS server.
Copy file name to clipboardExpand all lines: docs-site/src/content/docs/reference/cli-reference.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,7 @@ awf [options] -- <command>
32
32
|`--env-all`| flag |`false`| Pass all host environment variables |
33
33
|`-v, --mount <host:container[:mode]>`| string |`[]`| Volume mount (repeatable) |
34
34
|`--container-workdir <dir>`| string | User home | Working directory inside container |
35
+
|`--dns-servers <servers>`| string |`8.8.8.8,8.8.4.4`| Trusted DNS servers (comma-separated) |
35
36
|`-V, --version`| flag | — | Display version |
36
37
|`-h, --help`| flag | — | Display help |
37
38
@@ -130,6 +131,22 @@ Mount host directories into container. Format: `host_path:container_path[:ro|rw]
130
131
131
132
Working directory inside the container.
132
133
134
+
### `--dns-servers <servers>`
135
+
136
+
Comma-separated list of trusted DNS servers. DNS traffic is **only** allowed to these servers, preventing DNS-based data exfiltration. Both IPv4 and IPv6 addresses are supported.
137
+
138
+
```bash
139
+
# Use Cloudflare DNS
140
+
--dns-servers 1.1.1.1,1.0.0.1
141
+
142
+
# Use Google DNS with IPv6
143
+
--dns-servers 8.8.8.8,2001:4860:4860::8888
144
+
```
145
+
146
+
:::note
147
+
Docker's embedded DNS (127.0.0.11) is always allowed for container name resolution, regardless of this setting.
Copy file name to clipboardExpand all lines: docs-site/src/content/docs/reference/security-architecture.md
+18-13Lines changed: 18 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ This firewall solves a specific problem: **egress control for AI agents running
22
22
23
23
-**Full filesystem access**: Agents read and write files freely. If your threat model requires filesystem isolation, you need additional controls.
24
24
-**Localhost communication**: Required for stdio-based MCP servers running alongside the agent.
25
-
-**DNS resolution**: Agents can resolve any domain (though they can't connect to most).
25
+
-**DNS to trusted servers only**: DNS queries are restricted to configured DNS servers (default: Google DNS). This prevents DNS-based data exfiltration to attacker-controlled DNS servers.
26
26
-**Docker socket access**: The agent can spawn containers—we intercept and constrain them, but the capability exists.
27
27
28
28
---
@@ -157,12 +157,13 @@ The agent and its MCP servers see normal Docker behavior; they don't know their
157
157
Even with docker-wrapper, we don't fully trust it—an agent could theoretically find the real Docker binary or exploit a wrapper bug. The DOCKER-USER chain provides a backstop:
158
158
159
159
```bash
160
-
# Simplified rules (actual implementation in src/docker-manager.ts)
160
+
# Simplified rules (actual implementation in src/host-iptables.ts)
**Mitigation:** We allow DNS (UDP/53) because blocking it breaks everything. DNS tunneling is a known limitation. For high-security environments, consider:
236
-
- Using a DNS proxy that filters by domain
237
-
- Restricting DNS to specific resolvers
238
-
- Monitoring DNS query logs for anomalies
236
+
**Mitigation:** DNS traffic is restricted to trusted DNS servers only (configurable via `--dns-servers`, default: Google DNS 8.8.8.8, 8.8.4.4). Attempts to query arbitrary DNS servers are blocked at the iptables level.
239
237
240
-
This is outside our current scope but worth noting for threat models that include sophisticated attackers.
238
+
```bash
239
+
# The attacker's query to a rogue DNS server is blocked
DNS tunneling through the *allowed* DNS servers (encoding data in query names to attacker-controlled domains) is still theoretically possible, as the trusted DNS server will recursively resolve any domain. For high-security environments, consider using a DNS filtering service or monitoring DNS query logs for anomalies.
0 commit comments