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
 

2 comments:

  1. Additional References:
    http://ebtables.sourceforge.net/br_fw_ia/br_fw_ia.html
    http://serverfault.com/questions/578695/brctl-bridge-forwarding-packets-to-promiscuous-interfaces

    ReplyDelete
  2. http://www.linuxquestions.org/questions/linux-networking-3/how-to-route-forward-packets-in-promiscuous-mode-832698/

    Read the resolution in the comment by "commers" #5 on 09-17-2010, 06:27 PM

    ReplyDelete