Last active
August 24, 2024 03:08
-
-
Save mikedamm/82958f9af8640395f3f276af92aaf980 to your computer and use it in GitHub Desktop.
Fix systemd-resolved so it does not bind port 53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# curl https://gist.githubusercontent.com/mikedamm/82958f9af8640395f3f276af92aaf980/raw/fuckyousystemd.sh | bash | |
# | |
echo "Before" | |
lsof -i -P -n | grep LISTEN | grep ':53' | |
sed -r -i.orig 's/#?DNSStubListener=yes/DNSStubListener=no/g' /etc/systemd/resolved.conf && \ | |
sh -c 'rm /etc/resolv.conf && ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf' && \ | |
systemctl restart systemd-resolved | |
echo "After" | |
lsof -i -P -n | grep LISTEN | grep ':53' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment