Lockdown / Restrict access to FTP & SSH users to specific IP addresses

I would like to know if this can be done, maybe using the Linux Firewall, is there any guide/documentation on this?