Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
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
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
Required, but never shown