* DNAT query
@ 2005-11-11 10:30 Payal Rathod
2005-11-11 10:46 ` Rob Sterenborg
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Payal Rathod @ 2005-11-11 10:30 UTC (permalink / raw)
To: Netfilter ML
Hi,
I am trying to redirect trafffic from outside to an internal machine.
The setup is SuSE Linux 9.1 (i586) 2.6.4-52-default
# iptables --version
iptables v1.2.9
When I give,
# iptables -t nat -I OUTPUT -d dyn.example.com -p tcp --dport 8000 -j DNAT --to-destination 192.168.10.2:8000
iptables: Target problem
What exactly is wrong? If I try it on my Mandrake box it works. Any
ideas?
Thanks in advance.
With warm regards,
-Payal
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: DNAT query
2005-11-11 10:30 DNAT query Payal Rathod
@ 2005-11-11 10:46 ` Rob Sterenborg
2005-11-11 11:42 ` Payal Rathod
2005-11-11 10:55 ` Jörg Harmuth
2005-11-11 10:57 ` Jörg Harmuth
2 siblings, 1 reply; 8+ messages in thread
From: Rob Sterenborg @ 2005-11-11 10:46 UTC (permalink / raw)
To: Netfilter ML
On Fri, November 11, 2005 11:30, Payal Rathod wrote:
> Hi,
> I am trying to redirect trafffic from outside to an internal machine.
> The setup is SuSE Linux 9.1 (i586) 2.6.4-52-default
> # iptables --version
> iptables v1.2.9
>
> When I give,
> # iptables -t nat -I OUTPUT -d dyn.example.com -p tcp --dport 8000 -j
> DNAT --to-destination 192.168.10.2:8000
> iptables: Target problem
>
> What exactly is wrong? If I try it on my Mandrake box it works. Any
> ideas?
Can't say that I've had any problems with this. Try:
iptables -t nat -I PREROUTING -d dyn.example.com -p tcp --dport 8000 \
-j DNAT --to-destination 192.168.10.2:8000
Gr,
Rob
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: DNAT query
2005-11-11 10:30 DNAT query Payal Rathod
2005-11-11 10:46 ` Rob Sterenborg
@ 2005-11-11 10:55 ` Jörg Harmuth
2005-11-11 10:57 ` Jörg Harmuth
2 siblings, 0 replies; 8+ messages in thread
From: Jörg Harmuth @ 2005-11-11 10:55 UTC (permalink / raw)
To: netfilter
Payal Rathod schrieb:
> Hi,
> I am trying to redirect trafffic from outside to an internal machine.
> The setup is SuSE Linux 9.1 (i586) 2.6.4-52-default
> # iptables --version
> iptables v1.2.9
>
> When I give,
> # iptables -t nat -I OUTPUT -d dyn.example.com -p tcp --dport 8000 -j DNAT --to-destination 192.168.10.2:8000
> iptables: Target problem
>
> What exactly is wrong? If I try it on my Mandrake box it works. Any
> ideas?
Some time ago I had a similar problem with SLES8 and nat/OUTPUT. The
reason was, that is was the _only_ netfilter optio, that wasn't compiled
into the kernel :) I generally don't work with SuSE, so I don't know.
Bur maybe they still don't compile it as a kernel module.
HTH,
Joerg
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: DNAT query
2005-11-11 10:30 DNAT query Payal Rathod
2005-11-11 10:46 ` Rob Sterenborg
2005-11-11 10:55 ` Jörg Harmuth
@ 2005-11-11 10:57 ` Jörg Harmuth
2005-11-11 11:41 ` Payal Rathod
2 siblings, 1 reply; 8+ messages in thread
From: Jörg Harmuth @ 2005-11-11 10:57 UTC (permalink / raw)
To: netfilter
Payal Rathod schrieb:
> Hi,
> I am trying to redirect trafffic from outside to an internal machine.
> The setup is SuSE Linux 9.1 (i586) 2.6.4-52-default
> # iptables --version
> iptables v1.2.9
>
> When I give,
> # iptables -t nat -I OUTPUT -d dyn.example.com -p tcp --dport 8000 -j DNAT --to-destination 192.168.10.2:8000
> iptables: Target problem
>
> What exactly is wrong? If I try it on my Mandrake box it works. Any
> ideas?
Some time ago I had a similar problem with SLES8 and nat/OUTPUT. The
reason was, that is was the _only_ netfilter optio, that wasn't compiled
into the kernel :) I generally don't work with SuSE, so I don't know.
Bur maybe they still don't compile it as a kernel module.
HTH,
Joerg
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: DNAT query
2005-11-11 10:57 ` Jörg Harmuth
@ 2005-11-11 11:41 ` Payal Rathod
2005-11-11 12:20 ` Jörg Harmuth
0 siblings, 1 reply; 8+ messages in thread
From: Payal Rathod @ 2005-11-11 11:41 UTC (permalink / raw)
To: J?rg Harmuth; +Cc: netfilter
On Fri, Nov 11, 2005 at 11:57:02AM +0100, J?rg Harmuth wrote:
> Some time ago I had a similar problem with SLES8 and nat/OUTPUT. The
> reason was, that is was the _only_ netfilter optio, that wasn't compiled
> into the kernel :) I generally don't work with SuSE, so I don't know.
> Bur maybe they still don't compile it as a kernel module.
So what do you suggest? How do I use it now? Do I have to recomiple te
kernel for that? I never done that before.
With warm regards,
-Payal
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: DNAT query
2005-11-11 10:46 ` Rob Sterenborg
@ 2005-11-11 11:42 ` Payal Rathod
0 siblings, 0 replies; 8+ messages in thread
From: Payal Rathod @ 2005-11-11 11:42 UTC (permalink / raw)
To: netfilter
On Fri, Nov 11, 2005 at 11:46:19AM +0100, Rob Sterenborg wrote:
> iptables -t nat -I PREROUTING -d dyn.example.com -p tcp --dport 8000 \
> -j DNAT --to-destination 192.168.10.2:8000
This does work (sorry I should have mentioned it before). But I also
need the OUTPUT rule too, right?
With warm regards,
-Payal
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: DNAT query
2005-11-11 11:41 ` Payal Rathod
@ 2005-11-11 12:20 ` Jörg Harmuth
2005-11-11 16:11 ` Payal Rathod
0 siblings, 1 reply; 8+ messages in thread
From: Jörg Harmuth @ 2005-11-11 12:20 UTC (permalink / raw)
To: netfilter
Payal Rathod schrieb:
> On Fri, Nov 11, 2005 at 11:57:02AM +0100, J?rg Harmuth wrote:
>
>>Some time ago I had a similar problem with SLES8 and nat/OUTPUT. The
>>reason was, that is was the _only_ netfilter optio, that wasn't compiled
>>into the kernel :) I generally don't work with SuSE, so I don't know.
>>Bur maybe they still don't compile it as a kernel module.
>
>
> So what do you suggest? How do I use it now? Do I have to recomiple te
> kernel for that? I never done that before.
> With warm regards,
> -Payal
It depends. But as Robs solution works for you, it looks like you only
need to redirect/forward connections (roughly: PREROUTING -> FORWARD ->
POSTROUTING). You only need nat/OUTPUT for packets, generated on the
firewall itself (roughly: local process -> OUTPUT -> POSTROUTING). If
you need to redirect locally generated packets *and* nat/OUTPUT isn't
compiled - well, yes then you have to compile the module from the kernel
sources (which in this case is simple, because you only have to enable
one option).
HTH,
Joerg
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: DNAT query
2005-11-11 12:20 ` Jörg Harmuth
@ 2005-11-11 16:11 ` Payal Rathod
0 siblings, 0 replies; 8+ messages in thread
From: Payal Rathod @ 2005-11-11 16:11 UTC (permalink / raw)
To: netfilter
On Fri, Nov 11, 2005 at 01:20:13PM +0100, J?rg Harmuth wrote:
> It depends. But as Robs solution works for you, it looks like you only
> need to redirect/forward connections (roughly: PREROUTING -> FORWARD ->
> POSTROUTING). You only need nat/OUTPUT for packets, generated on the
> firewall itself (roughly: local process -> OUTPUT -> POSTROUTING). If
[...]
I am sorry but you lost me here. Can you give the complete ruleset which
I need now. I always thought I needed PREROUTING as well as OUTPUT.
Thanks in advance.
With warm regards,
-Payal
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2005-11-11 16:11 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-11 10:30 DNAT query Payal Rathod
2005-11-11 10:46 ` Rob Sterenborg
2005-11-11 11:42 ` Payal Rathod
2005-11-11 10:55 ` Jörg Harmuth
2005-11-11 10:57 ` Jörg Harmuth
2005-11-11 11:41 ` Payal Rathod
2005-11-11 12:20 ` Jörg Harmuth
2005-11-11 16:11 ` Payal Rathod
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox