From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Grace Li" Subject: Re: How does iptables redirect a packet that is not addressed to its local machi Date: Thu, 08 Apr 2004 10:55:57 -0400 Sender: netfilter-devel-admin@lists.netfilter.org Message-ID: Mime-Version: 1.0 Content-Type: text/plain; format=flowed Return-path: To: wanghtb@legend.com.cn, netfilter-devel@lists.netfilter.org Errors-To: netfilter-devel-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: List-Id: netfilter-devel.vger.kernel.org Yes, Client and Server are in the same network! I used the Ethereal tool, which is similiar to but better than tcpdump. On Client, Server and Gateway, I could all always see that packets are sending back and forth from Server and Client. There is no sign that Gateway receives packets on port 1888 or 2000. Thanks, Grace >From: wanghtb@legend.com.cn >To: netfilter-devel@lists.netfilter.org >CC: zheyinli@hotmail.com >Subject: Re: How does iptables redirect a packet that is not addressed to >its local machine >Date: Thu, 8 Apr 2004 09:47:15 +0800 > >Hi, I wonder if the Client and the Server are in the same network, >under which the Gateway will send a ICMP Redirect message to >make the Client access Server directly. version is iptables > >Please check netmask of the Machines and use tcpdump packet in the >Gateway to see what happens:-) > > >Hi, > > > >I am just wondering if anybody could explain what happened in the = > >following experiments: > > >Client (192.168.1.134) tries to connect to port 1888 of Server > >(192.168.1.115) through Gateway (192.168.1.1). In the Gateway, the = > >iptables > >has been instructed to redirect traffic on port 1888 to 2000 (iptables = > >-t > >nat -A PREROUTING -i eth0 -p tcp --dport 1888 -j REDIRECT -to-port 2000 = > >). > > > >The results of my experiments is that the application on Gateway who = > >listens > >to port 2000 could not get anything, while Server receives everything > >expected on its port 1888. So my question is that did iptables do = > >anything > >here? > > > >Many thanks, > > > >Grace > _________________________________________________________________ STOP MORE SPAM with the MSN Premium and get 2 months FREE* http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines