LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-14-2008, 08:42 AM   #1
fmpfmpf
LQ Newbie
 
Registered: May 2008
Posts: 25

Rep: Reputation: 15
Laptop as a router


i am using Ubuntu 7.04.
How do i setup my laptop to function as a wirelss router?
So that other laptop can receive signal from the 1st laptop and connect to the internet.

thank you very much
 
Old 05-14-2008, 09:57 AM   #2
Caeda
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Suse 6.0+, Mandrake 5.0-10.0, Redhat 6.0-9.0, Gentoo 1.2+, Gnoppix, Knoppix, Sabayon, Ubuntu 5.04+
Posts: 1,811

Rep: Reputation: 45
Short answer... You dont, you go spend the 15$ a cheap router would cost and use it to share the internet and not have headaches for the rest of your surfing days.

If your avoiding the router cause you have dial-up... Forget it. Dial-ups to crappy and slow to mess around with all the fuss setting it up. It also violates the terms of service for every dial-up carrier I've ever seen. They all say ONE computer at a time.

Other than that. You'd be creating an ad-hoc network if the network cards are capable. And one computer would have to be running properly configured proxy software to share the net.

I could go into severe details on how to create the ad-hoc and which proxy software and how to config it but...
Out of curiosity I typed just 2 words into google and got no less than 25 threads on ubuntu forums, just-linux.com and a few other sites in which people have literally beaten this topic into the ground with ways to do it, so it's ridiculous to type it again here.
 
Old 05-14-2008, 10:05 AM   #3
ncsuapex
Member
 
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770

Rep: Reputation: 43
^ seconded!

Buy an inexpensive wireless router/Access Point and put your laptop to a better use. Make a music server or a digital picture frame or anything.. There are TONS of better ways to utilize that old laptop than turning it into a router.
 
Old 05-14-2008, 10:35 AM   #4
pentode
Member
 
Registered: Dec 2005
Location: Oregon
Distribution: Debian Testing
Posts: 488

Rep: Reputation: 38
Thirded! Just because it is possible to do something doesn't mean it makes any sense to do it. If you just want to do it as a "learning experience", then there is no point in having someone here tell you how to do it - you can dig up the necessary info yourself.

I've done something similar exactly ONCE in order to do a one-time net install of Debian on an old system. It was much more trouble than it was worth. Also, not all network card drivers are capable of doing what you want.
 
Old 05-14-2008, 11:17 AM   #5
knockout_artist
Member
 
Registered: Sep 2005
Distribution: fedora core 9
Posts: 324

Rep: Reputation: 33
I give you a scenario.

wireless router is upstairs. I have no cable access there.
When I need to install linux it need internet access which I can't provide.
I have tried putting wireless router in my room attach cable to it.
But it wont work like a router on a wireless link.

It doesn't consider wireless link as "UP LINK".
So it doesnt forward traffic to router up stairs.
 
Old 05-14-2008, 04:55 PM   #6
OdinnBurkni
Member
 
Registered: Feb 2007
Location: Iceland
Distribution: Fedora 14, CentOS, FreeNAS
Posts: 127

Rep: Reputation: 20
Wireless repeater

Hello.
I know that some wireless access point can act as a repeater. At least some of the DLink AP's are. I remember DLink DWL-900 and DWL-2000 could do that.
 
Old 05-15-2008, 01:38 AM   #7
fmpfmpf
LQ Newbie
 
Registered: May 2008
Posts: 25

Original Poster
Rep: Reputation: 15
i just need a laptop to function as a router to test my WLAN card.
it aint worth investing €15 on something which i will only use 1x
 
Old 05-19-2008, 04:06 AM   #8
fmpfmpf
LQ Newbie
 
Registered: May 2008
Posts: 25

Original Poster
Rep: Reputation: 15
simple wireless router & ip command

i am using Ubuntu 7.10

i have 2 laptops, A and B, both with WLAN cards.
A is connected to the internet through an ethernet cable.
how can i make A function as an access point so that B can receive the signal from A and surf the internet?

i use "Create New Wireless Network", but it keeps failing. It just reverts back to itz wired connection.

p/s - pls DONT ask me to buy a new router

thank you.
 
