Most Android devices can tether their own mobile data to a PC using USB, Wi‑Fi or Bluetooth. The opposite direction—sending a PC’s internet connection to the phone—is called reverse USB tethering. It’s handy when you are on a wired network, have a limited mobile data plan, or need a more stable connection for apps that struggle with Wi‑Fi.
Android does not provide a built‑in UI for this, but the platform’s developer tools (ADB) and a small helper program make it possible without rooting. This guide shows two approaches:
gnirehtet, an open‑source proxy that works on Windows, macOS and Linux.iptables and usb0 interface for users who already have root access.gnirehtet ("tethering" spelled backwards) creates a VPN‑style tunnel from the phone to the PC. The phone thinks it is connected to a VPN, while the PC forwards all traffic.
Go to the official GitHub releases page (https://github.com/Genymobile/gnirehtet/releases) and download the archive that matches your OS (Windows, macOS or Linux). Extract the folder; you will see two files:
gnirehtet.exe (or just gnirehtet on macOS/Linux)gnirehtet.apkKeep the folder handy – you will run the executable from a command prompt.
Connect the phone to the PC via USB. Open a terminal (or Command Prompt) in the folder you extracted and run:
adb install -r gnirehtet.apk
The -r flag replaces any previous version. You should see Success. If you get INSTALL_FAILED_OLDER_SDK, your Android version is older than the minimum supported (API 21). In that case, you’ll need the rooted method.
From the same folder, launch the executable:
# Windows
gnirehtet.exe run
# macOS / Linux
./gnirehtet run
The tool will ask you to allow a VPN connection on the phone. Accept the prompt. You should see a short log like:
Starting gnirehtet server…
Device connected, forwarding traffic…
At this point, the phone routes all network traffic through the PC. Open a browser on the phone – you should see the same pages you can access on the PC.
On the phone, go to Settings > Network & internet > Wi‑Fi. The Wi‑Fi may stay enabled, but the active network will show a VPN icon. To double‑check, open a terminal app (e.g., Termux) and run:
ping -c 3 8.8.8.8
If you receive replies, the tunnel works. You can also visit https://www.whatismyip.com/ to see that the IP address matches your PC’s public IP.
Because gnirehtet uses a VPN interface, any existing VPN apps on the phone will be disabled while the session is active. Remember to stop gnirehtet when you no longer need reverse tethering:
# Windows
gnirehtet.exe stop
# macOS / Linux
./gnirehtet stop
If you already have root, you can set up a more “native” reverse tethering that does not rely on a VPN. This method creates a usb0 network interface on the phone and forwards traffic via the PC’s Ethernet.
On a Linux PC, you need iptables and dnsmasq. Install them if missing:
sudo apt-get install iptables dnsmasq
Enable IP forwarding:
echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward
Set up a NAT rule that forwards traffic from the USB interface (usually usb0 on the phone side, but on the PC it appears as enp0s20f0u1 or similar). Identify the interface with ifconfig or ip a. Replace usb0 in the commands with the actual name.
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
sudo iptables -A FORWARD -i eth0 -o usb0 -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i usb0 -o eth0 -j ACCEPT
Start a lightweight DHCP server for the USB interface:
sudo dnsmasq --interface=usb0 --dhcp-range=192.168.42.2,192.168.42.254,12h
Connect the phone via USB and open a root shell (e.g., using adb root if your build allows it, or a terminal app with su).
adb shell
su
Create the usb0 interface and assign an IP address that matches the PC’s DHCP range:
ifconfig usb0 192.168.42.10 netmask 255.255.255.0 up
Add a default route pointing to the PC (replace 192.168.42.1 with the PC’s IP on the usb0 network):
route add default gw 192.168.42.1 dev usb0
Set DNS servers – you can use Google’s public DNS for testing:
setprop net.dns1 8.8.8.8
setprop net.dns2 8.8.4.4
On the phone, open a terminal and ping the PC’s USB address:
ping -c 3 192.168.42.1
If you get replies, the link layer works. Then try an external address:
ping -c 3 8.8.8.8
Success means reverse tethering is functional. Browse the web to confirm.
Manipulating iptables and network interfaces can break connectivity if you mistype a command. Keep a backup of your original iptables rules with sudo iptables-save > ~/iptables.backup so you can restore them later (sudo iptables-restore < ~/iptables.backup).
gnirehtet.exe (Windows) or allow the listening port (default 31416) on macOS/Linux.net.dns1 property; you can also edit /system/etc/resolv.conf if your ROM respects it.Use the no‑root gnirehtet method if you:
Opt for the rooted iptables method if you already have a rooted device and want a solution that works without a persistent VPN, which can be useful for apps that block VPN connections.
Reverse USB tethering gives you the flexibility of a wired internet connection on a mobile device without consuming cellular data. By following the steps above you can set it up in minutes, either with a lightweight, no‑root helper or with a more integrated, rooted configuration. Remember to stop the service when you’re done, and keep your ADB tools up to date for the smoothest experience.









