2 months ago, I switched my router, and I've been teaching myself how to use iptables. Here's some of the links I learnt from:

IPTables can be used to block, redirect traffic, etc.