|
| 1 | +--- |
| 2 | +title: Manage firewall rules in Azure Database for PostgreSQL - Hyperscale (Citus) |
| 3 | +description: Create and manage firewall rules for Azure Database for PostgreSQL - Hyperscale (Citus) using the Azure portal |
| 4 | +author: jonels-msft |
| 5 | +ms.author: jonels |
| 6 | +ms.service: postgresql |
| 7 | +ms.topic: conceptual |
| 8 | +ms.date: 9/12/2019 |
| 9 | +--- |
| 10 | +# Manage firewall rules for Azure Database for PostgreSQL - Hyperscale (Citus) |
| 11 | +Server-level firewall rules can be used to manage access to a Hyperscale (Citus) coordinator node from a specified IP address or range of IP addresses. |
| 12 | + |
| 13 | +## Prerequisites |
| 14 | +To step through this how-to guide, you need: |
| 15 | +- A server group [Create an Azure Database for PostgreSQL – Hyperscale (Citus) server group](quickstart-create-hyperscale-portal.md). |
| 16 | + |
| 17 | +## Create a server-level firewall rule in the Azure portal |
| 18 | + |
| 19 | +> [!NOTE] |
| 20 | +> These settings are also accessible during the creation of an Azure Database for PostgreSQL - Hyperscale (Citus) server group. Under the **Networking** tab, click **Public endpoint**. |
| 21 | +>  |
| 22 | +
|
| 23 | +1. On the PostgreSQL server group page, under the Security heading, click **Networking** to open the Firewall rules. |
| 24 | + |
| 25 | +  |
| 26 | + |
| 27 | +2. Click **Add client IP**, either on the toolbar (option A below), or in the link (option B). Either way automatically creates a firewall rule with the public IP address of your computer, as perceived by the Azure system. |
| 28 | + |
| 29 | +  |
| 30 | + |
| 31 | +Alternately, clicking **+Add 0.0.0.0 - 255.255.255.255** (to the right of option B) allows not just your IP, but the whole internet to access the coordinator node's port 5432. In this situation, clients still must login with the correct username and password to use the cluster. Nevertheless, we recommend allowing worldwide access for only short periods of time and for only non-production databases. |
| 32 | + |
| 33 | +3. Verify your IP address before saving the configuration. In some situations, the IP address observed by Azure portal differs from the IP address used when accessing the internet and Azure servers. Therefore, you may need to change the Start IP and End IP to make the rule function as expected. |
| 34 | + Use a search engine or other online tool to check your own IP address. For example, search for "what is my IP." |
| 35 | + |
| 36 | +  |
| 37 | + |
| 38 | +4. Add additional address ranges. In the firewall rules, you can specify a single IP address or a range of addresses. If you want to limit the rule to a single IP address, type the same address in the field for Start IP and End IP. Opening the firewall enables administrators, users, and applications to access the coordinator node on port 5432. |
| 39 | + |
| 40 | +5. Click **Save** on the toolbar to save this server-level firewall rule. Wait for the confirmation that the update to the firewall rules was successful. |
| 41 | + |
| 42 | +## Connecting from Azure |
| 43 | + |
| 44 | +There is an easy way to grant Hyperscale database access to applications hosted on Azure (such as an Azure Web Apps application, or those running in an Azure VM). Simply set the **Allow Azure services and resources to access this server group** option to **Yes** in the portal from the **Networking** pane and hit **Save**. |
| 45 | + |
| 46 | +> [!IMPORTANT] |
| 47 | +> This option configures the firewall to allow all connections from Azure including connections from the subscriptions of other customers. When selecting this option, make sure your login and user permissions limit access to only authorized users. |
| 48 | +
|
| 49 | +## Manage existing server-level firewall rules through the Azure portal |
| 50 | +Repeat the steps to manage the firewall rules. |
| 51 | +* To add the current computer, click the button to + **Add client IP**. Click **Save** to save the changes. |
| 52 | +* To add additional IP addresses, type in the Rule Name, Start IP Address, and End IP Address. Click **Save** to save the changes. |
| 53 | +* To modify an existing rule, click any of the fields in the rule and modify. Click **Save** to save the changes. |
| 54 | +* To delete an existing rule, click the ellipsis […] and click **Delete** to remove the rule. Click **Save** to save the changes. |
| 55 | + |
| 56 | +## Next steps |
| 57 | +- Learn more about [Concept of firewall rules](concepts-hyperscale-firewall-rules.md), including how to troubleshoot connection problems. |
0 commit comments