free port 53
Steps to Disable DNSStubListener (Recommended Method)
Create a configuration file: Create or edit /etc/systemd/resolved.conf.d/no-stub.conf.
bash
sudo mkdir -p /etc/systemd/resolved.conf.d
echo -e "[Resolve]\nDNSStubListener=no" | sudo tee /etc/systemd/resolved.conf.d/no-stub.conf
Restart the service:
bash
sudo systemctl restart systemd-resolved
Update /etc/resolv.conf: If it still points to 127.0.0.53, you may need to update the symlink to use your network manager's settings or a static DNS server.
bash
sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
Alternative: Stop and Disable the Service Entirely
If you don't need systemd-resolved at all, you can stop it completely:
bash
sudo systemctl stop systemd-resolved
sudo systemctl disable systemd-resolved
Verification
Run the following command to check if port 53 is still in use:
bash
sudo netstat -tlnp | grep :53
# OR
sudo ss -tulpn | grep :53
stop kvm default network
sudo virsh net-destroy default
sudo virsh net-undefine default
Comments
Post a Comment