veth* interfaces accumulate in network tab whenever docker containers start up

Hardware: Raspberry Pi 5 (8GB RAM)
Operating System: Ubuntu Server 24.04.4 LTS (kernel 6.8.0-1051-raspi)

I noticed that whenever docker starts up a container, veth interfaces accumulate in the network tab and i wanted to know if there is a way to ignore them so that they don’t accumulate.

Debug Token:

https://tricorder.pi-hole.net/59Hfh4CX/

This is expected, because Pi-hole web interface shows all interfaces from the host OS. This is not a Pi-hole issue, it's just Pi-hole showing the information received from the OS.

When your docker containers are running, you will also see the same interfaces if you execute the command ip addr on the command line.

I know but they seem to accumulate over time, to the point that I have 34 pages of them now, and having to delete them every time is not really fun.. In ip addrI only have 5 veth interfaces and 4 br.

Maybe this is only a cache issue.
Can you please try to clear the browser cache and try again?


Also, from Pi-hole machine command line, what is the output of this command?

sudo pihole api network/interfaces | jq '.interfaces.[].name'

I tried clearing the browser cache and also going into incognito mode, the pages of veth interfaces are still there.

This is the output of the command:
"lo"
"eth0"
"wlan0"
"wg0"
"br-bf6e53066200"
"br-c0ab589310f1"
"br-0d2d65b579c2"
"docker0"
"br-9026da3f79ed"
"veth5114c2a"
"veth38992c2"
"vethfd89429"
"vethd233c31"
"veth6ae3f78"

So it seems that they don’t accumulate here but in the website they do

This is the same answer the web interface uses to create the page.

Can you please check the web interface using the Devtools?

Please open the Tools > Interfaces page with the devtools opened, then select the "Network" tab and reload the page. Look for gateway?detailed=true file and look for the "Response", on the right side:

Note: The screenshot above is from Firefox. This will look different and use slightly different descriptions on different browsers.

How many interfaces appear on the response?
(I expect to see the same returned on the command line)

After reading a comment from Bucking_Horn, I'm not sure if you are talking about the Tools > Interface page, or Tools > Network page...


If you are talking about the Tools > Network page, this page shows historical data and seeing old devices is normal, even when they are not on the network anymore.

Docker usually uses random Mac Addresses for containers. Each time a container is started, a new address is used.

If this is happening, there is nothing Pi-hole can do. It's impossible to distinguish between a new container and an actual new client on the network. Pi-hole only sees a new client (the same happens if a device uses MAC address randomization).

In this case, the solution would be to manually define a fixed mac address for each container on the compose file.
This will prevent docker from creating random addresses. On restarts, each container will keep the previous address.

Yes I was talking about the Network page, I’ll try assigning a fixed mac address to every container and see if it fixes it.

This will avoid new addresses. Old addresses already on the database will still be there, unless you flush the network table, using the button on the Settings > System page: