How to set the private IP

Hello
I have a simple problem, and I didn’t find any solution to it

I published my project but when I hacked the DB, it was easy

So, the problem with network IPs, I chose “FROM ANYWHERE”

I wanted to change it to private IP, So that it is only possible to connect to the database from the site itself

how do I set the IP, I should use the website IP or what?

thank you so much :heart_eyes: