IPtables - How to allow only web access to everyone and deny all other services?
I am using RHEL5. Please let me know what is wrong with I am doing?
(This is only for learning purpose)
iptables -A INPUT -s 0/0 -p tcp --dport 80 -j ACCEPT
---ditto for udp---
iptables -A INPUT -s 0/0 -j REJECT
---ditto for udp--
but this does not work..is this wrong...? According to my logic, the first matching rule will be satisfied and then only the second rule will be read by the iptables...