Open T0unet opened 1 month ago
I don't know anything about Docker I am afraid. Is Docker adding these rules to nftables when it starts? br-591ca8bdf81a looks like an interface name that Docker generates, so perhaps when it restarts it's expecting to use a new name and add new rules?
My initial thought was that nftfw was zapping your file in the install.d directory. I don't think this is the case. However, to be safe I would put your file in /etc/nftfw and use an absolute path in the include:
include "/etc/nftfw/docker.nft"
This link seems a simpler starting point. It uses IP addresses to select Docker traffic and not interfaces - and talks a bit about setting up Docker. https://blog.ghostinashell.com/linux/nftables/2020/03/07/nftables.html
There may be other related content out there that can assist you.
I've been using this tool for quite some time now, but I'm having a problem trying to switch over and test docker on my box, which is now compatible with nft.
If I reset the ruleset and start the docker service, I end up with this type of template.
So i had try to dump the base config after my container is started
nft -s list ruleset > /var/lib/nftfw/install.d/docker.nft
and edit the file in
vi /etc/nftfw/nftfw_init.nft
and after reload the full rules.
nftfw -f -v load
It works only if the container is not restarted.
It i restart the container, no access to outside from the container
level=error msg="[resolver] failed to query external DNS server" client-addr="udp:172.18.0.2:49891" dns-server="udp ....
I don't think I know nft well enough to understand the problem. Can I get some help?