Old 05-19-2008, 05:51 AM   #9
fmpfmpf
LQ Newbie
 
Registered: May 2008
Posts: 25

Original Poster
Rep: Reputation: 15
Additional niformation : you can say that i want to turn my laptop into a wireless hotspot
 
Old 05-19-2008, 06:00 AM   #10
ddaemonunics
Member
 
Registered: May 2008
Location: Romania
Distribution: Debian
Posts: 242

Rep: Reputation: 41
You must first check if the wireless card suports AP mode or "master mode" and if so enable it and configure.
Then all you have to do is enable forwarding between the ethernet and the wireless card.

check gentoo-wiki.com/HOWTO_Building_a_Wireless_Access_Point
 
Old 05-19-2008, 07:28 AM   #11
fmpfmpf
LQ Newbie
 
Registered: May 2008
Posts: 25

Original Poster
Rep: Reputation: 15
it has AP mode.
So what procedure whould i take?

thank you
 
Old 05-19-2008, 07:47 AM   #12
fmpfmpf
LQ Newbie
 
Registered: May 2008
Posts: 25

Original Poster
Rep: Reputation: 15
siple wireless router

i am trying to link 2 comps using Ad-Hoc.
http://www.wlug.org.nz/WirelessSetupNotes

Ad-Hoc Mode
Mode: Ad-Hoc
Channel: 6
ESSID: wlug-test
Network: 10.10.10.0/24, this computer will be 10.10.10.1, Remote Computer will be 10.10.10.254

The above is and example for a step. My question is, how do i determine my Network values?

thank you
 
Old 05-19-2008, 08:01 AM   #13
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,072

Rep: Reputation: 384Reputation: 384Reputation: 384Reputation: 384
Quote:
Originally Posted by fmpfmpf View Post
i am trying to link 2 comps using Ad-Hoc.
http://www.wlug.org.nz/WirelessSetupNotes

Ad-Hoc Mode
Mode: Ad-Hoc
Channel: 6
ESSID: wlug-test
Network: 10.10.10.0/24, this computer will be 10.10.10.1, Remote Computer will be 10.10.10.254

The above is and example for a step. My question is, how do i determine my Network values?

thank you
If I understand correctly what you need is to locate the IP for each machine. There are a number of tools to do so. I bet your distro has some kind of graphical tool to set up the network and they IP's should be visible somewhere around there.

In any case, you could also use ifconfig, which is a command line tool.

Log in as root user on a terminal or vt, and run ifconfig. It should work all the network interfaces available on the machine along with their IP direction.
 
Old 05-19-2008, 12:30 PM   #14
ddaemonunics
Member
 
Registered: May 2008
Location: Romania
Distribution: Debian
Posts: 242

Rep: Reputation: 41
well I posted a link:
gentoo-wiki.com/HOWTO_Building_a_Wireless_Access_Point
Try to get the info you need from there. It's very easy to follow
 
Old 05-19-2008, 12:37 PM   #15
ddaemonunics
Member
 
Registered: May 2008
Location: Romania
Distribution: Debian
Posts: 242

Rep: Reputation: 41
It realy deppends on your distribution and the tools you use to configure.
I guess you use iwconfig.
If you have the right drivers and the card is working properly by using iwconfig you can enable master mode and the other options:
check out this link .
linuxcommand.org/man_pages/iwconfig8.html
see iwconfig mode options.

if the card is configured correctly
set the IP adresses for the ethernet and the wireless card,
enable ip forward
echo "1" > /proc/sys/net/ipv4/ip_forward
set the policy to allow forward traffic
/sbin/iptables -P FORWARD ALLOW
enable masquerade for the wlan card
/sbin/iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
 
  


Reply


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
Command to start Wireless KOTAPAKA Linux - Wireless Networking 3 03-01-2008 11:50 AM
wireless linux via command line Four Linux - Newbie 1 12-27-2006 10:27 PM
Running wireless command on boot RoiSoleil14 *BSD 2 03-05-2006 07:22 PM
Can't activate wireless card from command line jdrietz Slackware 21 02-01-2006 11:57 PM
forgot the wireless config command... ronsha Linux - Wireless Networking 5 11-18-2005 05:49 PM


All times are GMT -5. The time now is 02:48 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration