Google Custom Search is a solution for searching public materials, accessible to everyone (e.g. a public website of a company). It uses the same infrastructure as google.com, so anything needs to be exposed first to google.com to be visible in Custom Search.
If your intention is to search e.g. your company's intranet or sensitive data, the better solution is Google Search Appliance, which works behind the firewall.