All of lore.kernel.org
 help / color / mirror / Atom feed
* Doubt about DNAT
@ 2002-09-10 14:16 Rodrigo Leme de Mello
  2002-09-10 15:05 ` Antony Stone
  2002-09-10 20:27 ` Stewart Thompson
  0 siblings, 2 replies; 5+ messages in thread
From: Rodrigo Leme de Mello @ 2002-09-10 14:16 UTC (permalink / raw)
  To: netfilter

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

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







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

^ permalink raw reply	[flat|nested] 5+ messages in thread
* RE: Doubt about DNAT
@ 2002-09-10 14:45 Rob Sterenborg
  0 siblings, 0 replies; 5+ messages in thread
From: Rob Sterenborg @ 2002-09-10 14:45 UTC (permalink / raw)
  To: netfilter

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

> 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 

I have something like :

iptables -A FORWARD -i <if_inet> -p tcp -d 192.168.0.10 --dport 1433 -j
ACCEPT
iptables -t nat -A PREROUTING -i <if_inet> -p tcp -s 200.206.123.112 -d
200.221.98.123 --dport 1433 -j DNAT --to 192.168.0.10:1433

Also take a look at your routing.
Routing should go both ways.


Rob

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

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

end of thread, other threads:[~2002-09-10 21:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-10 14:16 Doubt about DNAT Rodrigo Leme de Mello
2002-09-10 15:05 ` Antony Stone
2002-09-10 20:27 ` Stewart Thompson
2002-09-10 21:19   ` Rodrigo Leme de Mello
  -- strict thread matches above, loose matches on Subject: below --
2002-09-10 14:45 Rob Sterenborg

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.