You can do so by creating a .htaccess file. .htaccess files can sit in any directory on your website and can contain custom web server settings for that specific directory. (like if you want to deny access to that folder/files only, or if you want to turn on directory indexing for that directory only, etc...)

Most of CPanel's options use .htaccess files already, CPanel simply creates them for you. You can allow IPs from specific sites like this:
  • Create a text file on your computer and open it in notepad (or another such basic editor)
  • Enter the following code:
    <pre>&lt;files *.*&gt;
    order deny,allow
    deny from all
    allow from <b>ALLOWABLE-IP-GOES-HERE</b>
    allow from <b>ANOTHER-ALLOWABLE-IP-GOES-HERE</b>
    &lt;/files&gt;</pre>
  • Upload the file to the root directory of your website (public_html in most cases) and rename the file to .htaccess

Depending on your server's configuration, the .htaccess file may become invisible (because files that begin with "." are hidden by default). There may also already be a .htaccess file sitting in the root directory of your webspace, which is probably the file CPanel generated for you already. If that is the case, open the file CPanel created and add the code below all of the stuff currently in the file.

If the file's syntax is wrong, and you try and access your webspace, you'll get a #500 Internal Server Error.

Anyway, here are good references for more stuff you can do with .htaccess files:
http://free.prohosting.com/~sampieri/freefaq/
http://httpd.apache.org/docs/1.3/mod/mod_access.html