Anyone doing NAT with RH 5.1?

Anyone doing NAT with RH 5.1?

Post by Mark Langka » Mon, 12 Oct 1998 04:00:00



I need to do Network Address Translation with RedHat 5.1 kernel 2.0.35.
I have found a NAT package with patches for 2.0.29 and 2.0.33, but not
2.0.35. I have a Linux box with 2 NICs to use as a router. I need to
provide access to an internal computer from outside our net, (private
WAN) but I can't change the address of the internal computer.

Example:

(our computer)                            (client subnet)
192.168.1.1 ---- Linux/Router ---- 32.x.x.x

The external net has assigned us a number for the internal computer.
Traffic will originate from the client subnet. (Otherwise I could just
use IP masq).

Any suggestions? (I know I could use a ci$co router for this, but what's
the fun in that?)

Thanks!

 
 
 

Anyone doing NAT with RH 5.1?

Post by Rod Roar » Mon, 12 Oct 1998 04:00:00


Depending on the type of access to be allowed to the internal machine, you
can probably install a proxy server (Squid) on the Linux box.  That would
give you the best control.

IP Masq *is* NAT and could probably do the job as well, using port
redirection of incoming connections.  See
http://dijon.nais.com/~nevo/masq/ for applications of this.

Hope this helps.  Let me know if you need more Linux boxes.  ;-)

-- Rod

----------------------------------------------------------------------
Sunset Systems                         Home of the $500 Linux Computer
http://www.sunsetsystems.com/

----------------------------------------------------------------------


>I need to do Network Address Translation with RedHat 5.1 kernel 2.0.35.
>I have found a NAT package with patches for 2.0.29 and 2.0.33, but not
>2.0.35. I have a Linux box with 2 NICs to use as a router. I need to
>provide access to an internal computer from outside our net, (private
>WAN) but I can't change the address of the internal computer.
>Example:
>(our computer)                            (client subnet)
>192.168.1.1 ---- Linux/Router ---- 32.x.x.x
>The external net has assigned us a number for the internal computer.
>Traffic will originate from the client subnet. (Otherwise I could just
>use IP masq).
>Any suggestions? (I know I could use a ci$co router for this, but what's
>the fun in that?)
>Thanks!



 
 
 

Anyone doing NAT with RH 5.1?

Post by Mark Langka » Mon, 12 Oct 1998 04:00:00


Hmmmm... I hadn't thought of looking at Squid. I'll check it out. I am using
IP masq for Internet access. (This particular project does not use the
Internet).

The external client net must think my internal box is a node on their 32.x.x.x
subnet. For example, if they have assigned 32.80.1.1 to be my internal box, I
need the Linux router to send all traffic to it's actual 192.168.1.1 address
on my internal net. Replies from my internal box must look like it's coming
from 32.80.1.1.

Cheers
-----------------------------------


> Depending on the type of access to be allowed to the internal machine, you
> can probably install a proxy server (Squid) on the Linux box.  That would
> give you the best control.

> IP Masq *is* NAT and could probably do the job as well, using port
> redirection of incoming connections.  See
> http://dijon.nais.com/~nevo/masq/ for applications of this.

> Hope this helps.  Let me know if you need more Linux boxes.  ;-)

> -- Rod

> ----------------------------------------------------------------------
> Sunset Systems                         Home of the $500 Linux Computer
> http://www.sunsetsystems.com/

> ----------------------------------------------------------------------


> >I need to do Network Address Translation with RedHat 5.1 kernel 2.0.35.
> >I have found a NAT package with patches for 2.0.29 and 2.0.33, but not
> >2.0.35. I have a Linux box with 2 NICs to use as a router. I need to
> >provide access to an internal computer from outside our net, (private
> >WAN) but I can't change the address of the internal computer.

> >Example:

> >(our computer)                            (client subnet)
> >192.168.1.1 ---- Linux/Router ---- 32.x.x.x

> >The external net has assigned us a number for the internal computer.
> >Traffic will originate from the client subnet. (Otherwise I could just
> >use IP masq).

> >Any suggestions? (I know I could use a ci$co router for this, but what's
> >the fun in that?)

> >Thanks!


> Depending on the type of access to be allowed to the internal machine, you
> can probably install a proxy server (Squid) on the Linux box.  That would
> give you the best control.

> IP Masq *is* NAT and could probably do the job as well, using port
> redirection of incoming connections.  See
> http://dijon.nais.com/~nevo/masq/ for applications of this.

> Hope this helps.  Let me know if you need more Linux boxes.  ;-)

> -- Rod

