You are not logged in.

#1 2016-04-01 12:33:59

netpumber
Member
Registered: 2009-09-20
Posts: 134

Mysterious changes in dnscrypt-proxy .service and .socket files

Hello.

I have a year now that i'm using the dnscrypt-proxy service that listens for DNS requests at port 2053 and then on top of that i have dnsmasq using the port 53 and sending the requests at 127.0.0.1#2053.

Twice something happened (the second was today), and i couldn't send dns requests. Logs revealed that dnsmasq could not run because something else was using port 53. That "something else" was the dnscrypt-proxy. But i had configured it to listen at 2053 ! What i figured out is that there were some changes at .service and .socket files of dnscrypt-proxy.

First is my configuration and follows, changes that happened.

.socket file

[Unit]
Description=dnscrypt-proxy listening socket

[Socket]
ListenStream=127.0.0.1:2053
ListenDatagram=127.0.0.1:2053

[Install]
WantedBy=sockets.target

.service file

[Unit]
Description=DNSCrypt client proxy
Documentation=man:dnscrypt-proxy(8)
Requires=dnscrypt-proxy.socket
After=network.target
Before=nss-lookup.target

[Install]
Also=dnscrypt-proxy.socket
WantedBy=multi-user.target

[Service]
Type=simple
NonBlocking=true
ExecStart=/usr/bin/dnscrypt-proxy \
	  -R d0wn-gr-ns1

Changed :

.socket file

[Unit]
Description=dnscrypt-proxy listening socket

[Socket]
ListenStream=127.0.0.1:53
ListenDatagram=127.0.0.1:53

[Install]
WantedBy=sockets.target

.service file

[Unit]
Description=DNSCrypt client proxy
Documentation=man:dnscrypt-proxy(8)
Requires=dnscrypt-proxy.socket
After=network.target
Before=nss-lookup.target

[Install]
Also=dnscrypt-proxy.socket
WantedBy=multi-user.target

[Service]
Type=simple
NonBlocking=true
ExecStart=/usr/bin/dnscrypt-proxy \
	  -R dnscrypt.eu-nl

As you can see, port and server have been changed. I thought that it might be due to an update but the last update on this package was on 2016-02-03. How is it possible to occurred today ?

Offline

#2 2016-04-02 20:47:57

branch
Member
Registered: 2014-03-16
Posts: 209

Re: Mysterious changes in dnscrypt-proxy .service and .socket files

What files are those exactly (full path)?

Offline

#3 2016-04-03 12:29:46

netpumber
Member
Registered: 2009-09-20
Posts: 134

Re: Mysterious changes in dnscrypt-proxy .service and .socket files

I'm talking about

/usr/lib/systemd/system/dnscrypt-proxy.socket
/usr/lib/systemd/system/dnscrypt-proxy.service

Offline

#4 2016-04-03 15:03:20

branch
Member
Registered: 2014-03-16
Posts: 209

Re: Mysterious changes in dnscrypt-proxy .service and .socket files

Don't modify files those files, changes will be overwritten on updates. Override them with files in /etc/systemd/system.

As for the time disparity, you will not see the effect of the package update until you actually update your system and an event triggers the .socket and .service to be restarted.

Offline

Board footer

Powered by FluxBB