Simplify security model: remove DNS exceptions, force all traffic through Squid #401
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The firewall mixed domain-based allowlisting (Squid ACLs) with IP-based exceptions (DNS to any IP on port 53, Squid IP, Docker DNS), creating bypass opportunities and audit complexity.
New Security Model
Before:
After:
ALLOW: localhost (127.0.0.0/8) - stdio MCP serversALLOW: Squid proxy (172.30.0.10) - single egress pointREJECT: Everything elsedns_nameservers 8.8.8.8 8.8.4.4)Changes
CLI & Configuration
--dns-serversoption from CLIdnsServersfromWrapperConfigtypeparseDnsServers,isValidIPv4,isValidIPv6)Host-Level Firewall (
host-iptables.ts)setupIpv6Chain,isIp6tablesAvailable,CHAIN_NAME_V6)setupHostIptables()signature - no DNS parameterContainer Firewall (
setup-iptables.sh)AWF_DNS_SERVERSenvironment variable handlingContainer Configuration
dns:config from Docker Compose/etc/resolv.confmanipulation inentrypoint.shAWF_DNS_SERVERSenv var from agent containerTests
dns-servers.test.tsto verify DNS resolution through Squidhost-iptables.test.tsfor new signatureImpact
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.