Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 10-15-2008, 05:51 PM   #1
Registered: Jan 2007
Posts: 151

Rep: Reputation: 30
Internet Connection via Wifi

Hey all!
Well it's been a while since i had to post a request for help i can usually find the answers to my questions by simply browsing this forum, but this one has me stumped!

My Sister lives about 30 yards from me and I'm currently sharing her internet (Which she has allowed me to do, we split the cost) I'm connecting to her via a wireless adapter and this has suited me fine until recently.

I have a 6 year old son who insisted on having a Slackware box in his room so i decided why not! He now wants the internet, the only problem is i cant get a signal in his room. His machine has a built in network card as well as a usb wifi adapter.

I want to give him internet access so I've been scratching my head trying to figure out how i might do this.

My machine has a similar setup to my son's except my WiFi card is internal. I was wondering if the following would be possible:

A: Using my Wifi Card connect to my sister's wireless router (which i am)

B: Connect my Network card to a router

C: Connect my son's pc to my router thereby giving him internet access?

This is probably out of the question but i figured if i was going to find a solution i would find it here!

I am aware of wireless extenders and the likes but due to recent illness my budget is VERY limited. I already have a wireless dsl modem router and I'm sort of hoping that will suffice?

If anyone has any suggestions or has a similar setup i would love to hear from you as any help would be very much appreciated.


The Yikes
Old 10-15-2008, 06:58 PM   #2
Senior Member
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 231Reputation: 231Reputation: 231
I used to do this before I got a dedicated cable router. i used an old ADSL modem/router as an access point and a Slackware box as a router to a cable internet connection. You need top look up iptables, nat, masquerading and linux internet connection sharing.

It's not that difficult and there are online script generators to give you an iptables script to use your Slackware box as a router. There is lots of information on the net about this.

You may need to disable the dhcp and dsl modem facilities on your modem/router but, again, it not too hard to figure out. Your son's machine sets your Slackware box as it's default gateway and this box handles the NAT side of things. Your wireless router just acts as a switch between your son's machine and your Slackware box. Make sure this is on a different channel from you sisters wireless or you may get problems.

Here is a generator by Alien Bob just choose gateway/firewall and fill in the blanks. This is the iptables script you run on your Slackware router machine.
Also I found it easier to keep the network cards on the router box on different subnets so you have one side being your sisters wireless and your Slackware box wireless on one subnet and the wired connection, your wireless router and your sons laptop on anther subnet. You can even set up dnsmasq on your Slackware router to hand out ip's via dhcp, gateway addresses and cache dns requests. Your sons laptop then needs very little setup - seeing as you are only planning on having one client this may be overkill.
Old 10-15-2008, 06:58 PM   #3
Registered: May 2007
Posts: 55

Rep: Reputation: 16
I'm going to take a stab at this though I hope I'm not misdirecting you here.

I just posted this and someone else just posted a few seconds before I did, so it looks like some of the details are there in his (or her) post. But I'll leave this here anyway in case it gives you some ideas.

I think you could do this two ways, though you'll have to work out the details.

1. Network your two PCs, either with a small hub, a crossover Ethernet cable, or a router used as a hub. Use your PC to connect to your sister's modem through her wireless router. I'm thinking of a wired connection here. If you need portability (assuming you might have a laptop) this won't work with a wired connection.

2. Your router, I believe, can be set to be a wireless access point, and connect to your computer with a wired connection. I'm not sure how you do this, but I think it should work. Again, if you need portability on your PC this won't work (unless you have a long cable and don't mind being wired).

3. Add a wireless card to your PC (assuming you have one built in) and set it up as an access point.

I don't know the details, and the devil is in the details. But your general idea can be made to work.

I use Ubuntu and have used it both wired and wireless. Just be sure to use an encryption that will work with your distro of Linux. It may not support some of the newer, fancier ones. I had problems with this and had to not use a pass-phrase to generate the key. Instead, I generated one on a web site for non-Apple computers (I think Apple uses a different pass-phrase generator algorithm) and used the hexadecimal string to manually enter it into all of my networking stuff, including Windows, Linux, and my router. Only then would it work properly.

Your mileage may vary, of course, and I'm sorry I can't be more specific since I haven't experimented with your intended setup. I have used Windows Internet Sharing and Starfish Internet Sharing (both similar but Starfish was easier to set up) and that allowed one computer hooked to the Internet (dial-up) to act as a gateway for the other PC connected. It worked like a charm.

If you are successful, please post back here so I can read what you did and how well it worked for you. Also, where you got the specifics of what you needed to do.


Last edited by t2000kw; 10-15-2008 at 07:10 PM.
Old 10-15-2008, 07:15 PM   #4
LQ Newbie
Registered: Sep 2006
Posts: 2

Rep: Reputation: 0

They are a couple of things you can do.

1. You can use your Linux box as a getway for your network.

basically you will need to check if you Kernel has all of the required option. modify you firewall, enable ip forwarding and create new routing table rules. for detailed instructions

2. Extend the rang of your son's wireless range.

Take a beer can and cut it in half, place the beer can in front of the antenna, so that the antenna is surrounded by the beer can. now use the beer can to direct the signal. You can get a extension cable and place the antenna on a window or even outside -- of course cables are expensive.

3. This option is almost the same as the first. get a wireless router and set it up as a getway. Not every router will work for this, I have a friend that used a belkin router and it worked great, but belkin routers are pieces of shit


Last edited by volution; 10-15-2008 at 07:24 PM. Reason: add something I forgot
Old 10-15-2008, 07:55 PM   #5
LQ Newbie
Registered: Mar 2007
Posts: 2

Rep: Reputation: 0
Looking through the forums I found this posting that was trying a similar feat.

It is a bit old - but principles still apply

I don't know if the writers are still active
Old 10-16-2008, 02:48 AM   #6
LQ Guru
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
It sounds plausible, you can actually use your Linux box as a router. I did this about a year ago and wrote how I did it here:

If that doesn't work try one of the tutorials in the tutorials section, for example:
but it seems like overkill to me, you don't need to do all that.

However, know that if you use your Linux box as a router, you'll have to keep that machine on whenever the connected one needs internet, so it may in many cases be better to just use a router if you have one.

Last edited by H_TeXMeX_H; 10-16-2008 at 02:49 AM.
Old 10-16-2008, 11:02 AM   #7
Registered: Jan 2007
Posts: 151

Original Poster
Rep: Reputation: 30
Internet connection sharing

Hey guys!
Sorry for the delay in getting back to you. Thanks So much for all the responses I'm going to try each one until i get it to work. I'll be back in my house in about an hour so I'll try it then and let you all know how i get on!

Thanks again to you all

The Yikes



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
obtain wireless internet connection on FC5 with Belkin54g WiFi router crmpicco Linux - Wireless Networking 3 05-21-2007 03:28 PM
HOW TO share I internet connection through wifi?? piggyaugu Linux - Newbie 4 07-03-2005 12:22 AM
connected to wifi network but no internet connection? mr.gizm0 Linux - Wireless Networking 3 03-21-2005 03:07 AM
internet connection through wifi Hotfeet Linux - Wireless Networking 4 12-04-2004 12:09 AM
Internet access through router and wifi connection caudalie Linux - Wireless Networking 3 01-22-2004 03:51 PM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:09 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration