Tethering inverso¶
This tutorial helps you to connect your Ubuntu Touch device to your computer to access the Internet on it. This is useful if there is no available Wi-Fi connection or you don’t have a data subscription on your Ubuntu Touch device.
Prerequisite: A Ubuntu Touch device with «Developer mode» on, attached via USB to the computer connected to the Internet.
Passi¶
On the Ubuntu Touch device:
android-gadget-service enable rndisOn your computer: get your RNDIS IP address e.g:
hostname -IOn the Ubuntu Touch device:
add a gateway:
sudo route add default gw YOUR_COMPUTER_RNDIS_IPaggiungere nameservers:
echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.confrefresh the DNS table:
resolvconf -uSul PC:
Turn on IP forwarding:
echo 1 | sudo tee /proc/sys/net/ipv4/ip_forwardApply NAT:
sudo iptables -t nat -A POSTROUTING -s 10.0.0.0/8 -o eth0 -j MASQUERADE