LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (https://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   Connecting PC to router through another PC (https://www.linuxquestions.org/questions/linux-wireless-networking-41/connecting-pc-to-router-through-another-pc-331876/)

freek sanders 06-09-2005 09:54 AM

Connecting PC to router through another PC
 
I have a wireless network at home, but am trying to add a wired part to it.

The setup which I want is the following:


PC 2 (wireless) ----------- PC 3 (wired to PC 2)
^
^
^
^
www - wifi-router ---------- PC 1 (wired)


I already have alle the materials, and de router, PC1 and PC2 are connected to the (inter)net.

My question is, how do I get PC 3 to make a connection through PC 2 to the (inter)net ? Does anyone have a link to a guide or tutorial for this?

The problem is that most tut's on internet assume that you want to setup a router on your linux PC. However I don't, cause I already have a DHCP router.

More:

PC 2 - Has Debian Testing installed with a custom 2.6 kernel. Has one wireless card configured using Ndiswrapper, and one normal ethernet card. This PC will also serve as web/mail server.

PC 3 - Will have both debian and windows installed. Has one ethernet card.

ReefShark 06-09-2005 03:29 PM

I think you can do several things... install a proxy on PC2 and point PC3 towards it.
You can also use a NAT setup on PC2 with iptables. There are a few front-ends for iptables out there, check the packagelist of your distro of choice. Might take some reading, trail and error, but it is certainly doable.

Googled list of iptables tutorials
Some firewall software @ Gentoo (but probably also available for your distro.

Hope this helps ;)

freek sanders 06-13-2005 06:56 AM

I tried, but couldn't get it to work. I followed a proxy tutorial on http://www.aboutdebian.com/proxy.htm

However, the connected PC3 (running a Knoppix CD) keeps saying " Network is unreachable". :confused:
Tutorials on proxy's and gateways are easy to find, but the main problem is that they handle a situation without an existing router.

Could you please help me further.


------------------------------------------

A ifconfig on PC2 gives:

eth0 Link encap:Ethernet HWaddr 00:0C:6E:CC:22:FB
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:21 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6336 (6.1 KiB) TX bytes:0 (0.0 b)
Interrupt:22 Base address:0x8000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:193 errors:0 dropped:0 overruns:0 frame:0
TX packets:193 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:12756 (12.4 KiB) TX bytes:12756 (12.4 KiB)

wlan0 Link encap:Ethernet HWaddr 00:0C:41:61:A9:A4
inet addr:192.168.1.102 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:68598 errors:0 dropped:0 overruns:0 frame:0
TX packets:43141 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:94315342 (89.9 MiB) TX bytes:3712825 (3.5 MiB)
Memory:e6000000-e6001fff



------------------------------------------------


/etc/network/interfaces:


# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface

# wireless connection
auto wlan0
iface wlan0 inet dhcp
wireless-essid linksys
wireless-mode Managed
wireless-keymode restricted
wireless-key1 7E68AF8C40E23E6BA7C71A13E7
wireless-defaultkey 1


auto eth0
iface eth0 inet static
# dhcp
name Ethernet LAN card
address 192.168.0.1
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255

ReefShark 06-15-2005 03:00 PM

Considering PC3 is giving you greef as I understand it, I would like to see the ifconfig and other network config of that particular box. Perhaps the problem can be found over there ;)

Now that I think of it, post the
# routed
output of both systems too please :study:

Hope that gives me the info to help you get to the root of the problem.

freek sanders 06-16-2005 03:10 AM

I solved the problem. I had to add the eth0 interface to my knoppix environment.

Also I tried another tutorial, which was clearer and did work. (The tut was on nedlinux.nl, a dutch site)

Thanks for your help. Iptables were the answer.

ReefShark 06-16-2005 03:23 PM

Quote:

Originally posted by freek sanders
I solved the problem. I had to add the eth0 interface to my knoppix environment.

Also I tried another tutorial, which was clearer and did work. (The tut was on nedlinux.nl, a dutch site)

Thanks for your help. Iptables were the answer.

Iptables is often THE answer :D
Thanks for posting that nedlinux.nl website, that was a bookmark moment for me ;)


All times are GMT -5. The time now is 11:44 AM.