Generally, to protect yourself, you want to install and use a firewall. The preferred method is to have a hardware firewall (like a Linksys router or an old linux box running IPcop or similar) and then use a software firewall on your machine. This way your machine isn't actually seen by the outside, the hardware firewall is.
Anyway, in short, use Guarddog for KDE desktop or Firestarter for Gnome (those are the defaults usually). Personally, I like
fwbuilder.
If you're interested to see if your machine has open ports, try going to
https://www.grc.com/ or
http://www.auditmypc.com/ to test your firewall (or lack thereof).