Do you want to use the security tool in FC4? In KDE it is under the start menu > system settings > security level. There you can open the command ports or add your own in the bottom box.
If you really want to get into it manually then check out
http://www.linuxguruz.com/iptables/
In there, there are several links to some pre written scripts or one of the links this one
http://easyfwgen.morizot.net/gen/ allows you to create a firewall script online by answering the questions.
Brian1