public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Guillaume Poulin <poulin.guillaume@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Reverse Tethering - How to?
Date: Fri, 26 Sep 2014 18:24:19 +0800	[thread overview]
Message-ID: <CAB4SSqSyCyb3UaJkT0bJj_ORcGLU-Nxi4DLRDyB2mfyOvUGsQQ@mail.gmail.com> (raw)
In-Reply-To: <1410947632.17613.4@numa-i>

2014-09-17 17:53 GMT+08:00 Helmut Jarausch <jarausch@igpm.rwth-aachen.de>:
> On 09/17/2014 11:50:58 AM, J. Roeleveld wrote:
>>
>>
>> On Wednesday, September 17, 2014 11:46:12 AM Helmut Jarausch wrote:
>> > On 09/17/2014 11:43:28 AM, J. Roeleveld wrote:
>> > > On Wednesday, September 17, 2014 11:24:36 AM Helmut Jarausch wrote:
>> > > > Hi,
>> > > >
>> > > > how do I need to configure my Gentoo box to allow for reverse
>> > >
>> > > tethering
>> > >
>> > > > from my (rooted) Android phone?
>> > > >
>> > > > Many thanks for a hint,
>> > > > Helmut
>> > >
>> > > What do you mean with "reverse tethering"?
>> > > That your mobile uses the network connection of your Gentoo box, or
>> > > your
>> > > Gentoo box the network connection of your mobile?
>> >
>> > My mobile should be able to use the (wired) network connection of my
>> > Gentoo box.
>>
>> Ok, I assumed that was the case, but wanted to be sure.
>>
>> > > Generally, the device sharing the connection needs to play WIFI
>> > > Access Point.
>> >
>> > How to do that on Gentoo?
>>
>> If your Gentoo box has a wired connection and a wireless one.
>> The wired is currently used and the wireless is not.
>> Then you need to get your wireless card to function as an access point.
>> (Google for "Gentoo Linux Howto WIFI Access Point" or similar) and you
>> should
>> find some information on how to do this.
>>
>
> I should have made it more clear.
> My GenToo box doesn't have a wireless card.
> I'd like to connect my mobile to the USB port of my Gentoo box and get
> access
> to the (wired) network.
>
> Thanks,
> Helmut
>
>

I had the same issue. I wrote a small script for that. If my memory is
good, it was working pretty good apart for the google play (don't
remember the reason thou).

```
#!/bin/bash

ifconfig usb0 192.168.42.135 up
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

adb start-server
adb shell su -c '/system/xbin/busybox ifconfig usb0 192.168.42.130 up'
adb shell su -c '/system/xbin/busybox route add -net default gw
192.168.42.135 usb0'
adb shell su -c 'setprop net.dns1 8.8.8.8'
adb shell su -c 'setprop net.dns2 8.8.8.4'
```


  parent reply	other threads:[~2014-09-26 10:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-17  9:24 [gentoo-user] Reverse Tethering - How to? Helmut Jarausch
2014-09-17  9:43 ` J. Roeleveld
2014-09-17  9:46   ` Helmut Jarausch
2014-09-17  9:50     ` J. Roeleveld
2014-09-17  9:53       ` Helmut Jarausch
2014-09-17 10:14         ` J. Roeleveld
2014-09-17 11:34           ` Mick
2014-09-17 11:05         ` Stroller
2014-09-17 11:31           ` J. Roeleveld
2014-09-18 11:41             ` Stroller
2014-09-18 12:57               ` J. Roeleveld
2014-09-18 13:59                 ` Stroller
2014-09-18 14:00                 ` Peter Humphrey
2014-09-17 12:31         ` [gentoo-user] " James
2014-09-17 13:35           ` Mick
2014-09-26 10:24         ` Guillaume Poulin [this message]
2014-09-25 21:40 ` [gentoo-user] " thegeezer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAB4SSqSyCyb3UaJkT0bJj_ORcGLU-Nxi4DLRDyB2mfyOvUGsQQ@mail.gmail.com \
    --to=poulin.guillaume@gmail.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox