IP allowlists let Datastream connect to a source database over a public
network by allowing incoming traffic from Datastream public IP
addresses. This connectivity method works best when your source database is
external to Google Cloud and has an externally accessible IPv4 address and TCP
port.

## Set up IP allowlists

If your source database is external to Google Cloud, then add the
Datastream public IP addresses as an inbound firewall rule on the
source network:

1. Open your source database machine's network firewall rules.

2. Create an inbound rule.

3. Set the source IP addresses for the rule to the Datastream
   [IP addresses](https://docs.cloud.google.com/datastream/docs/ip-allowlists-and-regions) for your region.

4. Set the protocol to `TCP`.

5. Set the port associated with the `TCP` protocol. The default values are:

   - `1521` for an Oracle database
   - `3306`for a MySQL database
   - `5432`for a PostgreSQL database
   - `1433` for a SQL Server database
   - `27017` for a MongoDB database
6. Save the firewall rule, and then exit.

## What's next

- Learn how about other network [connectivity methods](https://docs.cloud.google.com/datastream/docs/network-connectivity-options).