# How to fix the "Connection refused" error when configuring a VPN

Setting up a new VPN or configuring a mapping for an existing VPN with Digibee requires attention to ensure a smooth connection. A common issue during this process is the `"Connection refused"` error message, which indicates that the server has refused the connection request.

This article explains the key step required after requesting a new mapping in Digibee: allowing Digibee's private IP in the target service's firewall to ensure that traffic can flow correctly.

## **Understanding the "Connection refused" error**

<figure><img src="https://content.gitbook.com/content/boT4qPJIk6PZotrxlJWL/blobs/3B42g2AxqCDrvHQPFnFg/image1.png" alt=""><figcaption><p>“Connection refused” error</p></figcaption></figure>

"Connection refused" is an error message that occurs when a customer tries to connect to a server, but the server rejects the connection request. Common causes are:

* Closed ports
* Firewall or security settings
* Resource restrictions on the server
* Incorrectly configured settings
* Unavailability of the requested service

## **Fixing the "Connection refused" error**

After requesting a new mapping in Digibee, make sure that Digibee's private IP is allowed in the target service's firewall settings. If you are unsure of the IP address, contact the Support team to obtain this information.

## **Simplifying IP management**

The Digibee Integration Platform runs on the Google Cloud Platform and uses a dynamic range of IPs for each pipeline execution. If a fixed outgoing IP of the pipeline is required — for example when whitelisting public IPs to access external resources — you can configure a NAT (Network Address Translation) for the `host:port` that your pipeline needs to access.

To request this configuration and get the public IP for whitelisting, contact our [Support team via chat](https://docs.digibee.com/documentation/troubleshooting/help-and-faq/support).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.digibee.com/documentation/troubleshooting/connectivity-guides/connection-refused-error.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
