Solved

Network setup with ADSL

Posted on 2003-10-30
7
723 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
ID: 9654512
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
ID: 9655682
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
ID: 9655866
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
New My Cloud Pro Series - organize everything!

With space to keep virtually everything, the My Cloud Pro Series offers your team the network storage to edit, save and share production files from anywhere with an internet connection. Compatible with both Mac and PC, you're able to protect your content regardless of OS.

 
LVL 31

Assisted Solution

by:rid
rid earned 20 total points
ID: 9655905
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
ID: 9658767
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
ID: 9658780
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
ID: 9695043
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
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…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

895 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

11 Experts available now in Live!

Get 1:1 Help Now