PDA

View Full Version : setting up a firewall on centos



lookatmego
2011-03-16, 10:16 PM
Hey there,
ive been told by friends that my ports are open and that it can be used by others and etc. and have been told to set up a firewall now i know basically almost nothing about this and was wondering if i could get the commands or such on how to set it up thanks:)

suwunk
2011-03-17, 08:38 AM
Hi Lookatmego,

You can use this command;

iptables -A INPUT -p tcp --destination-port PORT-NUMBER -j DROP

For example block port 135 for everyone:

iptables -A INPUT -p tcp --destination-port 135 -j DROP


Cheers