Network Bridging on Ubuntu

Install bridge-utils:

sudo apt-get install bridge-utils

Create a bridge device:

sudo brctl addbr br0

Add interfaces to bridge:

sudo brctl addif br0 eth0 eth1

Bring interfaces down and back up. Remember to bring up the bridge device as well:

sudo ifconfig eth0 down
sudo ifconfig eth1 down
sudo ifconfig eth0 up
sudo ifconfig eth1 up
sudo ifconfig br0 up

Finally, to enable internet as well:

ip route add default via <gateway-ip>

# If the above command fails, first run
dhclient br0