The easiest way is to do it in the router software, not all routers have this ability, most people choose a linksys model that can run DD-WRT firmware (software)
http://www.dd-wrt.com/site/index
Looks like your model supports DD-WRT, do plenty of reading before attempting to flash the firmware on your router, doing it incorrectly or using the wrong firmware can render your router useless.
http://www.dd-wrt.com/wiki/index.php/Supported_Devices#Buffalo
Check the software already in your router, it may have the features you need already, consult the owners manual on how to view router settings.