Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 04-20-2007, 07:56 PM   #1
Registered: Jan 2005
Location: OH, USA
Distribution: Ubuntu 6.10 on desktop, debian etch on laptop
Posts: 69

Rep: Reputation: 15
Question Need basic router help (Debian Lenny)

Basically, I have a wireless router and a Debian box that triples as a apache server, desktop, and (hopefully) a router. My "dream" config is below.

---> = Wired connection
- - - > = Wireless Connection

DSL_Modem ---> WirelessRouter - - - > Debian Box ---> Laptop with no wireless

The Debian box gets it's internet right now through wlan0, I want to be able to plug in my laptop / extra router to eth0 and be able to connect to the internet through there. It is my understanding I need to make my own subnet for my laptop / router and then do some IP masquerading. However, all the googling I have done led me to a single floppy router. I need this computer as a desktop too, however.

Any help on how to do this? I did extensive googling with no answers that fit me needs.

Thanks for the help (hopefully ;-) )
-- Nathan
Old 04-20-2007, 08:36 PM   #2
LQ Newbie
Registered: Dec 2004
Posts: 18

Rep: Reputation: 0
Hey Nathan

Couple of questions here:

1. Is your dsl modem and wireless router in a separate location from your laptop, Debian box, and extra router?

2. Is your extra router a wireless router?


I am assuming that question number one is true and your internet connection and systems are in different locations. If your extra router is a wireless router you could make your second router a n access point and plug your Debian box and laptop into the router which would provide internet access to both. If your extra router is not a wireless router then you would want to bridge wlan0 to eth0 on your Debian box.

This is how it would work:

DSL MODEM ----->|Wireless Router|>|Wlan0|Eth0 (statically assigned)

Your dsl modem gives your wireless router a public IP address on the WAN side. Your router also has a privite IP address within your DHCP range, usually ending in ''. Your Debian box picks up an address from your wireless router, lets say and has a default gateway of Now you can staticly assign an IP address to eth0 such as and then give your extra router an ip address of with a default gateway of and you can setup its dhcp range for So your laptop would get an IP address of and a default gateway of You need to bridge wlan0 and eth0 so that they become part of the same network.So basically and example from your laptop would be,

laptop sends request to internet so it first contacts (extra router) which then contacts (eth0) which then decides that it needs to send it onto (wlan0) it then sends it to (wireless router) which then sends it out via the dsl modem.

Here is a link for bridging networks

Hope this helps!
Old 04-21-2007, 10:27 AM   #3
Registered: Jan 2005
Location: OH, USA
Distribution: Ubuntu 6.10 on desktop, debian etch on laptop
Posts: 69

Original Poster
Rep: Reputation: 15
Whoa, thanks for the help! My bridge is all set up and I get internet on my desktop (the bridge), but there's one problem. I tried plugging in the laptop to the router which was plugged into the computer, but I couldn't get any response when I ran "dhclient eth0" on the laptop.

I tried it with the laptop plugged into the computer directly and with it plugged into the router which was then plugged into my computer. No dhcp response both times.

Any ideas? The router's "wan" symbol lights up when it's plugged in, so I assume that it has internet, but no dhcp...
Old 04-21-2007, 11:24 AM   #4
LQ Newbie
Registered: Dec 2004
Posts: 18

Rep: Reputation: 0

Awesome dude! Yup you guessed it on the issue with eth0. Since we statically assigned it we have to give the router a static IP within the same subnet that we gave eth0. Depending on the type of router you have there should be a management interface that you can log into and set the WAN IP address which would be, lets say from above if eth0 is then you would set your WAN IP to,, gateway Then there should also be an option to setup DHCP in the router which you can set the dchp range. Save those settings and then plug your laptop into the router and see if you get an address. So basically all you have left to do is give your router a static WAN IP and setup dhcp and you should almost be there.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Last week Debian Testing is still ETCH or lenny already?? doraimom Debian 1 04-09-2007 06:01 AM
hello Im lenny lenny123 Linux - Hardware 2 06-25-2006 08:04 PM
Why does basic UBUNTU act as a Router with DNS All-in-One Linux - Networking 1 03-01-2006 10:43 PM
Basic NIC/Router Config Casket Linux - Networking 6 07-26-2005 05:54 AM
basic firewall on my router foopirata Linux - Security 2 03-10-2005 03:32 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:27 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration