-
-
Save androzd/39bf4744497a4782d5367e0466070e67 to your computer and use it in GitHub Desktop.
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
| Настройка dnsmasq |
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
| 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 |
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
| 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