From: Pablo Neira Ayuso <pablo@netfilter.org>
To: 神楽坂玲奈 <zh99998@gmail.com>
Cc: netfilter@vger.kernel.org
Subject: Re: how to do port forwarding using nftables map
Date: Mon, 21 Sep 2015 22:03:11 +0200 [thread overview]
Message-ID: <20150921200311.GA9230@salvia> (raw)
In-Reply-To: <CAP8bwDX6-5jVbZyc5JNoN8nos+QwR4QbXLhnZsxhYRc6ojxKXA@mail.gmail.com>
On Mon, Sep 21, 2015 at 11:30:54PM +0800, 神楽坂玲奈 wrote:
> iptables -t nat -A PREROUTING -p tcp --dport 1000 -j DNAT
> --to-destination 1.1.1.1:1234
> iptables -t nat -A PREROUTING -p tcp --dport 1001 -j DNAT
> --to-destination 1.1.1.1:2222
> iptables -t nat -A PREROUTING -p tcp --dport 1002 -j DNAT
> --to-destination 2.2.1.1:1234
> iptables -t nat -A PREROUTING -p tcp --dport 1234 -j DNAT
> --to-destination 1.1.1.1:1234
> iptables -t nat -A PREROUTING -p udp --dport 1000 -j DNAT
> --to-destination 1.1.1.1:1234
> iptables -t nat -A PREROUTING -p udp --dport 2000 -j DNAT
> --to-destination 8.8.8.8:53
> iptables -t nat -A PREROUTING -p tcp --dport 3000 -j DNAT
> --to-destination 2.2.2.21234
> (many of these)
nft add rule nat prerouting dnat \
tcp dport map { 1000 : 1.1.1.1, 2000 : 1.1.1.1 } : tcp dport map { 1000 : 1234, 1001 : 2222 }
next prev parent reply other threads:[~2015-09-21 20:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-21 2:09 how to do port forwarding using nftables map 神楽坂玲奈
2015-09-21 8:49 ` Pablo Neira Ayuso
2015-09-21 15:30 ` 神楽坂玲奈
2015-09-21 20:03 ` Pablo Neira Ayuso [this message]
2015-09-22 2:21 ` 神楽坂玲奈
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=20150921200311.GA9230@salvia \
--to=pablo@netfilter.org \
--cc=netfilter@vger.kernel.org \
--cc=zh99998@gmail.com \
/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.