> ----------------------------------------------------------------------
> Sunset Systems                         Home of the $500 Linux Computer
> http://www.sunsetsystems.com/

> ----------------------------------------------------------------------


> >I need to do Network Address Translation with RedHat 5.1 kernel 2.0.35.
> >I have found a NAT package with patches for 2.0.29 and 2.0.33, but not
> >2.0.35. I have a Linux box with 2 NICs to use as a router. I need to
> >provide access to an internal computer from outside our net, (private
> >WAN) but I can't change the address of the internal computer.

> >Example:

> >(our computer)                            (client subnet)
> >192.168.1.1 ---- Linux/Router ---- 32.x.x.x

> >The external net has assigned us a number for the internal computer.
> >Traffic will originate from the client subnet. (Otherwise I could just
> >use IP masq).

> >Any suggestions? (I know I could use a ci$co router for this, but what's
> >the fun in that?)

> >Thanks!


 
 
 

Anyone doing NAT with RH 5.1?

Post by Mark Langka » Tue, 13 Oct 1998 04:00:00


Update:

I don't think Squid is what I'm looking for. IP Masq (unless I'm missing
something) is used to make internal systems appear to be one IP address
(of the gateway or IP Masq box) to systems on the outside, and is used
for inside systems to begin sessions with outside systems.

I need to do the opposite. An outside system needs to start a session
(various things) with an inside system. I can't put another NIC into
this inside system either. I was hoping that NAT would allow me to pass
traffic to the inside system through a Linux box as a NAT router. I have
a NAT kernel patch for 2.0.33, but I was hoping something else would be
available so I wouldn't have to downgrade from 2.0.35.

Am I on the right track?


> Hmmmm... I hadn't thought of looking at Squid. I'll check it out. I am using
> IP masq for Internet access. (This particular project does not use the
> Internet).

> The external client net must think my internal box is a node on their 32.x.x.x
> subnet. For example, if they have assigned 32.80.1.1 to be my internal box, I
> need the Linux router to send all traffic to it's actual 192.168.1.1 address
> on my internal net. Replies from my internal box must look like it's coming
> from 32.80.1.1.

> Cheers
> -----------------------------------


> > Depending on the type of access to be allowed to the internal machine, you
> > can probably install a proxy server (Squid) on the Linux box.  That would
> > give you the best control.

> > IP Masq *is* NAT and could probably do the job as well, using port
> > redirection of incoming connections.  See
> > http://dijon.nais.com/~nevo/masq/ for applications of this.

> > Hope this helps.  Let me know if you need more Linux boxes.  ;-)

> > -- Rod

> > ----------------------------------------------------------------------
> > Sunset Systems                         Home of the $500 Linux Computer
> > http://www.sunsetsystems.com/

> > ----------------------------------------------------------------------


> > >I need to do Network Address Translation with RedHat 5.1 kernel 2.0.35.
> > >I have found a NAT package with patches for 2.0.29 and 2.0.33, but not
> > >2.0.35. I have a Linux box with 2 NICs to use as a router. I need to
> > >provide access to an internal computer from outside our net, (private
> > >WAN) but I can't change the address of the internal computer.

> > >Example:

> > >(our computer)                            (client subnet)
> > >192.168.1.1 ---- Linux/Router ---- 32.x.x.x

> > >The external net has assigned us a number for the internal computer.
> > >Traffic will originate from the client subnet. (Otherwise I could just
> > >use IP masq).

> > >Any suggestions? (I know I could use a ci$co router for this, but what's
> > >the fun in that?)

> > >Thanks!


> > Depending on the type of access to be allowed to the internal machine, you
> > can probably install a proxy server (Squid) on the Linux box.  That would
> > give you the best control.

> > IP Masq *is* NAT and could probably do the job as well, using port
> > redirection of incoming connections.  See
> > http://dijon.nais.com/~nevo/masq/ for applications of this.

> > Hope this helps.  Let me know if you need more Linux boxes.  ;-)

> > -- Rod

> > ----------------------------------------------------------------------
> > Sunset Systems                         Home of the $500 Linux Computer
> > http://www.sunsetsystems.com/

> > ----------------------------------------------------------------------


> > >I need to do Network Address Translation with RedHat 5.1 kernel 2.0.35.
> > >I have found a NAT package with patches for 2.0.29 and 2.0.33, but not
> > >2.0.35. I have a Linux box with 2 NICs to use as a router. I need to
> > >provide access to an internal computer from outside our net, (private
> > >WAN) but I can't change the address of the internal computer.

> > >Example:

