Jump to content

Using A Router To Share Tethered Internet


moyam01
 Share

Recommended Posts

I don't remember exactly which episode i saw darren tether his phone (i think it was his old treo) to a computer and then hook up a router to his laptop's lan port, and was able to share his internet that way. If someone could point me in the direction of the episodes or the necessary commands that would be great.

Link to comment
Share on other sites

I don't remember exactly which episode i saw darren tether his phone (i think it was his old treo) to a computer and then hook up a router to his laptop's lan port, and was able to share his internet that way. If someone could point me in the direction of the episodes or the necessary commands that would be great.

What OS?

Essentially the following:

  1. Tether
  2. Share internet connection.
  3. Hook router up to ethernet
  4. Statically set the routers gateway ip etc to your laptops.

Unless you were to run a dhcp server from your laptop. Then configuration wouldn't be needed.

Edited by GeekGoneCrazy
Link to comment
Share on other sites

Why bother with a router? I tether my droid to my laptop all the time and share it out using my laptop's wifi card.

Cause maybe his other devices don't have wireless?

Link to comment
Share on other sites

I don't remember exactly which episode i saw darren tether his phone (i think it was his old treo) to a computer and then hook up a router to his laptop's lan port, and was able to share his internet that way. If someone could point me in the direction of the episodes or the necessary commands that would be great.

I can't be certain, but I think it was one of these episodes.

http://www.hak5.org/episodes/episode-620

http://www.hak5.org/episodes/episode-619

http://www.hak5.org/episodes/episode-601

Link to comment
Share on other sites

The OS is Debian Linux (Ubuntu for right now). The goal is to be able to share the internet connection with wired and wireless devices. If I use my WRT54g, I can hook up my wired and wireless devices.

The problem I am facing is trying to share the internet on my tethered device. I know you have to modify the ip routing tables so that all traffic that is requested through my NIC goes to the tethered device, but an not clear on what it is exactly that I have to do.

If any of you have tried this and can point me in the right direction that would be great.

Thanks,

moyam01

Link to comment
Share on other sites

The IP tables rule will look something like this:

# iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE

Where 'tun0' is the device that has an internet connection. If you're using wireless tethering you might need 'wlan0' instead of 'tun0'.

MASQUERADE tells it to do NAT for any packets that would be routed out the interface you specified.

(Make sure you have packet forwarding turned on in your kernel or this rule won't do anything useful for you.)

Then next thing you'll probably want to do is setup DHCP on the interface that connect to your "internal" network. The easiest way to do that is with dnsmasq. I'm not going to describe the setup in detail, but it's not hard and you can find plenty of docs/tutorials online. The config file is pretty well documented as well.

Once you have DNS setup and you've done 'ifup' on the interface you're sharing on, just connect to your router's WAN port (set it to DHCP, not PPPoE or any of that) and it will pull an IP (from your laptop) and begin sharing out to the rest of your devices automatically.

Link to comment
Share on other sites

Well I do similar thing all the time, using ubuntu, since its my main OS and i find it easier.

The basic idea is that you tether internet from phone to laptop. And the share it to wireless.

There are a couple of ways to do sharing internet to wireless.

1. If using win7 try connectify, it shares your intenet using internal wifi chip, IF it supports it.

2. Using ubuntu/linux and creating wireless AP from your wlan chip, if it supports it.

3.The way you asked it.

-Connecting router to laptops lan-port and connecting other end to router's WAN "internet" port.

Then depending for OS shomehow share internet from you mobile to that router.

In ubuntu from networkmanager creating new connection and then setting from DHCP "Shared to other computers"

In windows. Well Iv never done it, and I don't currently have windows, but I remember, that you can do it.

Darren explainet in in one episode.

Link to comment
Share on other sites

  • 2 months later...

Sorry for reviving this old thing, but I went through all of the episodes, and it is in episode 412 (12min 24 sec), session hijacking, where darren takes his phone and uses it as a source of internet for jasager. How do I do that in Linux? I tried the GUI share, but there is no shared option for the tethered connection. Will try the iptables suggestion, just wanted to be more specific as to what I wanted if it would help anyone.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...