Originally Posted by keyboard1973
That rule did the trick I have to read more about the input rules on the firewall. If I allow input for the services I would like which reflect the open ports, then add a rule to drop all others at the end iptables will only allow services on those ports correct? or am I looking at this wrong.
The firewall rules are processed from top to bottom.
Each packet is compared to the rules. If it matches, it is sent to the target that belongs to that rule. Once they are sent to a DROP or to a ACCEPT target, they are dropped directly, and no more rules will be compared to them.
So basically you create accept rules for each port on wich you have a service running.
The last rule is to drop all packets.
That way only the packets for the ports that you have opened are allowed.
I think this is what you said, but I'm not sure.