Help with iptables/ebtables setup!!

"Visham Ramsurrun" <[email protected]> Mon, 18 Sep 2006 12:58:36 +0400
Newsgroups gmane.linux.network.bridge.ebtables.user
Message-ID <[email protected]>
Dear Bart,

I badly need some help..

I've got three PCs A, B and C, all connected to a switch. They are all set
up as follows:

brctl addbr br0
brctl stp br0 off
brctl addif br0 eth0
ifconfig br0 0.0.0.0
ifconfig eth0 0.0.0.0 down
ifconfig br0 192.168.10.2 netmask 255.255.255.0 broadcast
192.168.10.255
//for PC_A
ifconfig br0 up
ifconfig eth0 up

The ip & mac addresses of the three PC are:

PC_A:
192.168.10.2
00:05:2d:00:a3:ce

PC_B:
192.168.10.3
00:30:f1:25:fe:44

PC_C:
192.168.10.5
00:30:f1:26:01:20

I'm trying to dnat ipv4 traffic from PC_A to PC_B via PC_C. I use the
following rule:

ebtables -t nat -A OUTPUT -p ipv4 -o eth0 -j dnat --to-dst 00:30:f1:26:01:20


I then added iptables rules on PC_C in order to filter the ipv4 traffic from
PC_A destined for PC_B, and then forward valid packets to PC_B. I used the
following iptables command:

iptables -A FORWARD -m physdev --physdev-in eth0 --physdev-out eth0 -s
192.168.10.0/24 -d 192.168.10.0/24 -p icmp -j ACCEPT

It didn't work.I then tried the folowing rule:

iptables -A FORWARD -m physdev --physdev-is-bridged -s 192.168.10.0/24 -d
192.168.10.0/24 -p icmp -j ACCEPT


I used ethereal to check the traffic. The icmp requests from PC_A go to both
PC_C and PC_B. Even when I stop ebtables and iptables and remove all the
rules, still both PC_B and PC_C get the icmp request packets, which is
unsual.

Can you pls tell me what I'm doing wrong? How can I make ebtables and
iptables work together?

Warm regards,
Visham

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

_______________________________________________
Ebtables-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ebtables-user