cloudflare / cloudflare/cloudflared

💡 Feature Request: Option for DNS Refresh/Reconfiguration After Disconnection

Open
#1,097 1 comment 1 reaction 0 assignees View on GitHub
Priority: Normal Type: Feature Request
Dominant language
Go
Stars
15.6k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Description

When a connection is terminated for any reason, it may be necessary to reconfigure the DNS for the tunnel to reconnect. We are encountering issues as described below:

```
argo_1 | 2023-11-02T20:29:48Z INF Lost connection with the edge connIndex=1
argo_1 | 2023-11-02T20:29:48Z INF Unregistered tunnel connection connIndex=1 event=0 ip=198.18.3.87
argo_1 | 2023-11-02T20:29:48Z WRN Serve tunnel error error="connection with edge closed" connIndex=1 event=0 ip=198.18.3.87
argo_1 | 2023-11-02T20:29:48Z INF Retrying connection in up to 1s connIndex=1 event=0 ip=198.18.3.87
argo_1 | 2023-11-02T20:29:49Z WRN Connection terminated error="connection with edge closed" connIndex=1
argo_1 | 2023-11-02T20:30:18Z INF Lost connection with the edge connIndex=1
```

The proxy software acts as a DNS server, returning an IP address like `198.18.3.87` in the example above. With the proxy enabled, a virtual network interface forwards any connection to `198.18.3.87` to the actual address. However, after a disconnection, this address may be reassigned, processing other connections from subsequent requests.

As described, the address that Cloudflare's cloudflared service retrieves is not always available. Following a termination, new connections can no longer be established through the previously acquired address. This is reflected in issues #890 and #376.

Overall, it would be beneficial to have an option to enable features like DNS reconfiguration.

I am aware that such options may pose security concerns, so further investigation is warranted.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.