dns server既 iptables setting如下 我想問這個setting有問題嗎? 唔該師兄
limk2004 發表於 2014-7-18 14:40 
DNS server listens on port 53 so the INPUT rule should be
-A INPUT -p tcp --dport 53 -j ACCEPT
-A INPUT -p udp --dport 53 -j ACCEPT
To allow DNS query to other DNS server:
-A OUTPUT -p tcp --dport 53 -j ACCEPT
-A OUTPUT -p udp --dport 53 -j ACCEPT
However, your OUTPUT policy is ACCEPT so either you change it to DROP (check carefully before doing so) or the last two output rules are not needed as the packet will be accepted at the end of the output table anyway. |