How to Stop Ubuntu Linux from Automatically Creating Dummy Network Interfaces

The Phantom Network Clutter

If you manage an Ubuntu Linux server or use the desktop version for software development, you rely on the ip a or ifconfig commands to check your network status. However, you might occasionally run these commands and find your terminal flooded with dozens of bizarre, auto-generated network interfaces like dummy0, vethXYZ, or br-XYZ. These “dummy” or virtual interfaces are not physical network cards; they are automatically created by containerization software (like Docker or LXC) or virtual network managers. While they are necessary for routing traffic to isolated containers, having a massive list of phantom interfaces makes it incredibly difficult to find your actual physical ethernet adapter (like eth0 or enp3s0) when you are trying to troubleshoot a real networking issue.

How to Prevent Docker from Creating Auto-Bridges

The most common culprit for hundreds of virtual interfaces on an Ubuntu system is Docker. Every time you spin up a new container network, Docker creates a new virtual bridge interface. If you don’t want Docker to do this, you must configure it to use the host network directly (though this removes network isolation).

If you want a container to use your main network interface without creating a dummy bridge:

1. When running a Docker container from the terminal, append the network flag:

docker run --network host -d your-image-name

2. If you are using docker-compose.yml, add the network mode to your service definition:

network_mode: "host"

This stops Docker from creating a dedicated br- or veth interface for that specific container.

How to Remove the Default Dummy Kernel Module

Sometimes, the Linux kernel itself loads a module specifically to provide dummy interfaces (literally named dummy0) for testing purposes. If you don’t need these, you can blacklist the module so it never loads.

1. Open your terminal application.

2. Create a new blacklist configuration file using a text editor with root privileges:

sudo nano /etc/modprobe.d/disable-dummy.conf

3. Type the following line into the empty file:

install dummy /bin/true

4. Save the file (Ctrl+O, Enter) and exit the editor (Ctrl+X).

5. To remove the dummy module from your currently running session without rebooting, execute:

sudo rmmod dummy

Your ip a output will now be significantly cleaner, displaying only your actual physical hardware and the necessary loopback interface.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.