Network setup with ADSL

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. This works fine before.

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? Should I setup any gateway in the modem pointed to the linux box?

Please help me.

Thanks
dudupAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

svenkarlsenCommented:
I will never discourage anyone from getting their hands dirty by poking around inside linux, - it's great fun.

I also believe that people should do things the easiest way, so I have to suggest that you consider getting a cheap router which will make it all much easier for you ;-)

But, - if you are determined, here is a link to a really nice step-by-step HOWTO:

http://www-jerry.oit.duke.edu/linux/HOWTO/ipchains_with_adsl_v62.html

Have fun!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ridCommented:
The modem can do NAT, you say. Is this in fact a modem/router combination?
You need to clarify if you are using DHCP for your ISP connection or if you have a static IP.
If you are on DHCP, your modem/router settings must be adjusted accordingly. For example, if you
set up a Linux-based router, the eth0 (outside NIC) should be set to use DHCP, while the eth1 should
be set to an IP consistent with  your LAN address space (192.168.X, if that is what you use).

Before doing too much work here, find out what that modem really does.
/RID
0
dudupAuthor Commented:
Yes, the modem(router) has static IP in its serial connection (ADSL).

What I still confused is, should I set any gateway address in modem:serial, modem:eth and linux:eth0, linux:eth1 ? to where?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

ridCommented:
You need to clarify if the modem is indeed also a router.

If "yes", you set the outside part of the router to your assigned IP.
You se the inside of the router to an IP that is within your LAN address space.
You set your other machines to use this "inside" address as Gateway

If "no", you don't do anything with the modem. You set whatever unit is on
the inside of the modem to your assigned IP.
If you hook up a router of any description to the modem, you set this router's
outside to your assigned IP, and its inside to an IP within your LAN address space.
As said above, you seet your other nodes to use the router's inside IP as Gateway.

/RID
0
FocusynCommented:
For the linux machine, the gateway should be set to the lan address of the modem.  For all other machines, the gateway address will be the LAN address of eth1.
0
FocusynCommented:
i.e., in your current config, linux gatway would be 10.0.0.1 and all machines on lan would be 192.168.0.0
0
juanmamerinoCommented:
You have had a good idea but let me explain how to complete it.

Setup your router as simple DSL modem, it will work as a DCE or as a layer 2 equipment and setup your WAN IP configuration on the outside Linux NIC. Then your linux will has you ISP public IP Address on his outside interface.
The idea is that your router will be like a modem, but a dsl modem giving with no IP, as happens ondial-up connection where you setup your ISP information on the box and not on the modem.

Now you should setup NAT (and some firewall software too is recommended in this case) to map your public ports on that interface to each server in your LAN.

How to setup the router in this way (as a bridge) depends on every router and model but as far as I know every router lets you setup de router as a "modem".

Regards,

Juanma Merino
Barcelona
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Networking

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.