From mboxrd@z Thu Jan 1 00:00:00 1970 From: Guy Van Den Bergh Date: Thu, 05 Apr 2001 08:57:34 +0000 Subject: Re: [LARTC] Masquerading as a certain IP Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org 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: > To: > 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/