Skip to content

Instantly share code, notes, and snippets.

@androzd
Last active September 25, 2016 09:43
Show Gist options
  • Select an option

  • Save androzd/39bf4744497a4782d5367e0466070e67 to your computer and use it in GitHub Desktop.

Select an option

Save androzd/39bf4744497a4782d5367e0466070e67 to your computer and use it in GitHub Desktop.
Настройка dnsmasq
apt install dnsmasq
#add this line to /etc/dnsmasq.conf
address=/loc/127.0.0.1
#restart dnsmasq with
sudo systemctl restart dnsmasq
#create directory
sudo mkdir -p /etc/resolver
#make file
sudo tee /etc/resolver/loc >/dev/null <<EOF
nameserver 127.0.0.1
EOF
#after this operations all .loc will search localy
brew install dnsmasq
#default config
cp $(brew list dnsmasq | grep /dnsmasq.conf.example$) /usr/local/etc/dnsmasq.conf
#daemon configuration
sudo cp $(brew list dnsmasq | grep /homebrew.mxcl.dnsmasq.plist$) /Library/LaunchDaemons/
#autostart
sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
#add this line to /usr/local/etc/dnsmasq.conf
address=/loc/127.0.0.1
#restart dnsmasq with
sudo brew services restart dnsmasq
#create directory
sudo mkdir -p /etc/resolver
#make file
sudo tee /etc/resolver/loc >/dev/null <<EOF
nameserver 127.0.0.1
EOF
#after this operations all .loc will search localy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment