Skip to content

Instantly share code, notes, and snippets.

@dhiemstra
Created January 9, 2018 12:00
Show Gist options
  • Save dhiemstra/1d0167fe721ab24a7b42b288bbf53031 to your computer and use it in GitHub Desktop.
Save dhiemstra/1d0167fe721ab24a7b42b288bbf53031 to your computer and use it in GitHub Desktop.
Install dnsmasq on OSX and configure the `*.fml` TLD as local
brew install dnsmasq
CONFIG_FILE="$(brew --prefix)/etc/dnsmasq.conf"
sudo mkdir -p /etc/resolver
sed -i 's/#strict-order/strict-order/g' $CONFIG_FILE
grep -q -F 'address=/.fml/127.0.0.1' $CONFIG_FILE || echo 'address=/.fml/127.0.0.1' >> $CONFIG_FILE
sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/fml'
brew services start dnsmasq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment