LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 12-27-2010, 07:12 PM   #1
cmd16
LQ Newbie
 
Registered: Dec 2010
Posts: 3

Rep: Reputation: 0
sharing internet connection, using my desktop as a wifi hotspot


hello. this is my first time posting in a forum, sorry if i'm being stiff. i'll try to post as much information as necessary and make clear my objective. also, as to my level of intellect with respect to linux, i hopefully see myself as leaving the newbie stage.

i have two computers:
- one is my desktop, running ubuntu. it has two NIC's one is wired (eth0), the other is wireless (wlan0).
- the other is my laptop, running archlinux. two NIC's as well (eth & wlan).

i would like to connect my desktop to my router via eth0 and connect my laptop to my desktop via wlan0, providing internet access to my laptop. i would like both computers to be able to use the internet simultaneously (not all packets would be forwarded).

any manner of doing this would be ok, but if this is a simple enough task to do it by simply configuring some files (e.g. /etc files) rather than installing some unnecessarily big application, then that would be wonderful!

also, not really as high a priority but if possible, i would like this to perhaps not be limited to my laptop. connecting any device (a psp or pda for example) to the internet this way (making it a hotspot in a sense) would be super! encrypting the connection (WEP for instance) would be ultra-mega!

miscellaneous info:
my desktop uses dhcp to connect to the router, if that helps.

thank you very much in advance and "merry christmas"/"happy holidays"!

p.s. just realized i haven't asked a question... how would i do this?
 
Old 12-27-2010, 07:15 PM   #2
cmd16
LQ Newbie
 
Registered: Dec 2010
Posts: 3

Original Poster
Rep: Reputation: 0
p.s.s.

i don't know a lot about networking protocols or their implementation on linux, so please correct me if i'm wrong, but from what i know i think that to do this i would have to use dhcp to allocate an extra private ip-address (192.168.0.0/16) for every device attempting to connect to the desktop's wlan0. then, the desktop would have to forward the packets it receives with that new allocated ip-address from eth0 to wlan0. i don't know if dhcp can allocate more than one address to a given NIC though. would this be the best solution? how would i do this on linux?
 
Old 12-28-2010, 05:59 AM   #3
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,038

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
This is possible, because, just for fun, I did it once.

I have now forgotten the exact details, but here is the link I used to set it up:
http://lindesk.com/2007/04/internet-...sing-iptables/

In that link he is using forwarding over a wired link, but it'll work just as well over wireless.

You need to use google.com/linux to search on internet sharing

Another link, referencing wireless:
http://www.facebook.com/notes/ubuntu...s/356751763898

Welcome to LQ!
 
  


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
wifi works:how to connect to hotspot,with console?alternative to wifi-wiz assistant? frenchn00b Debian 7 10-30-2009 01:31 PM
Sharing internet connection wifi router -> Fedora 10 -> Xbox 360 biszkhopt Linux - Networking 6 05-26-2009 11:47 AM
linux wifi hotspot right for me? henrikwidth Linux - Wireless Networking 4 05-30-2006 03:06 PM
Sharing dial up connection over WiFi to XP box slackist Linux - Newbie 3 12-28-2005 08:05 PM
Sharing Internet+WiFi+Wired flying_eyes Linux - Wireless Networking 4 10-28-2003 09:07 PM


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