LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 06-09-2005, 09:54 AM   #1
freek sanders
LQ Newbie
 
Registered: Sep 2004
Posts: 17

Rep: Reputation: 0
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.
 
Old 06-09-2005, 03:29 PM   #2
ReefShark
Member
 
Registered: Oct 2003
Location: the Netherlands
Distribution: Arch Linux, Ubuntu server
Posts: 145

Rep: Reputation: 15
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
 
Old 06-13-2005, 06:56 AM   #3
freek sanders
LQ Newbie
 
Registered: Sep 2004
Posts: 17

Original Poster
Rep: Reputation: 0
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".
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
 
Old 06-15-2005, 03:00 PM   #4
ReefShark
Member
 
Registered: Oct 2003
Location: the Netherlands
Distribution: Arch Linux, Ubuntu server
Posts: 145

Rep: Reputation: 15
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

Hope that gives me the info to help you get to the root of the problem.
 
Old 06-16-2005, 03:10 AM   #5
freek sanders
LQ Newbie
 
Registered: Sep 2004
Posts: 17

Original Poster
Rep: Reputation: 0
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.
 
Old 06-16-2005, 03:23 PM   #6
ReefShark
Member
 
Registered: Oct 2003
Location: the Netherlands
Distribution: Arch Linux, Ubuntu server
Posts: 145

Rep: Reputation: 15
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
Thanks for posting that nedlinux.nl website, that was a bookmark moment for me
 
  


Reply



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
Connecting One Linux Router to Another Mainframe Linux - Networking 6 11-10-2005 11:13 AM
Connecting to my linksys router gbogle Linux - Newbie 3 05-02-2005 09:47 PM
Connecting to Internet using Router oacikgoz Debian 1 10-04-2004 05:02 PM
Connecting to router Falcon 213 Slackware 5 02-16-2003 09:22 PM
Connecting through the router but,.... Jase Linux - Networking 10 01-27-2002 09:38 PM

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

All times are GMT -5. The time now is 03:08 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