Turn Linux into a Gateway with Brook

Updated at: 2024-01-01

Requirements

Run Brook

On this Linux, normally start Brook in TUN mode (The GUI defaults to TUN mode), 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.ipv4.ip_forward=1

Test

Try on other device:

Traffic Splitting

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

Try on other device again:

curl http3.ooo -v

Discuss