The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
update network restrictions docs for ipv6 (#20653)
Inianedf0759446cd
diff --git a/apps/docs/pages/guides/platform/network-restrictions.mdx b/apps/docs/pages/guides/platform/network-restrictions.mdxindex 554fe1dc4af..e46e9b85225 100644--- a/apps/docs/pages/guides/platform/network-restrictions.mdx+++ b/apps/docs/pages/guides/platform/network-restrictions.mdx@@ -14,18 +14,20 @@ Network Restrictions is currently in beta and is slowly being made available toEach Supabase project comes with configurable restrictions on the IP ranges that are allowed to connect to Postgres and its pooler ("your database"). These restrictions are enforced before traffic reaches your database. If a connection is not restricted by IP, it still needs to authenticate successfully with valid database credentials.-If direct connections to your database [resolve to a IPv6 address](https://supabase.com/dashboard/project/_/settings/database), you need to add both IPv4 and IPv6 CIDRs to the list of allowed CIDRs. Network Restrictions will be applied to all database connection routes, whether pooled or direct. You will need to add both the IPv4 and IPv6 networks you want to allow. There are two exceptions: If you have been granted an extension on the IPv6 migration OR if you have purchased the IPv4 add-on, you need only add IPv4 CIDRs.+If direct connections to your database [resolve to a IPv6 address](https://supabase.com/dashboard/project/_/settings/database), you need to add both IPv4 and IPv6 CIDRs to the list of allowed CIDRs. Network Restrictions will be applied to all database connection routes, whether pooled or direct. You will need to add both the IPv4 and IPv6 networks you want to allow. There are two exceptions: If you have been granted an extension on the IPv6 migration OR if you have purchased the [IPv4 add-on](https://supabase.com/dashboard/project/_/settings/addons), you need only add IPv4 CIDRs.-If your project has not been migrated to IPv6 or if you have purchased the IPv4 address add-on, just adding IPv4 CIDRs is sufficient.+## To get started via the Dashboard:-To get started:+Network restrictions can be configured in the [Database Settings](https://supabase.com/dashboard/project/_/settings/database) page. Ensure that you have [Owner or Admin permissions](/docs/guides/platform/access-control#manage-team-members) for the project that you are enabling network restrictions.++## To get started via the CLI:1. [Install](/docs/guides/cli) the Supabase CLI 1.22.0+.1. [Log in](/docs/guides/getting-started/local-development#log-in-to-the-supabase-cli) to your Supabase account using the CLI.1. If your project was created before 23rd December 2022, it will need to be [upgraded to the latest Supabase version](/docs/guides/platform/migrating-and-upgrading-projects) before Network Restrictions can be used.1. Ensure that you have [Owner or Admin permissions](/docs/guides/platform/access-control#manage-team-members) for the project that you are enabling network restrictions.-## Check restrictions+### Check restrictionsYou can use the `get` subcommand of the CLI to retrieve the restrictions currently in effect.@@ -33,7 +35,8 @@ If restrictions have been applied, the output of the `get` command will reflect```bash> supabase network-restrictions --project-ref {ref} get --experimental-DB Allowed CIDRs: [128.12.1.1/16 183.12.1.1/24]+DB Allowed IPv4 CIDRs: &[183.12.1.1/24]+DB Allowed IPv6 CIDRs: &[2001:db8:3333:4444:5555:6666:7777:8888/64]Restrictions applied successfully: true```@@ -41,30 +44,33 @@ If restrictions have never been applied to your project, the list of allowed CID```bash> supabase network-restrictions --project-ref {ref} get --experimental-DB Allowed CIDRs: []+DB Allowed IPv4 CIDRs: []+DB Allowed IPv6 CIDRs: []Restrictions applied successfully: false```-## Update restrictions+### Update restrictionsThe `update` subcommand is used to apply network restrictions to your project:```bash-> supabase network-restrictions --project-ref {ref} update --db-allow-cidr 128.12.1.1/16 --db-allow-cidr 183.12.1.1/24 --experimental-DB Allowed CIDRs: [128.12.1.1/16 183.12.1.1/24]+> supabase network-restrictions --project-ref {ref} update --db-allow-cidr 183.12.1.1/24 --db-allow-cidr 2001:db8:3333:4444:5555:6666:7777:8888/64 --experimental+DB Allowed IPv4 CIDRs: &[183.12.1.1/24]+DB Allowed IPv6 CIDRs: &[2001:db8:3333:4444:5555:6666:7777:8888/64]Restrictions applied successfully: true```The restrictions specified (in the form of CIDRs) replaces any restrictions that might have been applied in the past.To add to the existing restrictions, you must include the existing restrictions within the list of CIDRs provided to the `update` command.-## Remove restrictions+### Remove restrictionsTo remove all restrictions on your project, you can use the `update` subcommand with the CIDR `0.0.0.0/0`:```bash-> supabase network-restrictions --project-ref {ref} update --db-allow-cidr 0.0.0.0/0 --experimental-DB Allowed CIDRs: [0.0.0.0/0]+> supabase network-restrictions --project-ref {ref} update --db-allow-cidr 0.0.0.0/0 --db-allow-cidr ::/0 --experimental+DB Allowed IPv4 CIDRs: &[0.0.0.0/0]+DB Allowed IPv6 CIDRs: &[::/0]Restrictions applied successfully: true```