[GH-ISSUE #244] DNS timeout hangs the bastion #63

Closed
opened 2026-05-07 00:18:17 +02:00 by BreizhHardware · 2 comments

Originally created by @RomainL972 on GitHub (Sep 16, 2021).
Original GitHub issue: https://github.com/ovh/the-bastion/issues/244

Hi,

I noticed that if one of the DNS resolver configured on the bastion server isn't responding, the Bastion will hang for ~30 seconds before connecting the the specified host.

The commands host, dig or even ssh don't hang at all, and just use another resolver. I don't know if it's a Perl problem or a problem in the Bastion but it's very annoying when connecting is very slow and you have no idea why.

Best Regards.

Originally created by @RomainL972 on GitHub (Sep 16, 2021). Original GitHub issue: https://github.com/ovh/the-bastion/issues/244 Hi, I noticed that if one of the DNS resolver configured on the bastion server isn't responding, the Bastion will hang for ~30 seconds before connecting the the specified host. The commands `host`, `dig` or even `ssh` don't hang at all, and just use another resolver. I don't know if it's a Perl problem or a problem in the Bastion but it's very annoying when connecting is very slow and you have no idea why. Best Regards.
Author
Owner

@zer0init1 commented on GitHub (Nov 9, 2021):

Hi.
Try use options in your /etc/resolv.conf for test env. For example:

options attempts=2, timeout=2, rotate
nameserver 1.1.1.1
nameserver 8.8.8.8

For debug, try options debug

<!-- gh-comment-id:964374570 --> @zer0init1 commented on GitHub (Nov 9, 2021): Hi. Try use options in your `/etc/resolv.conf` for test env. For example: ``` options attempts=2, timeout=2, rotate nameserver 1.1.1.1 nameserver 8.8.8.8 ``` For debug, try `options debug`
Author
Owner

@speed47 commented on GitHub (Dec 17, 2021):

Closing, as this is not directly related to The Bastion: if your /etc/resolv.conf point to unresponsive DNS servers, any program running on your system will appear to be slow when attempting to use the DNS. The Bastion uses the DNS to resolve any hostname you may have passed to it, but also to get the PTR of the IP it's connecting to, for audit logs purposes.

<!-- gh-comment-id:996803865 --> @speed47 commented on GitHub (Dec 17, 2021): Closing, as this is not directly related to The Bastion: if your `/etc/resolv.conf` point to unresponsive DNS servers, any program running on your system will appear to be slow when attempting to use the DNS. The Bastion uses the DNS to resolve any hostname you may have passed to it, but also to get the PTR of the IP it's connecting to, for audit logs purposes.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/the-bastion#63
No description provided.