> > >(our computer)                            (client subnet)
> > >192.168.1.1 ---- Linux/Router ---- 32.x.x.x

> > >The external net has assigned us a number for the internal computer.
> > >Traffic will originate from the client subnet. (Otherwise I could just
> > >use IP masq).

> > >Any suggestions? (I know I could use a ci$co router for this, but what's
> > >the fun in that?)

> > >Thanks!


 
 
 

Anyone doing NAT with RH 5.1?

Post by Rod Roar » Tue, 13 Oct 1998 04:00:00



>Update:
>I don't think Squid is what I'm looking for. IP Masq (unless I'm missing
>something) is used to make internal systems appear to be one IP address
>(of the gateway or IP Masq box) to systems on the outside,

Right, isn't this what you wanted?

Quote:>and is used
>for inside systems to begin sessions with outside systems.

Usually, but not necessarily.  As I noted before you can have the internal
app listening on some port and use a port redirection utility to forward
incoming connections via the IP Masq box to that port.

-- Rod

----------------------------------------------------------------------
Sunset Systems                         Home of the $500 Linux Computer
http://www.sunsetsystems.com/

----------------------------------------------------------------------

>I need to do the opposite. An outside system needs to start a session
>(various things) with an inside system. I can't put another NIC into
>this inside system either. I was hoping that NAT would allow me to pass
>traffic to the inside system through a Linux box as a NAT router. I have
>a NAT kernel patch for 2.0.33, but I was hoping something else would be
>available so I wouldn't have to downgrade from 2.0.35.
>Am I on the right track?

>> Hmmmm... I hadn't thought of looking at Squid. I'll check it out. I am using
>> IP masq for Internet access. (This particular project does not use the
>> Internet).

>> The external client net must think my internal box is a node on their 32.x.x.x
>> subnet. For example, if they have assigned 32.80.1.1 to be my internal box, I
>> need the Linux router to send all traffic to it's actual 192.168.1.1 address
>> on my internal net. Replies from my internal box must look like it's coming
>> from 32.80.1.1.

>> Cheers
>> -----------------------------------


>> > Depending on the type of access to be allowed to the internal machine, you
>> > can probably install a proxy server (Squid) on the Linux box.  That would
>> > give you the best control.

>> > IP Masq *is* NAT and could probably do the job as well, using port
>> > redirection of incoming connections.  See
>> > http://dijon.nais.com/~nevo/masq/ for applications of this.

>> > Hope this helps.  Let me know if you need more Linux boxes.  ;-)

>> > -- Rod

>> > ----------------------------------------------------------------------
>> > Sunset Systems                         Home of the $500 Linux Computer
>> > http://www.sunsetsystems.com/

>> > ----------------------------------------------------------------------


>> > >I need to do Network Address Translation with RedHat 5.1 kernel 2.0.35.
>> > >I have found a NAT package with patches for 2.0.29 and 2.0.33, but not
>> > >2.0.35. I have a Linux box with 2 NICs to use as a router. I need to
>> > >provide access to an internal computer from outside our net, (private
>> > >WAN) but I can't change the address of the internal computer.

>> > >Example:

>> > >(our computer)                            (client subnet)
>> > >192.168.1.1 ---- Linux/Router ---- 32.x.x.x

>> > >The external net has assigned us a number for the internal computer.
>> > >Traffic will originate from the client subnet. (Otherwise I could just
>> > >use IP masq).

>> > >Any suggestions? (I know I could use a ci$co router for this, but what's
>> > >the fun in that?)

>> > >Thanks!


 
 
 

Anyone doing NAT with RH 5.1?

Post by Michael Hasenstei » Tue, 13 Oct 1998 04:00:00


Quote:> IP Masq *is* NAT and could probably do the job as well, using port

Not that it matters for this discussion, but Masq. is just one kind of
NAT. See
http://www.csn.tu-chemnitz.de/~mha/linux-ip-nat/diplom/nat.html

As I've already said, it doesn't matter here. Just didn't want to let
this statement stand alone.

