I believe its all good on that part
In fact it's not.
listen-on port 53 { 127.0.0.1; 176.9.117.123;176.9.117.108;};
listen-on-v6 port 53 { ::1; };
I would use the settings I gave. I don't know how many ip's that DS server has, but just use "any" as stated in my example.
Same for the ipv6, because you don't want it only to listen on localhost, that makes it unreachable from external.
allow-query { "trusted";};
allow-recursion {"trusted"; 212.110.95.0/24;};
Also wrong. Because it's your ns2, so every system should be able to query your NS2, so do not use trusted there, use any like in my example otherwise you can be sure for example that Letsencrypt will give issues. When using multiple nameservers, they all should be accessible for normal query's from outside.
As for the "allow-recursion" part, you don't need to use your DA server there, there is no recursion required from that system other then localhost and localnets.
I even have that "localhost, localnets" on all my servers and we run our own DNS on all servers. So I would change that one too.
I don't use the query-cache statement, you can remove that and leave it default, that's best.
It was opened but now its close
Yes because of your named.conf as far as I can see, you refused connections on the listen-on port xx statements.
As for the firewall, why make life difficult? Just install CSF on that Directslave server. I've done it too, makes life a lot easier and opening ports too.
For example my in and out tcp rules in csf.conf on the DS server are:
TCP_IN = "22,53,853,80,443,2222,2224"
outgoing
TCP_OUT = "22,23,25,53,853,80,113,443,2222,2224"
next to that on both I've got another port which is not mentioned here but is in fact used for SSH. I leave the 22 here open as honeypot, can't be used anyway because nothing is running on it.
UDP_IN = "20,21,53,853,80,443,2222,2224"
UDP_OUT = "20,21,53,853,113,123,2222,2224"
Same for ipv6:
# Allow incoming IPv6 TCP ports
TCP6_IN = "22,53,853,80,443,2222,2224"
# Allow outgoing IPv6 TCP ports
TCP6_OUT = "22,23,25,53,853,80,113,443"
# Allow incoming IPv6 UDP ports
UDP6_IN = "20,21,53,853,80,443"
# Allow outgoing IPv6 UDP ports
# To allow outgoing traceroute add 33434:33523 to this list
UDP6_OUT = "20,21,53,853,113,123"
Installing CSF manually is very easy to do and then you don't have to bother with Almalinux 9 nftables stuff.