Temporary failure in name resolution

Hello,

I don’t understand why, some time some container can’t access any domain.
When I make a ping, I have this error:

root@eezee-it-13-0-develop:~# ping google.com
ping: google.com: Temporary failure in name resolution

Some time when I restart the container, the ping work well, but for other container, restarting doesn’t change anything.

How I can fix this issues (The DNS it’s working well when the container is created, I don’t know when and why it doesn’t works some time)?
I try with systemctl restart systemd-resolved but it’s not working :confused:

Thanks,
Best Regards

On a DNS Working container, the file /etc/resolv.conf contains

*nameserver 10.63.102.1
*search lxd

But on a non working container, the file contains:
*nameserver 10.63.102.1
*nameserver 127.0.0.53
*search lxd

I don’t know, how I can configure the /etc/resolv.conf

Please show lxc config show <instance> --expanded and lxc network ls, along with the network configuration you’re using inside your container?

Hi tomp,

Thank you for your repli, I finally found the issues.

fail2ban is installed on the host and it blacklist the IP of the container.

I remove the blacklist and now it’s working correctly.

Thank you for your help,
Best Regards

1 Like