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:
- Firewalling on your PC after the change.
- From the outside
- From the WLAN
- Forwarding packets across the PC
- Re-configuring (C)
- 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.