Hi, I have enabled the experimental nftables support that comes with Docker v29. Everything works for the most part. I stop using iptables and ufw.
Docker add its own nftables chains and rules separately from those in my /etc/nftables. But, as I understand about nftables, a drop rule will always drop a packet no matter which chain it is in.
I want to block a port that is opened by Docker compose, say 3000:8080, from the outside world. I added a forward chain with a rule to drop everything in /etc/nftables, then restart both nftables and Docker service. But it doesn’t seem to work as intended. The port is still reachable.
Would anyone know how I can build a firewall with nftable to block opened ports? (I understand that I can simply not open the port or restrict it to 127.0.0.1:3000. But for the sake of security, having a firewall is nice)