slim start breaks Apple Container (vmnet) networking by enabling macOS packet filter
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- go, macos
- Domain
- networking, operating-systems
Research direction
Start by tracing the macOS behavior of slim start, focusing on how it modifies /etc/pf.conf, loads /etc/pf.anchors/com.slim, and invokes pfctl. Reproduce the failure with the listed Apple Container networking commands, then verify that Slim's redirects work without breaking the 192.168.64.0/24 network and that stopping Slim restores normal behavior.
Written by the indexing model from the issue text.
Description
Description
Love the idea of this, but ran into a brick wall.
Running slim start completely breaks networking for all Apple Containers. Containers lose the ability to reach the internet, the gateway (192.168.64.1), and any external host. API calls from inside containers time out with no error, just silence.
Root cause:
Slim adds its redirect anchor to /etc/pf.conf:
rdr-anchor "com.slim"
load anchor "com.slim" from "/etc/pf.anchors/com.slim"
The anchor itself is benign as the loopback-only redirects:
rdr pass on lo0 inet proto tcp from any to 127.0.0.1 port 80 -> 127.0.0.1 port 10080
rdr pass on lo0 inet proto tcp from any to 127.0.0.1 port 443 -> 127.0.0.1 port 10443
The problem is that slim start runs pfctl -e -f /etc/pf.conf, which loads the entire ruleset, including:
scrub-anchor "com.apple/*"
nat-anchor "com.apple/*"
rdr-anchor "com.apple/*"
These Apple anchors are designed to be loaded on-demand by Apple's own services (the comment in pf.conf says "each component which utilizes PF is responsible for enabling and disabling PF via -E and -X").
When Slim force-enables pf and reloads the full ruleset, it interferes with Apple Container's vmnet NAT layer on the 192.168.64.0/24 subnet. The result is that all container network traffic is silently dropped.
Steps to Reproduce
- Start an Apple Container with network access:
container run --net=bridged alpine sh -c "apk add curl && curl -s https://1.1.1.1" - This succeeds.
- Run
slim starton any domain (e.g.slim start myapp --port 3000). - Run the same container command again and it now hangs indefinitely. Even
ping 192.168.64.1(the vmnet gateway) fails from inside the container. slim stopalone does not fix it. You must also run:
sudo pfctl -d
container system stop && container system start- Then containers work again.
- Running
slim startagain immediately re-breaks container networking. Confirmed this cycle multiple times.
Expected Behavior
Slim's loopback redirect rules should not affect networking on other interfaces. Slim should either:
- Load only its own anchor instead of reloading the entire
/etc/pf.confruleset. Something like:pfctl -a com.slim -f /etc/pf.anchors/com.slim - This would activate Slim's rules without touching the Apple anchors or enabling the global packet filter.
- Use
-E/-Xreference counting as Apple's pf.conf comments recommend, rather thanpfctl -ewhich force-enables the entire filter. - Document the incompatibility with Apple Container / vmnet networking if a fix isn't feasible.
Actual Behavior
Running slim start completely breaks networking for all Apple Containers. Containers lose the ability to reach the internet, the gateway (192.168.64.1), and any external host. API calls from inside containers time out with no error, just silence.
Slim Version
0.8.0
Operating System
macOS
Configuration
Logs
- Dominant language
- Go
- Stars
- 2.2k
- Forks
- 139
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nilbuild/slim
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
tcp supportOpenenhancement
Difficulty 5/5 Over a week Newbie friendliness 30/100
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
JuliusBrussee/caveman#1567 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
[DOC] API documentation link is broken on the databricks_workspace_binding registry pagePossibly taken @akhil9tiet claimed this today. Opendocs
Difficulty 1/5 Under an hour Newbie friendliness 82/100
databricks/terraform-provider-databricks#6276 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
topic: code type: enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
arduino/arduino-cli#3368 ·
Maintainers usually reply within 1 day