# Network and isolation

Source : https://webgune.cloud/en-us/docs/reseau-cloisonnement · Mis à jour le 2026-11-20

# Network and isolation

Each project has its own network space. By default, all incoming and outgoing traffic is refused there, except the routes listed on this page. Two projects, whether they belong to the same customer or not, cannot see each other unless an internal link connects them.

## What a service can reach

| Destination | Allowed |
|-------------|---------|
| Internet (third-party APIs, package registries, webhooks) | yes, on all ports |
| Other services in the same project | yes |
| The project's databases | yes |
| A service in another project connected by an internal link | yes, that service only and that port only |
| Other services in another project or of another customer | no |
| Private addresses (servers, Webgune's internal network) | no |

A service receives requests from three origins: the services in its project, the router that forwards public traffic to it, and Webgune's monitoring.

## The build rule

A build has a stricter rule than the service:

| Destination | Allowed |
|-------------|---------|
| Internet over HTTP (port 80) and HTTPS (port 443) | yes |
| Internet on another port (SSH, remote database) | no |
| The project's services and databases | no |

A build therefore cannot query your database or your API, or clone a dependency over SSH (`git+ssh://`). Use an HTTPS URL with a token for a private dependency ([How builds work](/docs/builds-railpack)).

## Connecting two services in the same project

Services in the same project reach each other directly, over the project's internal network, without going out to the Internet or through the public entry point. For a frontend to call its API, or an application to talk to its database, put them in the same project.

A database's internal address is shown in its panel, under **Host (internal)** ([Databases](/docs/bases-de-donnees)).

## Connecting two projects: the internal link

An internal link opens access from one service to a service in another project, including a project belonging to another user of which you are a member.

```archi
title: An internal link between two projects
[Project A]
*Calling service | receives API_HOST, API_PORT, API_URL
-> internal link, one port only
[Project B]
*Target service | reachable on that port
Other services of project B | stay closed
```

On the **Network** tab of the calling service, **Internal service** section:

1. Choose the project, then the target service.
2. Check the suggested prefix, for example `API`. It contains only uppercase letters, digits and `_`, 40 characters at most.
3. Click **Add**.

You need a role that allows deploying (owner, admin or developer) on both projects ([Roles and permissions](/docs/roles-permissions)).

The link writes three [environment variables](/docs/variables-environnement) in the calling service:

| Variable | Example |
|----------|---------|
| `API_HOST` | `api.kx-boutique-1a2b3c4d.svc.cluster.local` |
| `API_PORT` | `3000` |
| `API_URL` | `http://api.kx-boutique-1a2b3c4d.svc.cluster.local:3000` |

```js
const res = await fetch(`${process.env.API_URL}/commandes`);
```

Only the address and port are passed on, never the target service's credentials. Traffic stays on the internal network: the address cannot be reached from the Internet.

| Action | Effect |
|--------|--------|
| **Resync** | rewrites the three variables, after a port change on the target for example |
| **Delete** | closes network access. The variables already written stay in the service: remove them by hand |

The owner of the target service can delete an incoming link from their side.

The link opens the target port to that calling service only. In the target project, another service listening on the same port is reachable through the same link.

## The path of a public request

1. The request arrives at the entry point, the only server visible from the Internet. Its firewall only lets public ports through.
2. The router reads the domain name, terminates HTTPS and forwards the request to the service.
3. The service responds along the same path.

```archi
title: The path of a public request
[Internet]
Visitor
-> public ports only
[Entry point]
*Firewall and router | terminates HTTPS, picks the service
-> encrypted tunnel
[Servers in Nantes, Bordeaux and Pau]
Your service | micro-VM
```

Between the entry point and the servers at the three sites (Nantes, Bordeaux and Pau), traffic goes through an encrypted tunnel. The domain, certificate and exposed ports are set in [Custom domains](/docs/domaines-personnalises) and [SSL certificates](/docs/certificats-ssl).

## The visitor's address

Your application sees the router's connection, not the visitor's. The real address is passed in the `X-Forwarded-For` header, and the original protocol in `X-Forwarded-Proto`.

Declare the proxy as trusted in your framework, otherwise per-address rate limits and access logs will all carry the same address:

```js
// Express
app.set("trust proxy", true);
```

```python
# Django (settings.py)
USE_X_FORWARDED_HOST = True
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
```

## Private environments

Staging and development services are not public. Their address (`name.preprod.webgune.dev`, `name.dev.webgune.dev`) requires the project token, on every request, static files included. The share link contains the token: the person who receives it has nothing to enter.

A single token covers all the project's environments. Regenerating it invalidates all links already shared.

## IPv6

Each project can have a dedicated IPv6 address, taken from your account's block. An account has a block of 16 addresses. The address is shown in the settings of each service in the project, under **IPv6 address**.

## Common errors

| Symptom | Cause | Fix |
|---------|-------|-----|
| Timeout to a service in another project | no internal link between the two | create an internal link, or group the services in one project |
| The `…svc.cluster.local` address does not respond from your machine | it only exists on the internal network | use the public address, or the [web terminal](/docs/terminal-exec) |
| Network error during the build | the build has no access to internal services | move the call to application startup |
| `git clone` over SSH fails during the build | only ports 80 and 443 are open to the build | switch the dependency to HTTPS |
| All requests have the same IP address | the proxy is not declared as trusted | read `X-Forwarded-For` |
| Staging asks for a token | it is a private environment | share the link that contains the token |
