* Port DNATting
@ 2005-11-26 9:42 Oleg A. Arkhangelsky
0 siblings, 0 replies; 4+ messages in thread
From: Oleg A. Arkhangelsky @ 2005-11-26 9:42 UTC (permalink / raw)
To: netfilter
Hello All,
When I'm trying to do something like this:
iptables -t nat -I POSTROUTING -p tcp --dport 8080 -j DNAT --to :80
I get: "iptables: Invalid argument".
What I want is only to translate destination port of all TCP-packets
going to some_ip:8080 into some_ip:80. I don't want to change IP. It
seems that syntax of this command is corrent, but... What is wrong?
Thanks!
P.S.: Kernel 2.4.31, iptables v1.3.2
--
Best regards,
Oleg
^ permalink raw reply [flat|nested] 4+ messages in thread
* Port DNATting
@ 2005-11-26 9:44 Oleg A. Arkhangelsky
2005-11-26 10:20 ` Georgi Alexandrov
0 siblings, 1 reply; 4+ messages in thread
From: Oleg A. Arkhangelsky @ 2005-11-26 9:44 UTC (permalink / raw)
To: netfilter
Hello All,
When I'm trying to do something like this:
iptables -t nat -I POSTROUTING -p tcp --dport 8080 -j DNAT --to :80
I get: "iptables: Invalid argument".
What I want is only to translate destination port of all TCP-packets
going to some_ip:8080 into some_ip:80. I don't want to change IP. It
seems that syntax of this command is corrent, but... What is wrong?
Thanks!
P.S.: Kernel 2.4.31, iptables v1.3.2
--
Best regards,
Oleg
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Port DNATting
2005-11-26 9:44 Port DNATting Oleg A. Arkhangelsky
@ 2005-11-26 10:20 ` Georgi Alexandrov
2005-11-26 10:28 ` Re[2]: " Oleg A. Arkhangelsky
0 siblings, 1 reply; 4+ messages in thread
From: Georgi Alexandrov @ 2005-11-26 10:20 UTC (permalink / raw)
To: netfilter
Oleg A. Arkhangelsky wrote:
>Hello All,
>
> When I'm trying to do something like this:
>
> iptables -t nat -I POSTROUTING -p tcp --dport 8080 -j DNAT --to :80
>
> I get: "iptables: Invalid argument".
>
> What I want is only to translate destination port of all TCP-packets
> going to some_ip:8080 into some_ip:80. I don't want to change IP. It
> seems that syntax of this command is corrent, but... What is wrong?
>
> Thanks!
>
> P.S.: Kernel 2.4.31, iptables v1.3.2
>
>
>
If you want to do that you should read the
iptables-tutorial.frozentux.net, then use the REDIRECT target:
iptables -t nat -A PREROUTING -p tcp --dport 8080 -j REDIRECT --to 80
regards,
Georgi Alexandrov
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re[2]: Port DNATting
2005-11-26 10:20 ` Georgi Alexandrov
@ 2005-11-26 10:28 ` Oleg A. Arkhangelsky
0 siblings, 0 replies; 4+ messages in thread
From: Oleg A. Arkhangelsky @ 2005-11-26 10:28 UTC (permalink / raw)
To: netfilter
Hello Georgi,
Saturday, November 26, 2005, 1:20:09 PM, you wrote:
GA> If you want to do that you should read the
GA> iptables-tutorial.frozentux.net, then use the REDIRECT target:
GA> iptables -t nat -A PREROUTING -p tcp --dport 8080 -j REDIRECT --to 80
Thank you very much! My error was that I use POSTROUTING instead
of PREROUTING with DNAT.
--
Best regards,
Oleg
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-11-26 10:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-26 9:44 Port DNATting Oleg A. Arkhangelsky
2005-11-26 10:20 ` Georgi Alexandrov
2005-11-26 10:28 ` Re[2]: " Oleg A. Arkhangelsky
-- strict thread matches above, loose matches on Subject: below --
2005-11-26 9:42 Oleg A. Arkhangelsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox