All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: How does iptables redirect a packet that is not addressed to its local machi
@ 2004-04-08 14:55 Grace Li
  2004-04-08 15:01 ` Chris Wilson
  2004-04-08 17:08 ` Henrik Nordstrom
  0 siblings, 2 replies; 6+ messages in thread
From: Grace Li @ 2004-04-08 14:55 UTC (permalink / raw)
  To: wanghtb, netfilter-devel

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

^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: How does iptables redirect a packet that is not addressed to its local machi
@ 2004-04-08 14:58 Grace Li
  0 siblings, 0 replies; 6+ messages in thread
From: Grace Li @ 2004-04-08 14:58 UTC (permalink / raw)
  To: netfilter-devel




>From: Phil Oester <kernel@linuxace.com>
>To: Grace Li <zheyinli@hotmail.com>
>CC: netfilter-devel@lists.netfilter.org
>Subject: Re: How does iptables redirect a packet that is not addressed to 
>its local machine
>Date: Wed, 7 Apr 2004 16:40:58 -0700
>
>Perhaps you haven't added a corresponding rule to the INPUT table
>to actually allow port 2000 to the gateway?
>
>Phil
>
>On Wed, Apr 07, 2004 at 06:16:07PM -0700, Grace Li wrote:
> > 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
> >

_________________________________________________________________
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines

^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: How does iptables redirect a packet that is not addressed to its local machi
@ 2004-04-08 15:13 Grace Li
  2004-04-08 17:01 ` Henrik Nordstrom
  0 siblings, 1 reply; 6+ messages in thread
From: Grace Li @ 2004-04-08 15:13 UTC (permalink / raw)
  To: hno; +Cc: netfilter-devel

[root@localhost grace]# iptables-save -t nat
# Generated by iptables-save v1.2.7a on Thu Apr  8 11:07:44 2004
*nat
:PREROUTING ACCEPT [1:229]
:POSTROUTING ACCEPT [4:240]
:OUTPUT ACCEPT [4:240]
-A PREROUTING -i eth0 -p tcp -m tcp --dport 1888 -j REDIRECT --to-ports 2000
COMMIT


>From: Henrik Nordstrom <hno@marasystems.com>
>To: Grace Li <zheyinli@hotmail.com>
>CC: netfilter-devel@lists.netfilter.org
>Subject: Re: How does iptables redirect a packet that is not addressed to 
>its local machine
>Date: Thu, 8 Apr 2004 00:48:33 +0200 (CEST)
>
>On Wed, 7 Apr 2004, Grace Li wrote:
>
> > 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 
>).
>
>Works here...
>
>
> > 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?
>
>No idea. This is a kind of thing which has always worked for me, but you
>are the second person in a few days reporting this is not working..
>
>Exacly what kernel and iptables version are you using on the gateway?
>
>What does "iptables-save -t nat" give?
>
>Regards
>Henrik
>

_________________________________________________________________
Add photos to your e-mail with MSN Premium. 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-04-08 17:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-08 14:55 How does iptables redirect a packet that is not addressed to its local machi Grace Li
2004-04-08 15:01 ` Chris Wilson
2004-04-08 17:08 ` Henrik Nordstrom
  -- strict thread matches above, loose matches on Subject: below --
2004-04-08 14:58 Grace Li
2004-04-08 15:13 Grace Li
2004-04-08 17:01 ` Henrik Nordstrom

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.