Read some tutorials on iptables for a start.
LQ isn't the place to go for step by step guides. We are happy to help you if you are experiencing a specific problem in something you are trying to do, but we wont do it for you. There are plenty of other sites out there that have good information on what you are trying to do, you just have to google for them..
I would recommend you start with the link below, and the man pages for iptables.
Since you have provided very little information about your query, this is a general guide to iptables, how it works, and how to use it.
http://www.linuxhomenetworking.com/w...Using_iptables