LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-21-2007, 10:27 PM   #1
kuratkull
LQ Newbie
 
Registered: Jul 2004
Location: Estonia
Distribution: Debian Etch
Posts: 18

Rep: Reputation: 0
LAN in Debian


Hello,

My network connection was like this:

................................................PC(with cable)
.............................................../
Internet-Cable Modem-WiFi Router
...............................................\
................................................Laptop(Wifi)

Everything was working fine, but I want to route all the traffic from the Cable mdoem through my PC and then to the router.

I have two NIC's, so I only need help with configuration. I have read tutorials on the web, but they haven't given a sufficient answer.

Thank you.

Last edited by kuratkull; 01-21-2007 at 10:29 PM.
 
Old 01-22-2007, 09:21 AM   #2
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Hint -- Put ASCII art in 'code' blocks.

If I understand you correctly, this is what you have:
Code:
                           \              /                     +--------+  
(^^^^^^^^^^)   +-------+    \            /  ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | Laptop |
( Internet )===| Cable |   +--------------+   +------------+    | (Wifi) |
(          )   | Modem |---|up   WiFi   dn|---|eth0  (eth1)|    +--------+    
 vvvvvvvvvv  A +-------+ B |    Router    | C |     PC     |  D
                           +--------------+   +------------+
and this is what you want, w/ the PC & the Router swapping places:
Code:
                                            \              /     +--------+  
(^^^^^^^^^^)   +-------+                     \            /  ~ ~ | Laptop |
( Internet )===| Cable |   +------------+   +--------------+     | (Wifi) |
(          )   | Modem |---|eth0    eth1|---|up   WiFi (dn)|     +--------+       
 vvvvvvvvvv  A +-------+ B |     PC     | C |    Router    |  D
                           +------------+   +--------------+
You have the 2nd NIC for the PC, & I assume you know how to do the cabling, so let's consider the configuration.

Your biggest problems, in approximate order of diffculty:
  1. Firewalling on your PC after the change.
    1. From the outside
    2. From the WLAN
  2. Forwarding packets across the PC
  3. Re-configuring (C)
  4. Re-configuring (B)
Because of 1., I would not do what you are suggesting w/o putting a NAT'ing router or firewall (I use SmoothWall Express 2.0) between my LAN & the outside world. Furthermore, when I do turn my WLAN on, it also is connected through my "Smoothie".

I presume you understand the consequences & can do the necessary firewalling.

Item 2. is easy, but often overlooked. The command is:
Code:
echo 1  > /proc/sys/net/ipv4/ip_forward
You must either run it manually or put it in an appropriate start-up script.

If you are lucky, both B & C are currently using DHCP, the Cable Modem & the Router acting as servers, while the Router & the PC are the respective clients. Also C & D are configured as separate private networks, say 192.168.142.0 & 192.168.127.0. If so, you need only restart the DHCP clients, if necessary by re-booting.

On the other hand, if either your ISP requires PPPoE, or you are using static IP's on your LAN, (or both); things are more complicated. The bad news is, I don't do either of those, so I can't help much with them. The good news is, you probably have been through setting them up & may remember how.

One last piece of good news: there should be no need to change D -- it has been moved intact.
 
  


Reply

Tags
art, ascii, asciiart, diagram, router



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
lan in debian alokagrawal General 1 09-13-2006 04:30 AM
LAN with Debian and Linux Al-xkon Linux - Networking 2 06-10-2006 03:24 PM
Can I netinstall Debian from a Lan? fcdev Debian 1 09-21-2005 08:20 AM
Slow LAN with Debian muxman Linux - Networking 2 05-02-2004 11:14 PM
HELP : Internet on Debian through LAN/PROXY ashutosh Linux - Networking 3 04-06-2001 09:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:02 PM.

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