Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Vigneswaran R <vignesh@atc.tcs.com>
To: Andrew Stone <andrew@stonie.net>
Cc: netfilter@vger.kernel.org
Subject: Re: NAT WAN IP to internal range?
Date: Thu, 29 Dec 2011 17:05:02 +0530	[thread overview]
Message-ID: <4EFC5066.5060709@atc.tcs.com> (raw)
In-Reply-To: <CANSq30v-QabkFg3OYGqrRDJ_Jir5=eFiw43hjF7iA-aUeyTTRA@mail.gmail.com>

On Thursday 29 December 2011 04:40 PM, Andrew Stone wrote:
> Yeah I read that... It does not describe what I’m trying to
> accomplish… hence the confusion on my part…
> I’m trying to configure a one to many NAT.  (One WAN address to a
> range of internal addresses)

What are you trying to achieve? Do you want to allow the the internal 
machines to access Internet? If so, SNAT is sufficient.

iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o $WANIF -j SNAT 
--to-source a.b.c.241

Here I am assuming that 192.168.1.0/24 is your internal network and you 
want to allow all the machines. If you want to allow only a few 
machines, put a comma separated "address[/mask]" list.


Regards,
Vignesh

  reply	other threads:[~2011-12-29 11:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-19  3:20 NAT WAN IP to internal range? Andrew Stone
2011-12-21  9:07 ` Andrew Beverley
2011-12-29  9:42   ` Andrew Stone
2011-12-29 10:54     ` Vigneswaran R
2011-12-29 11:07       ` Vigneswaran R
2011-12-29 11:10         ` Andrew Stone
2011-12-29 11:35           ` Vigneswaran R [this message]
2011-12-29 13:38             ` Andrew Stone

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=4EFC5066.5060709@atc.tcs.com \
    --to=vignesh@atc.tcs.com \
    --cc=andrew@stonie.net \
    --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