there are 2 kinds dd-wrt and Tomato, the later i prefer for personal reasons.
Tomato is a small, lean and simple replacement firmware for Linksys' WRT54G/GL/GS, Buffalo WHR-G54S/WHR-HP-G54 and other Broadcom-based routers. It features a new easy to use GUI, a new bandwidth usage monitor, more advanced QOS and access restrictions, enables new wireless features such as WDS and wireless client modes, raises the limits on maximum connections for P2P, allows you to run your custom scripts or telnet/ssh in and do all sorts of things like re-program the SES/AOSS button, adds wireless site survey to see your wifi neighbors, and more.
here is information for install and configuration,
http://en.wikibooks.org/wiki/Tomato_Fir ... figuration
also for the download file go here and read the info so you know what firmware you need
for the Linksys' WRT54G/GL/GS you will want Tomato_1_28.7z (this will change as version changes) the in that file you need to read the readme and select the bin file for your router, once agian READ THE FUCKING README!