Linux Advanced Routing and Traffic Control list
 help / color / mirror / Atom feed
From: Guy Van Den Bergh <guy.vandenbergh@pandora.be>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] Masquerading as a certain IP
Date: Thu, 05 Apr 2001 08:57:34 +0000	[thread overview]
Message-ID: <marc-lartc-98646112629452@msgid-missing> (raw)
In-Reply-To: <marc-lartc-98643418406475@msgid-missing>

If you want to specify the address to use, you have to do source NAT (or 
SNAT). With a 2.4.x kernel and iptables you can do this, I am not sure
whether real NAT is possible with 2.2.x kernels and ipchains.

In fact masquerading is a special case of source NAT, where you do not 
have to specify the IP address to use, but where automatically the 
address of the outgoing interface is used.

With iptables, you have to use the SNAT target instead of the MASQUERADE 
target. You can read the iptables HOWTO or the iptables man page for 
more information.

Guy

Deepak singhal wrote:

> Hi joel ,
> 
> The ip is not masqueraded as the primary address of the interface but it get
> masqueraded as ip to which the gateway of the machine is specified i.e. to
> the ip/nic from which it leaves the machine .
> 
> And yes I would also like to know if its possible to specify to what ip it
> gets masqueraded as i also wanted to do the same for some application
> scenario.
> 
> Regards
> 
> Deepak
> ----- Original Message -----
> From: <Joel@airnet.com.au>
> To: <lartc@mailman.ds9a.nl>
> Sent: Thursday, April 05, 2001 6:59 AM
> Subject: [LARTC] Masquerading as a certain IP
> 
> 
> 
>> Hi all,
>> I was just wondering if there's any way to specify what something is
>> masqueraded AS. Usually it ends up that packets are rewritten with the
>> primary address of the interface that the data goes out of, but is there
> 
> any
> 
>> way to have them rewritten with the IP of an aliased interface, or the IP
> 
> of
> 
>> another network card?
>> 
>> Thanks,
>> Joel
>> 
>> _______________________________________________
>> LARTC mailing list / LARTC@mailman.ds9a.nl
>> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO:
> 
> http://ds9a.nl/2.4Routing/
> 
> 
> 
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/



_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/

  parent reply	other threads:[~2001-04-05  8:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-05  1:41 [LARTC] Masquerading as a certain IP Joel
2001-04-05  8:27 ` Deepak singhal
2001-04-05  8:57 ` Guy Van Den Bergh [this message]
2001-04-05 14:23 ` worm
2001-04-07  1:32 ` Mike Fedyk
2001-04-07  5:37 ` Christian Worm Mortensen
2001-04-07  8:44 ` bill

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=marc-lartc-98646112629452@msgid-missing \
    --to=guy.vandenbergh@pandora.be \
    --cc=lartc@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