Sunday, December 1, 2013

Linux Bridge

file: ifcfg-br0


DEVICE=br0
TYPE=Bridge
IPADDR=10.1.0.58
NETMASK=255.255.255.0
ONBOOT=yes
BOOTPROTO=none
file: ifcfg-eth1
DEVICE=eth1
TYPE=Ethernet
HWADDR=00:11:25:6E:E3:43
ONBOOT=yes
BOOTPROTO=none
BRIDGE=br0
file: ifcfg-eth2
DEVICE=eth2
TYPE=Ethernet
NM_CONTROLLED=no
ONBOOT=yes
BOOTPROTO=none
BRIDGE=br0
ebtables:
ebtables -t broute -A BROUTING -p 8847 -j redirect --redirect-target ACCEPT
ebtables -t broute -A BROUTING -p IPv4 --ip-protocol 6  --ip-destination-port 80 -j redirect --redirect-target ACCEPT
 sysctl.conf
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-arptables = 1