Solved

Network setup with ADSL

Posted on 2003-10-30
7
722 Views
Last Modified: 2010-04-11
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
0
Comment
Question by:dudup
7 Comments
 
LVL 9

Accepted Solution

by:
svenkarlsen earned 30 total points
Comment Utility
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
 
LVL 31

Expert Comment

by:rid
Comment Utility
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
 

Author Comment

by:dudup
Comment Utility
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 31

Assisted Solution

by:rid
rid earned 20 total points
Comment Utility
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
 
LVL 7

Expert Comment

by:Focusyn
Comment Utility
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
 
LVL 7

Expert Comment

by:Focusyn
Comment Utility
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
 

Assisted Solution

by:juanmamerino
juanmamerino earned 25 total points
Comment Utility
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

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Data center, now-a-days, is referred as the home of all the advanced technologies. In-fact, most of the businesses are now establishing their entire organizational structure around the IT capabilities.
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now