[GH-ISSUE #1728] Barrier can't connect, Windows Client (auto config), Linux Server #1276

Open
opened 2026-05-05 07:41:25 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @steelman on GitHub (Jul 27, 2022).
Original GitHub issue: https://github.com/debauchee/barrier/issues/1728

What happened?

I configured service data with systemd-resolved in barrier.dnssd file

[Service]
Name=%H
Type=_barrierServerZeroconf._tcp
Port=24800

systemd-resolved seems to repond corectly

$ resolvectl -t PTR  query _barrierServerZeroconf._tcp.local
_barrierServerZeroconf._tcp.local IN PTR foo._barrierServerZeroconf._tcp.local -- link: bond0

-- Information acquired via protocol mDNS/IPv6 in 3.2ms.
-- Data is authenticated: yes
$ resolvectl -t SRV   query foo._barrierServerZeroconf._tcp.local
foo._barrierServerZeroconf._tcp.local IN SRV 0 0 24800 foo.local -- link: bond0

-- Information acquired via protocol mDNS/IPv6 in 2.2ms.
-- Data is authenticated: yes
$ resolvectl -t A query foo.local
foo.local IN A 192.168.0.101                            -- link: eth0
foo.local IN A 172.17.0.1                               -- link: docker0
foo.local IN A 192.168.0.101                            -- link: bond0
foo.local IN A 192.168.130.1                            -- link: enx0042b96ef014

-- Information acquired via protocol DNS in 2.2ms.
-- Data is authenticated: yes

But the windows client wasn't able to resolve the address of the foo host correctly (debug logs didn't show anything more relevant, just some openssl stuff)

[2022-07-27T18:54:22] NOTE: connecting to 'foo': 127.0.0.11:24800
[2022-07-27T18:54:24] WARNING: failed to connect to server: Connection was refused
[2022-07-27T18:54:25] NOTE: connecting to 'foo': 127.0.0.11:24800
[2022-07-27T18:54:27] WARNING: failed to connect to server: Connection was refused
[2022-07-27T18:54:28] NOTE: connecting to 'foo': 127.0.0.11:24800
[2022-07-27T18:54:30] WARNING: failed to connect to server: Connection was refused

Until I added

192.168.0.101 foo

to C:\Windows\system32\drivers\etc\hosts

[2022-07-27T18:54:31] NOTE: connecting to 'foo': 192.168.0.101:24800
[2022-07-27T18:54:31] NOTE: peer fingerprint (SHA1): XXXX...

Which, considering I use DHCP to configure foo's address, isn't anything more than a workaround.

Version

v2.4.0

Git commit hash (if applicable)

3e0d758b

If applicable, where did you install Barrier from?

https://github.com/debauchee/barrier/releases

What OSes are you seeing the problem on? (Check all that apply)

Windows

What OS versions are you using?

Windows 10

Relevant log output

No response

Any other information

No response

Originally created by @steelman on GitHub (Jul 27, 2022). Original GitHub issue: https://github.com/debauchee/barrier/issues/1728 ### What happened? I configured service data with systemd-resolved in [barrier.dnssd](https://www.man7.org/linux/man-pages/man5/systemd.dnssd.5.html) file ``` [Service] Name=%H Type=_barrierServerZeroconf._tcp Port=24800 ``` systemd-resolved seems to repond corectly ``` $ resolvectl -t PTR query _barrierServerZeroconf._tcp.local _barrierServerZeroconf._tcp.local IN PTR foo._barrierServerZeroconf._tcp.local -- link: bond0 -- Information acquired via protocol mDNS/IPv6 in 3.2ms. -- Data is authenticated: yes $ resolvectl -t SRV query foo._barrierServerZeroconf._tcp.local foo._barrierServerZeroconf._tcp.local IN SRV 0 0 24800 foo.local -- link: bond0 -- Information acquired via protocol mDNS/IPv6 in 2.2ms. -- Data is authenticated: yes $ resolvectl -t A query foo.local foo.local IN A 192.168.0.101 -- link: eth0 foo.local IN A 172.17.0.1 -- link: docker0 foo.local IN A 192.168.0.101 -- link: bond0 foo.local IN A 192.168.130.1 -- link: enx0042b96ef014 -- Information acquired via protocol DNS in 2.2ms. -- Data is authenticated: yes ``` But the windows client wasn't able to resolve the address of the foo host correctly (debug logs didn't show anything more relevant, just some openssl stuff) ``` [2022-07-27T18:54:22] NOTE: connecting to 'foo': 127.0.0.11:24800 [2022-07-27T18:54:24] WARNING: failed to connect to server: Connection was refused [2022-07-27T18:54:25] NOTE: connecting to 'foo': 127.0.0.11:24800 [2022-07-27T18:54:27] WARNING: failed to connect to server: Connection was refused [2022-07-27T18:54:28] NOTE: connecting to 'foo': 127.0.0.11:24800 [2022-07-27T18:54:30] WARNING: failed to connect to server: Connection was refused ``` Until I added ``` 192.168.0.101 foo ``` to C:\Windows\system32\drivers\etc\hosts ``` [2022-07-27T18:54:31] NOTE: connecting to 'foo': 192.168.0.101:24800 [2022-07-27T18:54:31] NOTE: peer fingerprint (SHA1): XXXX... ``` Which, considering I use DHCP to configure foo's address, isn't anything more than a workaround. ### Version v2.4.0 ### Git commit hash (if applicable) 3e0d758b ### If applicable, where did you install Barrier from? https://github.com/debauchee/barrier/releases ### What OSes are you seeing the problem on? (Check all that apply) Windows ### What OS versions are you using? Windows 10 ### Relevant log output _No response_ ### Any other information _No response_
Author
Owner

@steelman commented on GitHub (Jul 28, 2022):

The problem does not occur on a different server (and the very same client) when the server has a non-RFC1918 address. This might be a problem with Windows resolver. How can I debug it?

<!-- gh-comment-id:1197807967 --> @steelman commented on GitHub (Jul 28, 2022): The problem does not occur on a different server (and the very same client) when the server has a non-RFC1918 address. This might be a problem with Windows resolver. How can I debug it?
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: github-starred/barrier#1276
No description provided.