🇦🇺 Hello Australia! Sydney region is officially live on Neon.Sign Up
Reference/Neon CLI

Neon CLI commands — ip-allow

Use the Neon CLI to manage Neon directly from the terminal

Before you begin

  • Before running the ip-allow command, ensure that you have installed the Neon CLI.
  • If you have not authenticated with the neonctl auth command, running a Neon CLI command automatically launches the Neon CLI browser authentication process. Alternatively, you can specify a Neon API key using the --api-key option when running a command. See Connect.

For information about Neon's IP Allow feature, see Configure IP Allow.

The ip-allow command

The ip-allow command allows you to perform list, add, remove, and reset actions on the IP allowlist for your Neon project. You can define an allowlist with individual IP addresses, IP ranges, or CIDR notation.

Usage

neonctl ip-allow <subcommand> [options]
SubcommandDescription
listList the IP allowlist
addAdd IP addresses to the IP allowlist
removeRemove IP addresses from the IP allowlist
resetReset the IP allowlist

list

This subcommand allows you to list addresses in the IP allowlist.

Usage

neonctl ip-allow list [options]

Options

In addition to the Neon CLI global options, the list subcommand supports these options:

OptionDescriptionTypeRequired
--context-fileContext file path and file namestring
--project-idProject IDstringOnly if your Neon account has more than one project

Examples

neonctl ip-allow list --project-id cold-grass-40154007

List the IP allowlist with the --output format set to json:

neonctl ip-allow list --project-id cold-grass-40154007 --output json

add

This subcommand allows you to add IP addresses to the IP allowlist for your Neon project.

Usage

neonctl ip-allow add [ips ...] [options]

Options

In addition to the Neon CLI global options, the add subcommand supports these options:

OptionDescriptionTypeRequired
--context-fileContext file path and file namestring
--project-idProject IDstringOnly if your Neon account has more than one project
--primary-branchIf true, the list will be applied only to the primary branch. Use --primary-branch false to remove this setting.string

Example

neonctl ip-allow add 192.168.1.3 --project-id cold-grass-40154007

remove

This subcommand allows you to remove IP addresses from the IP allowlist for your project.

Usage

neonctl ip-allow remove [ips ...] [options]

Options

In addition to the Neon CLI global options, the remove subcommand supports these options:

OptionDescriptionTypeRequired
--context-fileContext file path and file namestring
--project-idProject IDstringOnly if your Neon account has more than one project

Example

neonctl ip-allow remove 192.168.1.3 --project-id cold-grass-40154007

reset

This subcommand allows you to reset the list of IP addresses. You can reset to different IP addresses. If you specify no addresses, currently defined IP addresses are removed.

Usage

neonctl ip-allow reset [ips ...] [options]

Options

In addition to the Neon CLI global options, the reset subcommand supports these options:

OptionDescriptionTypeRequired
--context-fileContext file path and file namestring
--project-idProject IDstringOnly if your Neon account has more than one project

Example

neonctl ip-allow reset 192.168.1.1 --project-id cold-grass-40154007

Need help?

Join our Discord Server to ask questions or see what others are doing with Neon. Users on paid plans can open a support ticket from the console. For more detail, see Getting Support.

Last updated on

Edit this page
Was this page helpful?