Created
July 6, 2018 00:32
-
-
Save useafterfree/e27b70c6b6bc244978bf7928987f767f to your computer and use it in GitHub Desktop.
This will fix DNS issues for Rancher on Ubuntu 16 and 18.
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
| if cat /etc/lsb-release | grep -q 18; then | |
| rm /etc/resolv.conf | |
| ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf | |
| reboot now | |
| else | |
| FILE=/etc/NetworkManager/NetworkManager.conf; | |
| cat $FILE | grep dnsmasq; | |
| sed -i 's/^dns=dnsmasq/#dns=dnsmasq/g' $FILE; | |
| cat $FILE | grep dnsmasq; | |
| systemctl restart NetworkManager; | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment