[Tech] Using My Laptop as a Wireless Router

Nanor

Well-Known Member
Hey guys,

I've just moved into my new house and set up a pretty bitching computer area. The internet guys came and set us up with decent internet today which is fucking amazing customer service. The problem is that it is a wireless router and I don't have enough ethernet cable length to physically connect my computer to the router. Here's what I have:

  • Desktop computer with Windows 7
  • Ubuntu laptop wirelessly connected to the router
  • An ethernet cable

I was ridiculously optimistic and figured that I could just ethernet cable my PC to my laptop and somehow it would all work but alas that was not the case.

If anyone helps me I am eternally in your debt.

PS. I can switch my laptop to Windows 7 if it makes thing easier.
 

Ronin Storm

Administrator
Staff member
Would 30 metres of cat-5e cable and a box of 6mm cable clips be sufficient to solve this problem?
 

Traxata

Junior Administrator
Nanor, turn one of your network cables into a cross over cable, then plug it into your PC and your laptop.

Then share your 'net connection from laptop to PC.... Job done. :D
 

Ronin Storm

Administrator
Staff member
How would I do that?

Got a crimping tool? No? Thought not. You'll need one when you cut the current connector off in order to crimp a new RJ-45 connector (which you also don't have) in its place with the 4 pairs in a different configuration.

Alternatively, if you're acquiring a crossover cable, you may as well acquire a long ethernet cable.
 

Nanor

Well-Known Member
Well after a bit of fiddling about, ThatBloke's idea has worked a treat. Thanks for googling that for me, TB. Have a cookie. :D

Also, your idea of 30 foot of Cat-5 and paperclips, Ronin... Would that work?
 

Ronin Storm

Administrator
Staff member
30 feet = 10 metres roughly.

30 metres is rather longer, but maybe you only need 10?

Either way, the theoretical maximum for 100Base-T over cat-5e is around 100 metres, though I've never cabled over 60 metres at that spec so I can't vouch for the standard except in that's what I've always been told.

Also, not paperclips. Cable clips. Good ones are semi-circular, snap to the cable just right, and have a single nail attached to the clip to tap into the skirting board or wall. Or you can just let the cable trail loose, but don't trip on it! For neatest results, a clip every 20cm.
 

Haven

Administrator
Staff member
* Buy Longer Cable (simple)
* Move closer to the Router (simple)
* Buy a cheap USB wireless connector for the desktop (simple)
* Buy a wireless bridge (simple)
* Turn the laptop into a NAT router with static ip's or a dhcp server (complex)

Sure you can do the a nat router, but its not something you just throw together without a bit of understanding ...

Here's the bit of understanding assuming you have iptables installed:

#!/bin/bash
$iptables = "/usr/bin/iptables"
$private_subnet = "<subnet you want to run on eth0 on the laptop>"
$public_interface = "<I'll assume wlan0 for most drivers on the laptop>"
$public_ip = "<your wireless laptop ip>"
$iptables -t nat -A POSTROUTING -p all -s $private_subnet -o $public_interface -j SNAT --to-source $public_ip #nat all traffic

No forwarding should be needed on the above so just use default iptables rules and run this as a little bash script. Have fun.
 
Top