Turn macOS into a Gateway with Brook

Updated at: 2024-01-01

Requirements

Run Brook

On this macOS, normally start Brook in TUN mode (which is the default), or running a tun2brook is also fine.

Note that you should disable FakeDNS(The GUI defaults to having FakeDNS enabled). Because other devices do not have the route to the Fake IP, they can't communicate back, of course, you can tweak things yourself, but the I think this is a bit cumbersome and unnecessary.

Enabling Forwarding

sudo sysctl -w net.inet.ip.forwarding=1

Test

Try on other device:

Traffic Splitting

Try bypassing the IP of http3.ooo with Brook or tun2brook on the macOS gateway device 137.184.237.95/32.

Try on other device again:

curl http3.ooo -v

Discuss