I am trying to configure IPTables to accept http connection from 10.0.0.1 only and reject everything else. When I make http connection from 10.0.0.1, it is blocked. I am facing another issue. I am trying to allow DNS in outgoing direction and block everything else. The problem is when I use OUTPUT DROP everything is dropped
Here is what I did
iptables -A INPUT -p tcp -s 10.0.0.1 --dport 80 -j ACCEPT
iptables -A INPUT DROP
iptables -A OUTPUT -p udp -d 8.8.8.8 --dport 53 -j ACCEPT
iptables -A OUTPUT -p tcp -d 8.8.8.8 --dport 53 -j ACCEPT
iptables -P OUTPUT DROP