From: Stewart Thompson Subject: RE: Doubt about DNAT Date: Tue, 10 Sep 2002 13:27:39 -0700 Sender: netfilter-admin@lists.netfilter.org Message-ID: References: <009d01c258d4$aadbfc90$0100a8c0@desktop> Reply-To: stewart.thompson@shaw.ca Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="Boundary_(ID_VO5l4Wm0rWt4xIOISR224A)" Return-path: In-reply-to: <009d01c258d4$aadbfc90$0100a8c0@desktop> Errors-To: netfilter-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: To: Rodrigo Leme de Mello , netfilter@lists.samba.org This is a multi-part message in MIME format. --Boundary_(ID_VO5l4Wm0rWt4xIOISR224A) Content-type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Rodrigo: Do you have a Forward rule to match the Prerouting rule? Is your SQL server on the Internal Net expecting connections on Port 1433? Stu=85=85=85 -----Original Message----- From: netfilter-admin@lists.netfilter.org [mailto:netfilter-admin@lists.netfilter.org]On Behalf Of Rodrigo Leme de Mello Sent: September 10, 2002 7:17 AM To: netfilter@lists.samba.org Subject: Doubt about DNAT Hi all, I am in trouble to do a rule. Anybody can help me? I want to redirect all traffic from a specific valid ip and specific destination port to a machine located inside a LAN. This rule is to access SQL Server that is located inside a LAN and i have a valid ip address in a linux machine with iptables. I've tried the following: Lan IP with SQL Server: 192.168.0.10 Valid IP with iptables: 200.221.98.123 Valid IP that will acess SQL Server. 200.206.123.112 This rule i've put in the machine 200.221.98.123 iptables -t nat -A PREROUTING -p tcp -s 200.206.123.112 --dport 1433 -j DNAT --to 192.168.0.10 And now i configure my SQL Server to connect to 200.221.98.123 but i still can't connect. Dou you have any idea why it is not working? The ip's i've mentioned are just for example. Thanks a lot Rodrigo --Boundary_(ID_VO5l4Wm0rWt4xIOISR224A) Content-type: text/html; charset=iso-8859-1 Content-transfer-encoding: 7BIT

Hi Rodrigo:

 

            Do you have a Forward rule to match the Prerouting rule?

Is your SQL server on the Internal Net expecting connections on

Port 1433?

 

Stu………

 

 

-----Original Message-----
From: netfilter-admin@lists.netfilter.org [mailto:netfilter-admin@lists.netfilter.org]On Behalf Of Rodrigo Leme de Mello
Sent: September 10, 2002 7:17 AM
To: netfilter@lists.samba.org
Subject: Doubt about DNAT

 

Hi all,

 

I am in trouble to do a rule. Anybody can help me?

 

I want to redirect all traffic from a specific valid ip and specific destination port to a machine located inside a LAN.

 

This rule is to access SQL Server that is located inside a LAN and i have a valid ip address in a linux machine with iptables.

 

I've tried the following:

 

Lan IP with SQL Server: 192.168.0.10

Valid IP with iptables: 200.221.98.123

Valid IP that will acess SQL Server. 200.206.123.112

 

This rule i've put in the machine 200.221.98.123

 

iptables -t nat -A PREROUTING -p tcp -s 200.206.123.112 --dport 1433 -j DNAT --to 192.168.0.10

 

And now i configure my SQL Server to connect to 200.221.98.123 but i still can't connect. Dou you have any idea why it is not working?

 

The ip's i've mentioned are just for example.

 

Thanks a lot

 

Rodrigo

 

 

 

 

 

 

--Boundary_(ID_VO5l4Wm0rWt4xIOISR224A)--