> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firebolt.io/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.firebolt.io/feedback

```json
{
  "path": "/reference-sql/commands/access-control/create-network-policy",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

> Reference and syntax for the CREATE NETWORK POLICY command.

# CREATE NETWORK POLICY

Creates a new network policy.

For more information, see [Network policies](/guides/security/network-policies).

## Syntax

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
CREATE NETWORK POLICY [IF NOT EXISTS] <network_policy_name>
WITH [ALLOWED_IP_LIST = ( '<allowed_ip1>', '<allowed_ip2>', ... )]
[ BLOCKED_IP_LIST = ( '<blocked_ip1>', '<blocked_ip2>', ... ) ]
[ DESCRIPTION = '<description>' ]
```

## Parameters

| Parameter               | Description                                                                                                                |
| :---------------------- | :------------------------------------------------------------------------------------------------------------------------- |
| `<network_policy_name>` | The name of the network policy. Must start with a letter, and may contain only alphanumeric and underscore(\_) characters. |
| `<allowed_ip>`          | An optional comma-separated and quoted list of IP addresses to allow in the created network policy.                        |
| `<blocked_ip>`          | An optional comma-separated and quoted list of IP addresses to block in the created network policy.                        |
| `<description>`         | An optional description for the created network policy.                                                                    |

<Note>
  Either `ALLOWED_IP_LIST` or `BLOCKED_IP_LIST` must be specified when creating a new network policy.
</Note>

## Example

The following command will create a network policy that allows IPs '4.5.6.1' and '2.4.5.1' and blocks the IP address '6.7.8.1', with a description:

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
CREATE NETWORK POLICY my_network_policy WITH ALLOWED_IP_LIST = ('4.5.6.1', '2.4.5.1') DESCRIPTION = 'my new network policy'
```
