SNAT

Nigel Morse n.morse@hyperknowledge.com
Sat, 9 Jun 2001 01:27:44 +0100


This is a multi-part message in MIME format.

------=_NextPart_000_0064_01C0F083.623E3580
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

If I have static IPs  1.2.3.0/24 and used internal network =
192.168.1.0/24, how easy is it to keep the last digit the same during =
SNAT.

i.e have=20
1.2.3.1 SNAT to 192.168.1.1
1.2.3.2 SNAT to 192.168.1.2
etc.

Will =20
-A POSTROUTING -s 192.168.1.0/24 -j SNAT --to 1.2.3.0/24=20
do this, or will the NAT just use any of the output range as it sees =
fit?  (i.e. although ALL machines internally will use private IPS the =
outside world would see connections from the real ips.  No computer =
would actually be given the real ip)
Or do I have to create one rule for each IP address?  The NAT howto =
suggests something like this, but only in relations to clashes with =
computers using the real ips, and doesn't say that NAT would preserve =
the "static" part of the IP.

Cheers
Nigel



------=_NextPart_000_0064_01C0F083.623E3580
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4522.1800" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#c0c0c0>
<DIV><FONT face=3DArial size=3D2>If I have static =
IPs&nbsp;&nbsp;</FONT><FONT=20
face=3DArial size=3D2>1.2.3.0/24 and used internal network =
192.168.1.0/24, how easy=20
is it to keep the last digit the same during SNAT.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>i.e have </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>1.2.3.1 SNAT to =
192.168.1.1</FONT></DIV>
<DIV>
<DIV><FONT face=3DArial size=3D2>1.2.3.2 SNAT to =
192.168.1.2</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>etc.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Will&nbsp; </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>-A POSTROUTING -s 192.168.1.0/24 -j =
SNAT --to=20
1.2.3.0/24 </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>do this, or will the NAT just use any =
of the output=20
range as it sees fit?&nbsp; (i.e. although ALL machines internally will =
use=20
private IPS the outside world would see connections from the real =
ips.&nbsp; No=20
computer would actually be given the real ip)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Or do I have to create one rule for =
each IP=20
address?&nbsp; The NAT howto suggests something like this, but only in =
relations=20
to clashes with computers using the real ips, and doesn't say that NAT =
would=20
preserve the "static" part of the IP.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Cheers</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Nigel</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0064_01C0F083.623E3580--