How to Bridge Two Ethernet Ports on Mac OS X

Solution 1:

If you want to build a real Ethernet bridge (Layer 2 bridge) on Mac OS X, answer is, you simply can't without third-party software. That's just the way it is, there is nothing in the kernel or in userspace to do this.

The only software I know capable of doing this is IPNetRouterX, which is not free. Never tried it myself.

Solution 2:

As of Mountain Lion, you can configure bridges using ifconfig:

sudo ifconfig bridge0 create
sudo ifconfig bridge0 addm en0 addm en1
sudo ifconfig bridge0 up

See man ifconfig for more options.

It doesn't work well with wifi interfaces however due to how they handle lookups.