A networking question

Here is the situation:

* I have an ADSL modem which has an ethernet port.
* You can put an IP in that eth port.
* You can also put Network Address Translation (NAT) in that modem.

So, in current usage, I set the eth ip address 10.0.0.1 (255.0.0.0), and it connected to a HUB.

In the local area network (LAN), every machine will use 10.0.0.1 as the gateway.

I run several servers also in the LAN, e.g. mail server, imap, pop3, and web.

I setup all necessary NAT rules for all those servers in the modem.

The problem is, for some strange reason, the NAT disappeared! This happened several times.

Now, I plan to move those NAT in a linux box using iptables.

I will install a linux box with 2 network card :
- eth 0 --> 10.0.0.2 (255.0.0.0)
- eth 1 --> 192.168.0.0 (255.255.255.0)

I will connect modem:eth with linux:eth0, using cross over cable.
I will delete all NAT in the modem.

But then I dont know the rest, I meant how should I configure the NAT in the linux box?

Will this plan work?

Please help me.

Thanks

 

 

 

 

Top