Re: [LARTC] Masquerading as a certain IP

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>
To: <lartc@xxxxxxxxxxxxxxx>
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@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO:

http://ds9a.nl/2.4Routing/




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





[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux