Configure LTE 4G dongle on Ubuntu Server

Published at 26 Jun 2025

4G USB dongles are useful for having an internet connection using a SIM card.

To configure a USB dongle on an Ubuntu server you can follow the next steps.

First, we should connect the dongle to the server.

Once it's connected and running, we should run the next command to find out the network interface of the dongle.

netplan status --all

It should output something like this.

 - 1: lo ethernet
 - 2: eth0 ethernet
 - 3: wlan0 wifi
 - 10: enx025a57093630 ethernet

In my case,the network from the dongle is enx025a57093630.

Next, we should modify the netplan configuration adding the interface from the previous command.

vi /etc/netplan/50-cloud-init.yaml
network:
  version: 2
  ethernets:
    eth0:
      optional: true
      dhcp4: true

    enx025a57093630:
      optional: true
      dhcp4: true

Now the server should receive an IP address from the DHCP on the dongle, after this the server should be able to reach the internet.