You are not logged in.

#1 2019-05-22 14:56:05

gasebupor
Member
Registered: 2019-05-14
Posts: 8

[SOLVED] docker0 does not have internet access

What does not work — ping to any IP address using -I docker0 arguments to ping. However, I can access that IP from my default interface.

I have both iptables.service and nftables.service enabled and running. Tried to change kernel version from 5.1.3-arch2-1 to 4.19.44-1, docker version from 18.09.6 to 18.06.0 and systemd-networkd to dhcpcd, nothing did work.

systemd-networkd has IPForward=yes in my .network file and sysctl net.ipv4.ip_forward is 1.

How do I fix that?

Last edited by gasebupor (2019-05-22 16:51:20)

Offline

#2 2019-05-22 15:35:25

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: [SOLVED] docker0 does not have internet access

What problem are you trying to solve...the command you listed doesn't work on my machine either and I use Docker every day. The important question is whether you can access the internet from a container. Does this work?

docker run -it --rm alpine ping -c3 google.com

Offline

#3 2019-05-22 16:51:09

gasebupor
Member
Registered: 2019-05-14
Posts: 8

Re: [SOLVED] docker0 does not have internet access

Solved. Docker does not automagically fill nftables, it only works with iptables and iptables translator seems to be bad at its job.

Offline

#4 2019-05-22 16:54:50

gasebupor
Member
Registered: 2019-05-14
Posts: 8

Re: [SOLVED] docker0 does not have internet access

Also, I forgot to mention that I was wrong using docker0 interface. It should be used just as a master interface for container interfaces, which did not work either.

Offline

Board footer

Powered by FluxBB