I am trying to set minimal rules to my Linux iptables rules file to just be able to surf the internet.
Here what I did:
* filter
-A OUTPUT -p tcp --dport 80 -j ACCEPT
-A OUTPUT -p tcp --dport 443 -j ACCEPT
-A OUTPUT -p udp --dport 53 -j ACCEPT
COMMIT
With just those rules, I can't surf the web.
I noticed that when I put -A INPUT -j ACCEPT
, it works but I don't understand why.
So what Input/output port do I need to surf the internet?
Thanks a lot. Regards
EDIT: It still doesn't work.
here is my iptables -L
Chain INPUT (policy DROP)
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
Chain FORWARD (policy DROP)
blank
Chain OUTPUT (Policy ACCEPT)
ACCEPT all -- anywhere anywhere
However, if I add -A INPUT -j ACCEPT
, I can surf the internet. So there should be something else within INPUT that's preventing it.
iptables -L
. Thanks. Regards