USB tethering

USB tethering on Fedora lets you share your Android or iPhone's mobile data connection with your laptop over a USB cable using NetworkManager.

Story / scenario opener

You are on a train and the cabin Wi-Fi drops. You plug your phone into your laptop with a USB-C cable, toggle USB tethering on the phone, and wait. The phone shows the tethering icon. Your Fedora desktop shows a new Ethernet icon in the system tray. You open a browser and get a connection timeout. The cable is good. The phone has data. Fedora just isn't routing the traffic.

What is actually happening

USB tethering does not create a special phone network. It makes your smartphone act like a standard USB Ethernet adapter. The phone creates a virtual network interface on your Linux system. NetworkManager detects the new hardware, assigns it a kernel name, runs a DHCP client to grab an IP address, and adds a default route so your internet traffic flows through the phone.

Android devices usually expose a CDC-ECM or RNDIS interface. The Linux kernel has built-in drivers for both. NetworkManager handles the rest automatically. iPhones use a different protocol called Apple Ethernet. The kernel module is called ipheth. It is not always loaded by default on minimal installs. You need to load it manually or install the supporting userspace tools.

Interface names follow the predictable naming scheme. You will see something like enp0s20u1. The en means Ethernet. The p0s20u1 traces the physical USB port and hub chain. If you unplug and replug into a different port, the name changes. NetworkManager tracks the device by MAC address, not by name, so your connection profile survives the rename.

NetworkManager stores connection profiles in /etc/NetworkManager/system-connections/. These files are user-modified. The default dispatcher scripts and plugin configurations ship in /usr/lib/. Edit /etc/. Never edit /usr/lib/. Package updates will overwrite /usr/lib/ files and break your custom routing rules.

Check the interface state before guessing. Run journalctl -xe first. Read the actual error before guessing.

Setting up Android tethering

Connect the phone with a data-capable USB cable. Charge-only cables will not work. Open the phone settings and enable USB tethering. Wait ten seconds. Fedora should create the interface and request an IP address.

Check the device state with NetworkManager. This command shows every network interface and whether the daemon considers it active.

nmcli device status
# Lists all interfaces recognized by NetworkManager
# Shows DEVICE, TYPE, STATE, and DEFAULT columns
# Look for a new Ethernet device in the connected state

If the interface shows as disconnected or unmanaged, force NetworkManager to claim it. Replace the interface name with the one you see in the output.

nmcli device connect enp0s20u1
# Tells NetworkManager to activate the profile for this interface
# Triggers DHCP and applies any saved connection settings
# Fails silently if the interface is already managed

Android tethering usually works without extra configuration. The kernel driver loads automatically. NetworkManager runs DHCP. The connection establishes. If the interface appears but stays disconnected, check the phone screen. Some manufacturers require you to allow USB debugging or switch the USB mode to File Transfer before tethering activates.

Bring the interface up manually only when NetworkManager refuses to manage it. Reboot before you debug. Half the time the symptom is gone.

Setting up iPhone tethering

iPhones require the ipheth kernel module and the libimobiledevice userspace library. The module handles the low-level USB protocol. The library provides the configuration files NetworkManager needs to recognize the device.

Install the required packages. This pulls in the kernel module and the NetworkManager dispatcher scripts.

sudo dnf install libimobiledevice ifuse
# Installs Apple device communication libraries
# Pulls in NetworkManager plugins for iPhone tethering
# Requires root to write to the system package database

Load the kernel module. This registers the USB driver so the kernel can talk to the phone.

sudo modprobe ipheth
# Loads the Apple Ethernet driver into the running kernel
# Creates the /sys/class/net/ipheth0 device node
# Returns immediately if the module is already loaded

Trust the computer on the iPhone when the prompt appears. Enable Personal Hotspot over USB. NetworkManager will detect the new interface and run DHCP automatically.

The ipheth module sometimes fails to bind if the USB subsystem reports a device descriptor error. Run lsusb to verify the phone appears as an Apple Inc. device. If it shows as a generic USB hub, swap the cable. iPhones are strict about cable quality.

Load the module and verify the interface exists. Trust the package manager. Manual file edits drift, snapshots stay.

Verifying the connection

A tethering setup is only useful when traffic actually routes. Check the interface configuration first. This shows the IP address, subnet mask, and link state.

ip addr show enp0s20u1
# Displays the current IP configuration for the interface
# Shows inet address, netmask, and broadcast details
# Confirms the interface is UP and RUNNING

Test external connectivity. This sends three ICMP echo requests to a public DNS server.

ping -c 3 8.8.8.8
# Sends three packets to verify outbound routing
# Confirms the default route points through the tethered interface
# Exits automatically after three replies or timeouts

If the ping succeeds but web pages fail, your DNS resolver is not working. Fedora uses systemd-resolved by default. Check the active DNS servers with resolvectl status. NetworkManager pushes the phone's DNS servers to the system automatically. If you see 127.0.0.53 as the only nameserver, the stub resolver is working correctly. If you see nothing, run nmcli device connect <interface> again to force a DHCP renewal.

Run journalctl -xeu NetworkManager to watch the daemon in real time. Read the actual error before guessing.

Common pitfalls and error patterns

DHCP timeouts are the most common failure mode. The phone takes a few seconds to initialize the virtual network stack. NetworkManager gives up after thirty seconds by default. You will see a timeout message in the journal.

NetworkManager[1234]: <info>  [1698765432.123] device (enp0s20u1): state change: config -> failed (reason 'supplicant-config-timeout', sys-iface-state: 'external')

Wait for the phone to fully initialize. Run nmcli device connect enp0s20u1 again. The second attempt usually succeeds because the phone's DHCP server is ready.

Missing kernel modules cause silent failures. The interface appears in ip link but NetworkManager never touches it. Check the journal for driver errors.

journalctl -xeu NetworkManager
# Shows recent NetworkManager logs with explanatory context
# Filters output to only show messages from the NM service
# Helps identify missing drivers or configuration conflicts

If you see a message about a missing ipheth module, update your kernel. Fedora ships updated kernels with every release cycle. An outdated kernel might lack the latest USB network drivers.

sudo dnf upgrade --refresh kernel
# Forces dnf to check for newer kernel packages
# Downloads and installs the latest kernel and modules
# Requires a reboot to switch to the new kernel

Immutable desktops like Silverblue and Kinoite handle packages differently. You cannot install software with dnf. You must overlay the package on top of the read-only base image.

rpm-ostree install libimobiledevice
# Layers the package into the next boot tree
# Merges the overlay with the base OS image
# Requires a reboot to apply the new deployment

Firewall rules rarely block tethering traffic, but they can interfere with port forwarding or local services. Reload the firewall after any rule change. The runtime configuration and persistent configuration must match.

sudo firewall-cmd --reload
# Applies persistent firewall rules to the running system
# Prevents divergence between config files and active rules
# Returns immediately without stopping existing connections

SELinux denials occasionally appear if you run custom scripts to manipulate the interface. Check journalctl -t setroubleshoot for one-line summaries. Read those before disabling SELinux.

Snapshot the system before the upgrade. Future-you will thank you.

When to use this versus alternatives

Use USB tethering when you need a stable, low-latency connection and Wi-Fi is unavailable or unreliable. Use a Wi-Fi hotspot when you want to share the connection with multiple devices simultaneously. Use a dedicated mobile broadband USB dongle when you need carrier-specific APN configuration and SIM management. Use a wired Ethernet adapter when you are running a server and need a fixed IP address without phone dependency. Stay on the default NetworkManager configuration if you only deviate from the defaults occasionally.

Where to go next