Skip to content

Instantly share code, notes, and snippets.

@dragonfire1119
Last active May 21, 2025 12:30
Show Gist options
  • Save dragonfire1119/bd3a1883ec1e36d9d15500eb75796014 to your computer and use it in GitHub Desktop.
Save dragonfire1119/bd3a1883ec1e36d9d15500eb75796014 to your computer and use it in GitHub Desktop.
Disable systemd-resolved

Check and see if port 53 is taken:

lsof -i :53

OR

netstat -tulpn | grep ":53 "

Disable and stop the systemd-resolved service:

sudo systemctl disable systemd-resolved.service
sudo systemctl stop systemd-resolved.service
@huesofredy
Copy link

I can't deactivate the port, it gives me this error when launching the last command

ash-4.4# sudo systemctl stop systemd-resolved.service
Failed to stop systemd-resolved.service: Unit systemd-resolved.service not loaded. ¿?

@ilariima
Copy link

same problem getting this error:
#Failed to disable unit: Unit file systemd-resolved.service does not exist.
#Failed to stop systemd-resolved.service: Unit systemd-resolved.service not loaded.

@supermario5757
Copy link

same

@TheNilesh
Copy link

On casaos/rpi, the port 53 is occupied by docker-proxy process and not systems. Hence the commands wont work, I'm afraid to kill docker-proxy, what if it takes down casaos? Any expert please help

$ sudo netstat -tulpn | grep ":53 "
tcp        0      0 0.0.0.0:53              0.0.0.0:*               LISTEN      1152/docker-proxy   
tcp6       0      0 :::53                   :::*                    LISTEN      1166/docker-proxy   
udp        0      0 0.0.0.0:53              0.0.0.0:*                           1182/docker-proxy   
udp6       0      0 :::53                   :::*                                1198/docker-proxy 

@Jaysonh04
Copy link

Jaysonh04 commented May 11, 2025

can confirm it will kill casaos and your wifi in general, if you happen to make the same mistake use this, Run (resolvectl status) (or systemd-resolve --status in older versions of systemd). The output should look like this:

@marcosmerlo12
Copy link

marcosmerlo12 commented May 21, 2025

you are running AdGuard Home via Docker and it is, in fact, directly exposing port 53 (TCP and UDP) for all interfaces (0.0.0.0 and ::), so the docker-proxy process appears to be occupying that port.

This is normal and safe in this case, as it is AdGuard Home that is using port 53 through Docker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment