Xen, ebtables and iptables problem
"Passera, Pablo R" <[email protected]> Thu, 27 Sep 2007 09:04:39 -0700
| Newsgroups | gmane.linux.network.bridge.ebtables.user |
|---|---|
| Message-ID | <693C77BB4547254F8298DD853359C44A085522@FMSMSX420> |
Hi all,
I have the following network configuration
Dom0
---------------------------
| Router2 192.168.1.2 |
| 00:16:41:55:A5:8C |
| eth0 |
_________ | | |
/ \ | |-----------|------| |
192.168.1.1 | Network | | | vif0.0 | |
Router1 -----| |-------| peth0 | | Dom1
\_________/ | | vif1.0------eth1
PC1
| |__________________| |
192.168.1.3
| Xenbr0 bridge |
AA:00:00:50:02:F0
---------------------------
00:00:0C:07:AC:28
PC1 default gateway is router1. The idea is to route PC1 packets through
router1 without modifying PC1 network configuration and maintaining the
bridged configuration also.
I have configured ebtables to redirect only http packets coming from
eth1 to eth0
ebtables -t nat -A PREROUTING -i vif1.0 -p ipv4 --ip-protocol 6
--ip-destination-port 80 -j dnat --to-destination 00:16:41:55:A5:8C
Then I put the following iptables rule to redirect the packet to a squid
iptables -t nat -A PREROUTING -i eth0 -s 10.230.40.85 -p tcp --dport 80
-j REDIRECT --to-port 3128
I am seeing the packet coming to eth0 interface with eth0 MAC address
and then the packet going out from eth0 with the router1 MAC address, so
I suppose that router2 is routing the packet. However, the iptables rule
is not working; the packet is not being redirected to port 3128.
Does anyone know why this is happening? Since the packet is being routed
then it should go through the PREROUTING chain, doesn't it?
Thanks in advance,
Pablo
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/