0

i want to block all dns queries from lan to Internet so only server allowed to make dns requests so i need rule to dns requests from eth0 to Internet allowed, lan to eth1 allowed, but lan to Internet rejected

0

Did you try reading the iptables manual?

iptables -A FORWARD -i lan -o internet -p tcp --dport 53 -j REJECT
iptables -A FORWARD -i lan -o internet -p udp --dport 53 -j REJECT
2
  • i tried this rule but only with udp and it didn't work – redbass Oct 5 '18 at 9:54
  • You should always include in the question what you already tried. – RalfFriedl Oct 5 '18 at 17:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.