Dnscrypt-proxy: [macOS] error 255 when starting dnscrypt-proxy with brew services

Created on 20 Mar 2018  路  6Comments  路  Source: DNSCrypt/dnscrypt-proxy

dnscrypt-proxy: v2.0.6
installed with Homebrew
OS X 10.11.6 (El Capitan)

Used to work great, but after a reboot, the dnscrypt-proxy service tries its auto-start, but exits with error code 255, resulting in broken internet, because the Network configuration is set to resolver 127.0.0.*.

Starting it manually with sudo brew services start dnscrypt-proxy produces the same result.

Any ideas what the problem could be?

Most helpful comment

Ifconfig alias

All 6 comments

Can you enable logging to a file and see what you get?

This is logged at level 2 (just tested: same at levels 1 & 0):

[2018-03-21 01:43:57] [NOTICE] Source [https://download.dnscrypt.info/resolvers-list/v2/public-resolvers.md] loaded
[2018-03-21 01:43:57] [NOTICE] dnscrypt-proxy 2.0.6
[2018-03-21 01:43:57] [FATAL] listen udp 127.0.0.54:53: bind: can't assign requested address
[2018-03-21 01:44:07] [NOTICE] Source [https://download.dnscrypt.info/resolvers-list/v2/public-resolvers.md] loaded
[2018-03-21 01:44:07] [NOTICE] dnscrypt-proxy 2.0.6
[2018-03-21 01:44:07] [FATAL] listen udp 127.0.0.54:53: bind: can't assign requested address
[2018-03-21 01:44:17] [NOTICE] Source [https://download.dnscrypt.info/resolvers-list/v2/public-resolvers.md] loaded
[2018-03-21 01:44:17] [NOTICE] dnscrypt-proxy 2.0.6
[2018-03-21 01:44:17] [FATAL] listen udp 127.0.0.54:53: bind: can't assign requested address
[2018-03-21 01:44:27] [NOTICE] Source [https://download.dnscrypt.info/resolvers-list/v2/public-resolvers.md] loaded
[2018-03-21 01:44:27] [NOTICE] dnscrypt-proxy 2.0.6
[2018-03-21 01:44:27] [FATAL] listen udp 127.0.0.54:53: bind: can't assign requested address
[2018-03-21 01:44:38] [NOTICE] Source [https://download.dnscrypt.info/resolvers-list/v2/public-resolvers.md] loaded
[2018-03-21 01:44:38] [NOTICE] dnscrypt-proxy 2.0.6
[2018-03-21 01:44:38] [FATAL] listen udp 127.0.0.54:53: bind: can't assign requested address
[2018-03-21 01:44:48] [NOTICE] Source [https://download.dnscrypt.info/resolvers-list/v2/public-resolvers.md] loaded
[2018-03-21 01:44:48] [NOTICE] dnscrypt-proxy 2.0.6
[2018-03-21 01:44:48] [FATAL] listen udp 127.0.0.54:53: bind: can't assign requested address

That looks pretty legitimate. 127.0.0.54 has to be mapped to an interface before a server can use it. Only 127.0.0.1 is mapped to the local interface by default.

OK, I tried sudo route add -host 127.0.0.54 -interface en1, but the service still exits with error 255. (?) Maybe use lo0 instead of en1?

EDIT: no, using lo0 doesn't work either.

Ifconfig alias

Yes, that worked, thank you. I'll have to create a daemon, though, because it's not permanent. That's probably why the reboot killed the dnscrypt-proxy service, because the old alias from version 1 was probably still in place, but removed after reboot.

Was this page helpful?
0 / 5 - 0 ratings