How to whitelist our IP inside your database
Learn how to whitelist our IP if your database is behind firewall
Sep 6, 2023
How to Whitelist StackIt's IP Address for Data Integration: A Simple Guide for Everyone
If you've been told you need to "whitelist" an IP address for your MySQL database and you're scratching your head wondering what that means, don't worry – you're not alone! Let's dive into this concept in simple terms and look at how you can achieve this, whether you're a techie or not.
What is "Whitelisting"?
Imagine your MySQL database is like a private party, and the "whitelist" is the guest list. If an IP address (a unique address for computers on the internet) is on the whitelist, it's allowed to "enter the party" or, in technical terms, connect to your database. Any IP address not on the list gets the metaphorical "you're not on the list" treatment.
Why Would You Need to Whitelist StackIt’s IP Address?
There might be many reasons:
It is possible that in order to increase the security of your MySQL or Postgres database, it is hosted behind a firewall. By allowing only certain IP addresses, you reduce the risk of unwanted guests trying to crash the party.
It is also possible that you have team members working from specific locations or systems that have restricted access to the database.
Getting it Done – Two Routes:
1. Speak to Your IT Admin
If you're do not have access to your MySQL database or if you are not familiar with this process, the best route would be to get in touch with your IT administrator or tech support.
a. Contact your IT admin or tech support and provide them with the IP address (126.96.36.199).
c. Request them to whitelist the provided IP for your MySQL database.
d. Connect your MySQL DB in your StackIt account to test & ensure everything works as expected after the IP is whitelisted.
2. Do It Yourself
Here's a simple guide to do it yourself.
Please note: Ensure you backup or take necessary precautions before making changes, as incorrect configurations might cause issues.
1. Private Server:
a. Log in to your server via SSH.
b. Open MySQL configuration file, typically located at
/etc/mysql/my.cnf, using a text editor like
c. Search for the
bind-address directive. Change its value to
0.0.0.0 to allow connections from any IP address. (Note: This might expose your database to the world. Ensure you have firewalls in place to restrict access.)
d. Below this, or if it’s not already there, add:
e. Save and close the configuration file.
f. Restart the MySQL service using
sudo service mysql restart.
g. Now, log in to MySQL using
mysql -u root -p.
h. Grant access to StackIt:
sqlCopy code GRANT ALL PRIVILEGES ON your_database_name.* TO 'your_username'@'188.8.131.52' IDENTIFIED BY 'your_password'; FLUSH PRIVILEGES;
your_password with appropriate values.
a. SSH into your server.
b. Open PostgreSQL's pg_hba.conf file, usually located in
c. Add this line to allow access from the StackIt IP:
cssCopy code host all all 184.108.40.206/32 md5
d. Save and close.
e. Restart PostgreSQL:
sudo service postgresql restart.
2. AWS RDS:
a. Open the Amazon RDS console.
b. In the navigation pane, click on
DB Instances and select your DB instance.
c. Under the
Security group rules, choose the security group.
d. In the security group, choose the
Inbound tab and click
e. Add a new rule. For source, type the IP
3. Google Cloud SQL:
a. Go to the SQL section of the Google Cloud Console.
b. Select your instance.
c. Click on the
Authorized Networks, click
e. Add StackIt's IP address,
220.127.116.11, and save.
Always ensure that after making these changes, you test the connection from StackIt. Also, while it's necessary to whitelist the required IP address, always remain cautious about exposing your databases and ensure adequate security protocols are in place. If ever in doubt, consulting an expert is a wise decision.
other related blogs