All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Eduardo Bejar" <wonka@linkabu.net>
To: netfilter@lists.netfilter.org
Subject: SNAT / MASQUERADE to a different IP
Date: Thu, 9 Mar 2006 17:09:13 -0500	[thread overview]
Message-ID: <019d01c643c6$193ab020$6bb1a8c0@veruca> (raw)

Hi,

I have this setup:

LAN with one Fedora Server as gateway/email server.

Currently I masquerade all LAN traffic to use the same IP as the Server:

iptables -t nat -A POSTROUTING -s $LAN -o eth0 -j MASQUERADE

So, LAN and mail server use both the same IP address. This works fine, but
now I´d like to make the LAN use a different IP address than the mail
server, so I´d like to know how can I do that?

I tested SNAT, like:

iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to $IP

but with this, LAN and mail server now use $IP both, and what I´d like to do
is assign different IP addresses: one for the LAN and other for the mail
server.

Any thoughts about this will be very appreciated.

Thanks!

Edo






             reply	other threads:[~2006-03-09 22:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-09 22:09 Eduardo Bejar [this message]
2006-03-09 22:18 ` SNAT / MASQUERADE to a different IP Robby Workman

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='019d01c643c6$193ab020$6bb1a8c0@veruca' \
    --to=wonka@linkabu.net \
    --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 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.