From a5c3159f7888cef296866779c5262e16a5e9b24f Mon Sep 17 00:00:00 2001 From: Owen Schwartz Date: Sat, 11 Jan 2025 12:43:16 -0500 Subject: [PATCH] Add nodes about new networking subnets --- .../docs/02-Getting Started/03-quick-setup.md | 4 ++-- .../docs/02-Getting Started/04-dns-networking.md | 14 ++++++++++++++ .../docs/03-Pangolin/02-Configuration/02-config.md | 9 ++++++--- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/packages/docusaurus/docs/02-Getting Started/03-quick-setup.md b/packages/docusaurus/docs/02-Getting Started/03-quick-setup.md index f4750cf..45186b3 100644 --- a/packages/docusaurus/docs/02-Getting Started/03-quick-setup.md +++ b/packages/docusaurus/docs/02-Getting Started/03-quick-setup.md @@ -47,9 +47,9 @@ Then run Newt #### WireGuard -With WireGuard you will be responsible for ensuring your targets are reachable with the /29 subnet provided or proxied/NATed from the WireGuard host. +With WireGuard you will be responsible for ensuring your targets are reachable with the `site_block_size` subnet provided or proxied/NATed from the WireGuard host. -You are provided a /29 subnet in the 10.0.0.0/16 range that Gerbil uses per site. +You are provided a `site_block_size` subnet in the `subnet_group` range that Gerbil uses per site. For example on a Linux client, you can write your copied config to a wg0.conf file and run `wg-quick up ./wg0.conf` diff --git a/packages/docusaurus/docs/02-Getting Started/04-dns-networking.md b/packages/docusaurus/docs/02-Getting Started/04-dns-networking.md index ae5176d..d6d0f31 100644 --- a/packages/docusaurus/docs/02-Getting Started/04-dns-networking.md +++ b/packages/docusaurus/docs/02-Getting Started/04-dns-networking.md @@ -56,6 +56,20 @@ Its important to **ONLY** expose the ports you need. Effectively by tunneling ou ::: +## Default Internal Subnet + +By default the config defaults to using the bellow settings: + +```yaml + block_size: 24 + site_block_size: 30 + subnet_group: 100.89.137.0/20 +``` + +This means that Gerbil will choose the first /24 subnet in the `100.89.137.0/20` range to operate its network. `100.89.137.0/20` is in the CGNAT range which should avoid overlap with most private networks, but if it does please make sure to change this in your config **before** registering your first Gerbil. + +New sites will use a block size of 30. This means that each site gets a /30 within the /24 of the Gerbil exit node. This is enough for 4 IPs (3 unused with newt) which should be good in most cases, but if you are making heavy use of default WireGuard you may want to increase this size. + ## Notes on Docker If you deploy Newt in Docker: "localhost" only refers to stuff inside of the container itself, so if you want to address other things in the Docker environment you need the internal docker IP of that service or the host when setting up your resources. diff --git a/packages/docusaurus/docs/03-Pangolin/02-Configuration/02-config.md b/packages/docusaurus/docs/03-Pangolin/02-Configuration/02-config.md index ae0fec3..19b1287 100644 --- a/packages/docusaurus/docs/03-Pangolin/02-Configuration/02-config.md +++ b/packages/docusaurus/docs/03-Pangolin/02-Configuration/02-config.md @@ -68,7 +68,9 @@ Pangolin is configured using a `config.yml` file. The file is expected to be mou - `subnet_group`: string - IP address CIDR from which to choose smaller CIDR ranges for new Gerbil exit node registrations. Each "Gerbil" gets a subnet from this range. - `block_size`: int - - The block size of the smaller CIDR ranges for new Gerbil exit node registrations. + - The block size of the smallest CIDR ranges for new Gerbil exit node registrations. + - `site_block_size`: int + - The block size of the smallest CIDR ranges for new sites connected to Gerbil. ### rate_limits @@ -153,8 +155,9 @@ gerbil: start_port: 51820 base_endpoint: example.com use_subdomain: false - subnet_group: 10.0.0.0/8 - block_size: 16 + block_size: 24 + site_block_size: 30 + subnet_group: 100.89.137.0/20 rate_limits: global: