Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Antony Stone <Antony@Soft-Solutions.co.uk>
To: netfilter@lists.netfilter.org
Subject: Re: help needed.
Date: Fri, 7 Nov 2003 12:55:54 +0000	[thread overview]
Message-ID: <200311071255.hA7Ctwj14697@agate.rockstone.co.uk> (raw)
In-Reply-To: <3FAB92BA.4090003@newweb.oktanet.fi>

On Friday 07 November 2003 12:40 pm, Mikko Kallio wrote:

> We have one linux as gateway with multiple static ips (212.23.233.2-60)
> and nat .We also have lan with ip range 192.168.132.0/24.
> This works ok, every machine on lan connecting to internet shows up with
> ip 212.23.233.2 (which is our linux), but i'd like to set one of the lan
> machines to use static ip ex. 192.168.132.230 so that it shows with
> 212.23.233.40 example and connections from outside to ip 212.23.233.40
> will be natted on 192.168.132.230.

iptables -A POSTROUTING -t nat -s 192.168.132.230 -j SNAT --to 212.23.233.40
iptables -A PREROUTING -t nat -d 212.23.233.40 -j DNAT --to 192.168.132.230

Plus whatever FORWARDing rules you need to allow through the protocols you 
want.

Antony.

-- 

If builders built buildings the way programmers write programs,
then the first woodpecker that came along would destroy civilisation.
                                                     Please reply to the list;
                                                           please don't CC me.


  reply	other threads:[~2003-11-07 12:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-07 12:40 help needed Mikko Kallio
2003-11-07 12:55 ` Antony Stone [this message]
2003-11-07 13:08   ` Jesper Lund
2003-11-07 13:30     ` Antony Stone
  -- strict thread matches above, loose matches on Subject: below --
2003-11-13 15:06 Help Needed Harish Sabnani
2003-11-13 15:35 ` Jeffrey Laramie
2003-03-25  8:53 Help needed steven.mugassa
2003-03-26 12:11 ` Kim Jensen
2002-05-19 18:27 dvv

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=200311071255.hA7Ctwj14697@agate.rockstone.co.uk \
    --to=antony@soft-solutions.co.uk \
    --cc=netfilter@lists.netfilter.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