Container can not connect to Internet
-
Hello community,
I've been experiencing problems with the internet in the containers for a short time. I noticed it because the Nextcloud instances couldn't connect to the Appstore. The containers are all externally accessible.
A curl google.de on the host system delivers a correct result.
A curl google.de inside a container delivers the following error:
curl: (7) Failed to connect to google.de port 80 after 3131 ms: No route to hostNslookup returns correct values on the host system and in a container.
I'm currently in the dark. I am only using IPv4 at the moment.
Has anyone of you ever had such a problem?
Best regards,
Thomas -
Hi Thomas,
can you confirm that DNS Lookup does work inside the container?Sorry, just re-read that you already did nslookup.
-
-
I had already checked unbound and restarted it.
unbound.service - Unbound DNS Resolver Loaded: loaded (/etc/systemd/system/unbound.service; enabled; vendor preset: enabled) Active: active (running) since Wed 2024-04-03 17:08:55 UTC; 23h ago Main PID: 730 (unbound) Tasks: 1 (limit: 96378) Memory: 11.6M CPU: 7.803s CGroup: /system.slice/unbound.service └─730 /usr/sbin/unbound -d
I just restarted the service, no difference.
-
@fisi I think @nebulon responded to your ticket from support. If this is the same support ticket, the reason is that your server has 2 NICs and connected to the internal and external network. This is not a problem but the routes are set up incorrectly in ubuntu. The default route is going via the internal gateway. I think you have to adjust the netplan to fix the routing situation .
(I hope I am replying about the correct tickte ! )
-