All of lore.kernel.org
 help / color / mirror / Atom feed
* DNAT in OUTPUT chain
@ 2002-06-27 20:28 Daniel Khan
  2002-06-27 20:37 ` Karl Fischer
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Khan @ 2002-06-27 20:28 UTC (permalink / raw)
  To: netfilter

Hello List,

I have a Problem with NAT on RedHat 7.3/iptables v1.2.5.

I have 2 Hosts. I want to redirect every connection to Port 3306 on Host1 to
Port 3306 on Host2.
That is no problem as long I make an external connection (Prerouting).

I also need to redirect connections to localhost:3306.
According to the Howto's I need to set this in the OUTPUT chain.
So I use exactly the syntax from the HOWTO's:

iptables -A OUTPUT -t nat -p tcp --dport 3306 -j DNAT --to 10.1.0.212:3306

iptables reports:
"Invalid Argument"

I've allready played arround using -i lo, etc. The same errors.
It simply seems as if DNAT on OUTPUT isn't possible, but the HOWTO's say it
is.

I also read, that OUTPUT DNAT was a Problem in 2001, but that's long ago I
think.

Please help!

Thanks in advance

Daniel Khan



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

* Re: DNAT in OUTPUT chain
  2002-06-27 20:28 DNAT in OUTPUT chain Daniel Khan
@ 2002-06-27 20:37 ` Karl Fischer
  0 siblings, 0 replies; 2+ messages in thread
From: Karl Fischer @ 2002-06-27 20:37 UTC (permalink / raw)
  To: dk; +Cc: Netfilter mailing list

Daniel Khan wrote:
> 
> Hello List,
> 
> I have a Problem with NAT on RedHat 7.3/iptables v1.2.5.
>
> So I use exactly the syntax from the HOWTO's:
> 
> iptables -A OUTPUT -t nat -p tcp --dport 3306 -j DNAT --to 10.1.0.212:3306

I just copied and pasted this line to my machine and it works fine here.
However, according to the man-page, I would try the following:

iptables -A OUTPUT -t nat -p tcp -m tcp --dport 3306 \
  -j DNAT --to-destination 10.1.0.212:3306

HTH

- Karl


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

end of thread, other threads:[~2002-06-27 20:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-27 20:28 DNAT in OUTPUT chain Daniel Khan
2002-06-27 20:37 ` Karl Fischer

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.