[GH-ISSUE #135] Dns option doesn`t work #1719

Closed
opened 2026-04-27 22:23:34 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @vadim0872 on GitHub (Sep 9, 2025).
Original GitHub issue: https://github.com/fosrl/newt/issues/135

Originally assigned to: @oschwartz10612 on GitHub.

I configure split dns, all requests to *.mydomain.com forcibly sent to reverse proxy in local net.
The request to pangolin.mydomain.com going too, but it located on vps. To confirm this problem I try to use option "-dns" which is designed to set dns server that will be resolved request for pangolin endpoint, but it doesn`t metter at all

Originally created by @vadim0872 on GitHub (Sep 9, 2025). Original GitHub issue: https://github.com/fosrl/newt/issues/135 Originally assigned to: @oschwartz10612 on GitHub. I configure split dns, all requests to *.mydomain.com forcibly sent to reverse proxy in local net. The request to pangolin.mydomain.com going too, but it located on vps. To confirm this problem I try to use option "-dns" which is designed to set dns server that will be resolved request for pangolin endpoint, but it doesn`t metter at all
GiteaMirror added the bug label 2026-04-27 22:23:34 -05:00
Author
Owner

@DetermineAbsurd commented on GitHub (Oct 27, 2025):

I am also experiencing this issue. Supplied DNS environment variable is ignored seemingly.

Edit: After looking through the debug logs of the container, it appears to interpret the supplied DNS value, but not actually utilize it when doing network requests as the expected return IP of the endpoint does not match my configured response IP from my DNS server and the DNS server isn't reporting any requests from the device running Newt.

<!-- gh-comment-id:3453103847 --> @DetermineAbsurd commented on GitHub (Oct 27, 2025): I am also experiencing this issue. Supplied DNS environment variable is ignored seemingly. Edit: After looking through the debug logs of the container, it appears to interpret the supplied DNS value, but not actually utilize it when doing network requests as the expected return IP of the endpoint does not match my configured response IP from my DNS server and the DNS server isn't reporting any requests from the device running Newt.
Author
Owner

@cradermacher commented on GitHub (Jan 22, 2026):

same to me.
I configuered a newt LXC Container on my Proxmox Host. The LXC Container uses my internal Adguard as DNS Server.
A Ping from the container to a sudomain.internal-domain.de resolves the correct IP.

If use ressource in Pangolin, which should connect to the same subdomain, i get a "bad gateway".

<!-- gh-comment-id:3785854471 --> @cradermacher commented on GitHub (Jan 22, 2026): same to me. I configuered a newt LXC Container on my Proxmox Host. The LXC Container uses my internal Adguard as DNS Server. A Ping from the container to a sudomain.internal-domain.de resolves the correct IP. If use ressource in Pangolin, which should connect to the same subdomain, i get a "bad gateway".
Author
Owner

@willthong commented on GitHub (Jan 24, 2026):

Pinging internal domain correctly hits DNS server (192.168.0.242) from within newt container:

docker exec -it newt /bin/sh
/ # ping home.internal
PING home.internal (192.168.0.242) 56(84) bytes of data.
64 bytes from deathandgravity.internal (192.168.0.242): icmp_seq=1 ttl=64 time=0.029 ms

Newt container logging shows "use of closed network connection" UDP errors when attempting holepunch:

INFO: 2026/01/24 10:37:35 Peer [REDACTED] updated successfully
INFO: 2026/01/24 10:38:07 Triggering on-demand hole punch to 1 exit nodes
WARN: 2026/01/24 10:38:07 Failed to send on-demand hole punch to 86.24.50.100: failed to write to UDP: use of closed network connection
INFO: 2026/01/24 10:38:07 Removing Endpoint for peer [REDACTED]
INFO: 2026/01/24 10:38:07 Peer [REDACTED] updated successfully

Image

   cat docker-compose.yml
services:
  newt:
    image: fosrl/newt
    container_name: newt
    restart: unless-stopped
    environment:
      - PANGOLIN_ENDPOINT=https://pangolin.willthong.com
      - NEWT_ID=[REDACTED]                  
      - NEWT_SECRET=[REDACTED] 

Newt is correctly routing external requests to Public Resources but no connectivity to Private Resources. Please shout if this isn't actually the same issue and I'll happily split into a new ticket. Thanks for a brilliant product!

<!-- gh-comment-id:3794438721 --> @willthong commented on GitHub (Jan 24, 2026): Pinging internal domain correctly hits DNS server (192.168.0.242) from within newt container: ```bash docker exec -it newt /bin/sh / # ping home.internal PING home.internal (192.168.0.242) 56(84) bytes of data. 64 bytes from deathandgravity.internal (192.168.0.242): icmp_seq=1 ttl=64 time=0.029 ms ``` Newt container logging shows "use of closed network connection" UDP errors when attempting holepunch: ``` INFO: 2026/01/24 10:37:35 Peer [REDACTED] updated successfully INFO: 2026/01/24 10:38:07 Triggering on-demand hole punch to 1 exit nodes WARN: 2026/01/24 10:38:07 Failed to send on-demand hole punch to 86.24.50.100: failed to write to UDP: use of closed network connection INFO: 2026/01/24 10:38:07 Removing Endpoint for peer [REDACTED] INFO: 2026/01/24 10:38:07 Peer [REDACTED] updated successfully ``` ![Image](https://github.com/user-attachments/assets/8b707710-27cd-4390-8ee8-f67418c6538b) ``` cat docker-compose.yml services: newt: image: fosrl/newt container_name: newt restart: unless-stopped environment: - PANGOLIN_ENDPOINT=https://pangolin.willthong.com - NEWT_ID=[REDACTED] - NEWT_SECRET=[REDACTED] ``` Newt is correctly routing external requests to Public Resources but no connectivity to Private Resources. Please shout if this isn't actually the same issue and I'll happily split into a new ticket. Thanks for a brilliant product!
Author
Owner

@mattheys commented on GitHub (Feb 13, 2026):

   cat docker-compose.yml
services:
  newt:
    image: fosrl/newt
    container_name: newt
    restart: unless-stopped
    environment:
      - PANGOLIN_ENDPOINT=https://pangolin.willthong.com
      - NEWT_ID=[REDACTED]                  
      - NEWT_SECRET=[REDACTED] 

Newt is correctly routing external requests to Public Resources but no connectivity to Private Resources. Please shout if this isn't actually the same issue and I'll happily split into a new ticket. Thanks for a brilliant product!

You should really open a separate issue for this I think, however you might need to add the environment variable ACCEPT_CLIENTS=true to the newt container.

<!-- gh-comment-id:3897009303 --> @mattheys commented on GitHub (Feb 13, 2026): > ``` > cat docker-compose.yml > services: > newt: > image: fosrl/newt > container_name: newt > restart: unless-stopped > environment: > - PANGOLIN_ENDPOINT=https://pangolin.willthong.com > - NEWT_ID=[REDACTED] > - NEWT_SECRET=[REDACTED] > ``` > > Newt is correctly routing external requests to Public Resources but no connectivity to Private Resources. Please shout if this isn't actually the same issue and I'll happily split into a new ticket. Thanks for a brilliant product! You should really open a separate issue for this I think, however you might need to add the environment variable ACCEPT_CLIENTS=true to the newt container.
Author
Owner

@oschwartz10612 commented on GitHub (Feb 25, 2026):

@mattheys ACCEPT_CLIENTS=true is not required and is deprecated on latest versions of newt.

I would ignore --dns as newt should use the dns of the system. Please reopen if this still a problem.

<!-- gh-comment-id:3961796890 --> @oschwartz10612 commented on GitHub (Feb 25, 2026): @mattheys ACCEPT_CLIENTS=true is not required and is deprecated on latest versions of newt. I would ignore --dns as newt should use the dns of the system. Please reopen if this still a problem.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/newt#1719