Build bridge server on ubuntu linux

Bridge is device whose provide to connecting network with other network, bridge run in layer two or data link layer OSI, you have minimum have two nic to conecting two network

hope this article help you


Step by step

  1. install bridge package
  2. setup bridge
  3. setup ip bridge

1. install bridge package

execute this command on your terminal

"apt-get install bridge-utils"


2. setup bridge

execute
"brctl addbr br0" -> it will add new ethernet device br0
"brctl addif br0 eth0" -> add eth0 as slave device
"brctl addif br0 eth1" -> add eth1 as slave device
"ifconfig eth0 0.0.0.0 promisc" -> set eth0 as promisc mode, whose listen all network frame
"ifconfig eth1 0.0.0.0 promisc" -> set eth1 as promisc mode, whose listen all network frame

after command above execute, your linux is already server as bridge mode, you can test it with conecting with your network, if you want manage your bridge remotly you have set ip for your bridge device

3. setup ip bridge

execute
"ifconfig br0 10.10.10.252/24" >> set ip br0 with 10.10.10.252/24

you can make it permanent by fill step two and three on /etc/rc.local file

i dont create the image, i got from qwords.com