Koozali.org: home of the SME Server

Legacy Forums => Experienced User Forum => Topic started by: Graham Harris on November 06, 2002, 04:16:57 AM

Title: NAT x 2 ???
Post by: Graham Harris on November 06, 2002, 04:16:57 AM
This question probably comes under Networking 101 but as I am using SME 5.5 I thought I could get away with asking it here.

Six months ago I had my SME box set up as my gateway/server through my cable modem, everything was cool.  Then I bought a DLink DI-713P
Wireless Gateway so I changed my SME box to server only and plugged it into the DI-713P, easy.

Now I would like to put the SME sever BETWEEN my DI-713P and my "desktop" network, for caching (squid) purposes etc..

I only have one IP number assigned by my ISP.

I assume I set eth0 (static 192.168.0.2) up to connect to the DI-713P (static 192.168.0.1) and then eth1 as 192.168.1.1

Then I set my user computers (all 2 of them) up to get IP's from the SME box (say 192.168.1.2 and .3).

Will this work?

In effect, can I use NAT from the desktop to the SME server and then a separate NAT to the DI-713P?

Does my question make sense?  More info avail on request.....

This info may be 'out there' but I don't even know what to search for.

Thanks,

Graham
Title: Re: NAT x 2 ???
Post by: Steve on November 06, 2002, 08:43:57 AM
I personally did this on a test network with 5 computers.  I had a NAT router (192.168.0.1) which connected to the first hub with computers.  They were assigned NAT'd IP's from the router (192.168.0.x).  I then setup SME as one of the computers on that hub which was assigned the static IP of (192.168.0.2).  The second network card (setup as 192.168.1.1) in the server connected to my laptop which I used to test the server, which was assigned (192.168.1.2).  

Everything worked fine.  I had setup it up to test SquidGuard, therefore I used the Squid proxy, which worked normally.  The setup can just get confusing if you get too many NAT's!  I have another computer and router that I may use tob try to add a 3rd  NAT on my network.  It should work okay, but performance may eventually become an issue.  The only real limitation is probably the amount of ports on the public IP which NAT uses to masq the internal network(s).

I didn't test it, but you probably need to make sure your subnets are 255.255.255.0 because a subnet such as 255.255.0.0 might cause a problem with SME not knowing where to route traffic.

Hope this helps!
Title: Re: NAT x 2 ???
Post by: Graham Harris on November 07, 2002, 01:14:00 PM
Thanks Steve,

It sounds like it is worth the grovelling around on the floor and in the cupboard this weekend to give it a shot.

I will be nice to have a cache so that when I download 5.6 and mess it up at 99% I wont have to d/l the whole thing again.....

Graham

Steve wrote:
>
> I personally did this on a test network with 5 computers.  I
> had a NAT router (192.168.0.1) which connected to the first
> hub with computers.  They were assigned NAT'd IP's from the
> router (192.168.0.x).  I then setup SME as one of the
> computers on that hub which was assigned the static IP of
> (192.168.0.2).  The second network card (setup as
> 192.168.1.1) in the server connected to my laptop which I
> used to test the server, which was assigned (192.168.1.2).
>
> Everything worked fine.  I had setup it up to test
> SquidGuard, therefore I used the Squid proxy, which worked
> normally.  The setup can just get confusing if you get too
> many NAT's!  I have another computer and router that I may
> use tob try to add a 3rd  NAT on my network.  It should work
> okay, but performance may eventually become an issue.  The
> only real limitation is probably the amount of ports on the
> public IP which NAT uses to masq the internal network(s).
>
> I didn't test it, but you probably need to make sure your
> subnets are 255.255.255.0 because a subnet such as
> 255.255.0.0 might cause a problem with SME not knowing where
> to route traffic.
>
> Hope this helps!