@Hung, Charles Thanks for reaching out to Microsoft Q&A, apologize for the inconvenience caused on this.
As mentioned in this documentation you can import your data from external SQL database to cognitive search either using push your data into index programmatically or pull in the data using a search indexer.
If you external SQL database in on-premises and you want to push your data to cognitive search then you need to use the Azure data factory refer to this documentation on How to push data to ACS index.
Second, my database server restricts all IP except the one on whitelist.
If there is a way to import external DB server data to ACS service. How can I allow ACS service to access my database?
If your external database is on Azure and if you want to connect db to ACS through whitelisted ip then you can pull the ACS ip by doing nslookup or ping request as mentioned here and by adding its ip as firewall rule to DB to connect to ACS.
Feel free to reach back to me if you have any further questions on this.