1
Following is my iptables rules in Ubuntu.
╰─$ sudo iptables -S
-P INPUT ACCEPT
-P FORWARD DROP
-P OUTPUT ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -j DROP
Only for the INPUT, I have given rules and all outgoing traffic are in ACCEPT policy. But I can not browse internet or ping to any internet domain.
But, if I remove the last rule in INPUT chain -A INPUT -j DROP
then I can browse and ping.
What chain exactly need to be opened for browsing internet? Why the INPUT chain policy is interfering with outgoing traffic. I am confused. Explanation please.
I added another rule to accept
ESTABLISHED,RELATED
connections. Now it works. – Muneer – 2014-08-26T08:16:33.543-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
– Muneer – 2014-08-26T08:16:51.920