Technology

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.

Instructions:

a. Contact your IT admin or tech support and provide them with the IP address (34.100.193.122).

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.

Instructions:

1. Private Server:

MySQL:

a. Log in to your server via SSH.

b. Open MySQL configuration file, typically located at /etc/mysql/mysql.conf.d/mysqld.cnf or /etc/mysql/my.cnf, using a text editor like nano or vi.

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:

pythonCopy code
[mysqld]
...
skip-networking=0

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'@'34.100.193.122' IDENTIFIED BY 'your_password'; FLUSH PRIVILEGES;

Replace your_database_name, your_username, and your_password with appropriate values.


PostgreSQL:

a. SSH into your server.

b. Open PostgreSQL's pg_hba.conf file, usually located in /etc/postgresql/[version]/main/.

c. Add this line to allow access from the StackIt IP:

cssCopy code host all all 34.100.193.122/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 Edit.

e. Add a new rule. For source, type the IP 34.100.193.122. Save.

3. Google Cloud SQL:

a. Go to the SQL section of the Google Cloud Console.

b. Select your instance.

c. Click on the Edit button.

d. Under Authorized Networks, click Add network.

e. Add StackIt's IP address, 34.100.193.122, 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.

Try it now

Gathering all your data has never been simpler.

Give StackIt a try

Automatic Data Pulls

Set Alerts

Visual Data Preview

Visual Data Preview

Try it now

Gathering all your data has never been simpler.

Automatic Data Pulls

Set Alerts

Pre-Built Dashboards