All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Applegate <dapplegate@cradlepoint.com>
To: netfilter@vger.kernel.org
Subject: One to One port range forwarding to different port range
Date: Wed, 5 Aug 2015 10:49:44 -0600	[thread overview]
Message-ID: <55C23EA8.8020905@cradlepoint.com> (raw)

Hello,

After testing and looking at the kernel source, I realize that this mapping:

iptables -t nat -I PREROUTING -p tcp -m tcp --dport 30000:40000 -j DNAT 
--to [local_ip]:10000-2000

Doesn't do a one-to-one port mapping
e.g.:
100.0.0.1:30000 > 192.168.0.5:10000
100.0.0.1.30001 > 192.168.0.5:10001
100.0.0.1.30002 > 192.168.0.5:10002

I was wondering if it was possible to do the 1:1 port range forwarding 
to different port ranges or if you have to use individual rules.

Thanks

Doug

             reply	other threads:[~2015-08-05 16:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-05 16:49 Doug Applegate [this message]
2015-08-06  7:26 ` One to One port range forwarding to different port range Akshat Kakkar
2015-08-06 15:29   ` Doug Applegate
2015-08-06 16:51     ` John Miller

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=55C23EA8.8020905@cradlepoint.com \
    --to=dapplegate@cradlepoint.com \
    --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 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.