All of lore.kernel.org
 help / color / mirror / Atom feed
* How does iptables redirect a packet that is not addressed to its local machine
@ 2004-04-08  1:16 Grace Li
  2004-04-07 22:44 ` Nicholas E. Walker
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Grace Li @ 2004-04-08  1:16 UTC (permalink / raw)
  To: netfilter-devel

[-- Attachment #1: Type: text/plain, Size: 653 bytes --]

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


[-- Attachment #2: Type: text/html, Size: 1314 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: How does iptables redirect a packet that is not addressed to its local machine
@ 2004-04-08  1:47 wanghtb
  0 siblings, 0 replies; 7+ messages in thread
From: wanghtb @ 2004-04-08  1:47 UTC (permalink / raw)
  To: netfilter-devel; +Cc: zheyinli

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.

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

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

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

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-08  1:16 How does iptables redirect a packet that is not addressed to its local machine Grace Li
2004-04-07 22:44 ` Nicholas E. Walker
2004-04-07 23:06   ` Nicholas E. Walker
2004-04-07 22:48 ` Henrik Nordstrom
2004-04-07 23:40 ` Phil Oester
2004-04-08  5:44 ` zhi wang
  -- strict thread matches above, loose matches on Subject: below --
2004-04-08  1:47 wanghtb

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.