(http://www.csn.tu-chemnitz.de/HyperNews/get/linux-ip-nat.html)

--
Michael Hasenstein; Siemens Nixdorf (Consultant)
http://www.csn.tu-chemnitz.de/~mha/
Private Pilot (ASEL) since 1998

 
 
 

Anyone doing NAT with RH 5.1?

Post by Peter H. Lemieu » Wed, 14 Oct 1998 04:00:00


Take a look at:

        http://www.ox.compsoc.org.uk/~steve/portforwarding.html


> I need to do Network Address Translation with RedHat 5.1 kernel 2.0.35.
> I have found a NAT package with patches for 2.0.29 and 2.0.33, but not
> 2.0.35. I have a Linux box with 2 NICs to use as a router. I need to
> provide access to an internal computer from outside our net, (private
> WAN) but I can't change the address of the internal computer.

> Example:

> (our computer)                            (client subnet)
> 192.168.1.1 ---- Linux/Router ---- 32.x.x.x

> The external net has assigned us a number for the internal computer.
> Traffic will originate from the client subnet. (Otherwise I could just
> use IP masq).

 
 
 

Anyone doing NAT with RH 5.1?

Post by Michael Hasenstei » Thu, 15 Oct 1998 04:00:00



> Update:

> I don't think Squid is what I'm looking for. IP Masq (unless I'm missing
> something) is used to make internal systems appear to be one IP address
> (of the gateway or IP Masq box) to systems on the outside, and is used
> for inside systems to begin sessions with outside systems.

> I need to do the opposite. An outside system needs to start a session
> (various things) with an inside system. I can't put another NIC into
> this inside system either. I was hoping that NAT would allow me to pass
> traffic to the inside system through a Linux box as a NAT router. I have
> a NAT kernel patch for 2.0.33, but I was hoping something else would be
> available so I wouldn't have to downgrade from 2.0.35.

> Am I on the right track?

It depends. As Larry Wall says, there's always more than one way to do
things (but many people will insits their's is the ONLY valid one and
all others are idiots).
Looks like you've found my NAT-patch. 1st, it also works with 2.0.35. If
there should be a .rej it will be easily resolved with very little
knowledge required.
2nd, I've stated often enough (and you've probably read it) that that
code of mine was only an experiment, Alpha quality. The major product
was the NAT document (URL posted in my prev. posting), the code was used
only for verification, experimental. You still wanna use it?
3rd, I'm not certain if or how useful my code is for what you want to
do. I think if I had to accomplish what you described I'd try
  a) an app-level portforwarder (I think there are several, you'll
probably find links on masquerading4Linux webpages)
  b) portforwarding that's now part of masquerading in recent kernels
(e.g. your 2.0.35). Haven't tried that myself, but it seems to be
well-tested (compared to my stuff, which wasn't meant to be for
production). This is why people keep pointing you to Masquerading, I
guess, because this is part of it. As far as I understand it was
introduced because people asked for exactly what you're trying to do.

I guess you need only certain ports from that inside host available, not
general (IP)-availability. Also, if you should want to have the same
ports on your 'official' Internet-host and the inside-host available to
the outside, that wouldn't work anyway, not with my static NAT nor with
masquerading, another IP would be needed, but I guess that's not what
you want. So look at kernel builtin port forwarding.
And forget my experimental code. The goal of that project was the paper,
the by-product is the code, not vice versa. It was a university project,
after all, which says it all.

http://www.csn.tu-chemnitz.de/HyperNews/get/linux-ip-nat.html

--
Michael Hasenstein; Siemens Nixdorf (Consultant)


http://www.csn.tu-chemnitz.de/~mha/
Private Pilot (ASEL) since 1998

 
 
 

Anyone doing NAT with RH 5.1?

Post by Dan Kege » Mon, 16 Nov 1998 04:00:00


Michael Hasenstein schrieb:

Quote:

> > IP Masq *is* NAT and could probably do the job as well, using port

> Not that it matters for this discussion, but Masq. is just one kind of
> NAT. See
> http://www.csn.tu-chemnitz.de/~mha/linux-ip-nat/diplom/nat.html

Indeed.  It's not ever a very good kind of NAT, for some purposes.
Last time I checked, it didn't have the desireable property
   The NAT should perform a local-to-remote mapping based solely on
   the local host & port number; that is,
   if successive UDP packets are sent from local host H0/local port P0
   to remote hosts/ports H1/P1, H2/P2, H3/P3...,
   i.e. if the  following packets are sent:
     (H0/P0,H1/P1)
     (H0/P0,H2/P2)
     (H0/P0,H3/P3)
   the NAT should map these to
     (H0'/P0',H1/P1)
     (H0'/P0',H2/P2)
     (H0'/P0',H3/P3)
   such that to an observer outside the NAT, the packets still appear
   to all be coming from the same port.

This property is important for peer-to-peer games, and many other
implementations of NAT (e.g. Nevod's NAT1000) do have this property.

Michael, does your implementation of NAT have this property?

- Dan
p.s. Yes, I know I should go in and hack the code to do this, but
I'm too darn busy...

--
Speaking only for myself, not for my employer