Reverse-Tethering (Computer to Mobile): Use PC internet to the Android phone without any wi-fi adapters
Are you still googling on how to use LAN / PC internet in your android device with USB cable..
Note : This is for Only for Linux distros and rooted android devices.
Now read on,
Here step by step,
>Connect USB cable to the PC from Device
>Turn on the tethering/ HotSpot on your android device ( Goto Settings>More settings> Tethering and Portable Hotspot > Enable )
>Now open terminal in your Linux ( Mint, Ubuntu, Debian, etc., any distribution of Linux) Os
>Type ifconfig usb0

It should show like as above, If not Type ifconfig usb1.
Then go for next step ::
Now set an IP to listen with subnet mask 255.255.255.0 ,
For ex : Type ifconfig usb0 100.100.100.254 netmask 255.255.255.0

Now try to check whether it is configured not by pinging to given IP.

Type ping 100.100.100.254
now type the command
echo 1> /proc/sys/net/ipv4/ip_forward

and type two more commands like
iptables -t nat _F
iptables -t nat -A POSTROUTING -j MASQUERADE

Now open terminal emulator in your rooted android device ( download it from playstore if you dont have )
type su -
to run it as root
Next , type
netcfg rndis0 dhcp
>then type as below
ifconfig rndis0 100.100.100.253 netmask 255.255.255.0 route add default gw 100.100.100.254 dev rndis0

ThatsAll ! Open browser and use Internet.
Note : This is for Only for Linux distros and rooted android devices.
Now read on,
Here step by step,
>Connect USB cable to the PC from Device
>Turn on the tethering/ HotSpot on your android device ( Goto Settings>More settings> Tethering and Portable Hotspot > Enable )
>Now open terminal in your Linux ( Mint, Ubuntu, Debian, etc., any distribution of Linux) Os
>Type ifconfig usb0
It should show like as above, If not Type ifconfig usb1.
Then go for next step ::
Now set an IP to listen with subnet mask 255.255.255.0 ,
For ex : Type ifconfig usb0 100.100.100.254 netmask 255.255.255.0
Now try to check whether it is configured not by pinging to given IP.
Type ping 100.100.100.254
now type the command
echo 1> /proc/sys/net/ipv4/ip_forward
and type two more commands like
iptables -t nat _F
iptables -t nat -A POSTROUTING -j MASQUERADE
Now open terminal emulator in your rooted android device ( download it from playstore if you dont have )
type su -
to run it as root
Next , type
netcfg rndis0 dhcp
>then type as below
ifconfig rndis0 100.100.100.253 netmask 255.255.255.0 route add default gw 100.100.100.254 dev rndis0
ThatsAll ! Open browser and use Internet.
Comments
Post a Comment
feel free to give feedback