From: "Grace Li" Subject: How does iptables redirect a packet that is not addressed to its local machine Date: Wed, 7 Apr 2004 18:16:07 -0700 Sender: netfilter-devel-admin@lists.netfilter.org Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0033_01C41CCC.655E6E10" Return-path: To: 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 This is a multi-part message in MIME format. ------=_NextPart_000_0033_01C41CCC.655E6E10 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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 ------=_NextPart_000_0033_01C41CCC.655E6E10 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
 
I am just wondering if anybody could = explain what=20 happened in the following experiments:
 
Client (192.168.1.134) tries to connect to port 1888 of=20 Server
(192.168.1.115) through Gateway (192.168.1.1).  In the = Gateway,=20 the iptables
has been instructed to redirect traffic on port 1888 to = 2000=20 (iptables -t
nat -A PREROUTING -i eth0 -p tcp --dport 1888 -j = REDIRECT=20 -to-port 2000 ).

The results of my experiments is that the = application on=20 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=20 iptables do anything
here?
 
Many thanks,
 
Grace

------=_NextPart_000_0033_01C41CCC.655E6E10--