Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "Marcin Mirosław" <marcin@mejor.pl>
To: netfilter@vger.kernel.org
Subject: -j DNAT doesn't accept nonnumerical port
Date: Thu, 25 Aug 2011 16:31:28 +0200	[thread overview]
Message-ID: <4E565CC0.6050207@mejor.pl> (raw)

Hello!
Iptables accept such line without problem:
iptables -t nat -A PREROUTING -p tcp  --dport pop3 -j DNAT 
--to-destination 1.2.3.4:25

Destination port is defined by word. So i wanted to use use the same 
trick in DNAT but i've got:
# iptables -t nat -A PREROUTING -p tcp  --dport pop3 -j DNAT 
--to-destination 1.2.3.4:smtp
iptables v1.4.12: Port `smtp' not valid

Is it intentional behavior of iptables? I can't see any info about it in 
man.

Regards,
Marcin

             reply	other threads:[~2011-08-25 14:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-25 14:31 Marcin Mirosław [this message]
2011-08-26  7:54 ` -j DNAT doesn't accept nonnumerical port Jan Engelhardt
2011-08-29  8:49   ` Marcin Mirosław

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E565CC0.6050207@mejor.pl \
    --to=marcin@mejor.pl \
    --cc=netfilter@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox