First... use the search tool.. lots of guides out there for you answering your question.
Second, check out the stickies, like 3 posts above your question is a complete guide on everything you need to know about making your own server, including security posted by Bane.
[Only registered and activated users can see links. Click Here To Register...]
In there is another link..
[Only registered and activated users can see links. Click Here To Register...]
Read through it, understand and learn it... :)