Created
August 3, 2024 08:20
-
-
Save svedova/329f20e7e8eba88ea73ca76eb782a1bd to your computer and use it in GitHub Desktop.
dnsmasq.sh
This file contains 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
#!/usr/bin/env bash | |
# In order to run this script use: | |
# $ bash scripts/dnsmasq.sh | |
# Install dnsmasq | |
brew install dnsmasq | |
# Create config folder if it doesn’t already exist | |
mkdir -pv $(brew --prefix)/etc/ | |
# Configure dnsmasq for *.stormkit | |
echo 'address=/.stormkit/127.0.0.1' >> $(brew --prefix)/etc/dnsmasq.conf | |
# Configure the port for macOS High Sierra | |
echo 'port=53' >> $(brew --prefix)/etc/dnsmasq.conf | |
# Start dnsmasq as a service so it automatically starts at login | |
sudo brew services start dnsmasq | |
# Create a dns resolver | |
sudo mkdir -pv /etc/resolver | |
sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/stormkit' | |
# Verify that all .sk.local requests are using 127.0.0.1 | |
scutil --dns |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment