Re: Xen, ebtables and iptables problem

Grant Taylor <[email protected]> Thu, 27 Sep 2007 16:26:33 -0500
Newsgroups gmane.linux.network.bridge.ebtables.user
Organization Riverview Technologies Inc.
Message-ID <[email protected]>
On 09/27/07 15:41, Passera, Pablo R wrote:
> Yes, I have it

Ok.

> Actually, the rule in the iptables is:
> 
> iptables -t nat -A PREROUTING -i eth0 -s 192.168.1.3 -p tcp --dport 
> 80 -j REDIRECT --to-port 3128

Ok, that makes more sense.

> 10.230.40.85 is incorrect.
> 
> I am trying to redirect web pages requests generated by PC1 to the 
> port 3128 in Router2 (there is an squid there). So, the destination 
> IP would be "web page IP" and the source is 192.168.1.3

Ok, I take it you are trying to do transparent proxying for PC1 
(192.168.1.3).  Correct?

> Other thing that I've noticed is that if I drop every packet as 
> default policy in the PREROUTING chain (i.e. iptables -t nat -P 
> PREROUTING DROP), the packet is not sent. So, in some way the packet 
> is going through the PREROUTING chain, but I cannot catch it when the 
> target is REDIRECT. Does this tell you something else?

Well keep in mind that the packet really came in to the system via eth1 
and passed through the EBTables and IPTables to end up at services bound 
to eth0's IP of 192.168.1.2.  What if you take the in interface match 
out of the equation and just use the source IP, protocol, and 
destination port.

> Thanks,

No problem.



Grant. . . .

-------------------------------------------------------------------------
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/