Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Diego Alencar Alves de Lima <listas@diegolima.org>
To: netfilter mailing list <netfilter@vger.kernel.org>
Subject: DNAT'ing IP ranges
Date: Fri, 01 Feb 2008 17:00:32 -0200	[thread overview]
Message-ID: <1201892435.9016.4.camel@ws-diegolima.consuldata.lan> (raw)

Greetings list,

I'd like to know if there is any way I can add a DNAT rule that will nat
an entire range of IP addresses to another range (which has the same
network mask). Something like this:

-t nat -A PREROUTING -d 192.168.0.0/24 -j DNAT --to 192.168.1.0/24

I need to keep the host address, just change the destination network
address. Thank you,

-- 
Diego Alencar Alves de Lima
http://www.diegolima.org



             reply	other threads:[~2008-02-01 19:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-01 19:00 Diego Alencar Alves de Lima [this message]
2008-02-01 20:25 ` DNAT'ing IP ranges Pascal Hambourg

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=1201892435.9016.4.camel@ws-diegolima.consuldata.lan \
    --to=listas@diegolima.org \
    --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