-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Priority
High
Description
The firewall currently allows DNS queries (port 53) to ANY IP address, not just the configured DNS servers. This creates a data exfiltration vector.
Current behavior
host-iptables.ts:181-192allows UDP/TCP port 53 to any destination- An attacker could send data to
evil-dns-server.com:53even if that domain isn't in the allowlist - The
--dns-serversflag is documented but not enforced in the host-level filtering rules
Expected behavior
- DNS queries should only be allowed to explicitly allowlisted DNS server IPs
- Default:
8.8.8.8and8.8.4.4 - User-configurable via
--dns-serversflag
Code locations
src/host-iptables.ts:181-192- Need to restrict by destination IPsrc/host-iptables.ts:setupHostIptables()- AdddnsServersparametersrc/cli.ts- Pass DNS server IPs tosetupHostIptables()
Suggested fix
// Instead of allowing port 53 to any IP:
for (const dnsServer of dnsServers) {
await execa('iptables', [
'-t', 'filter', '-A', chainName,
'-p', 'udp', '-d', dnsServer, '--dport', '53',
'-j', 'ACCEPT',
]);
// Same for TCP
}Related documentation
CLAUDE.md:226-253documents DNS allowlisting but implementation is incomplete
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working