1.brew でdnsmasq をインストール $ brew install dnsmasq 2.サンプルの設定ファイルをコピーして $ cp /usr/local/opt/dnsmasq/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf 3.サービス登録 $ sudo cp -fv /usr/local/opt/dnsmasq/*.plist /Library/LaunchDaemons $ sudo chown root /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist $ sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist 4.dnsをローカルにする $ sudo vi /etc/resolv.conf nameserver 127.0.0.1 nameserver 192.168.0.1 nameserver 8.8.8.8 5.サービス起動 $ sudo launchctl start homebrew.mxcl.dnsmasq 6.確認 $ dig www.yahoo.co.jp ; <<>> DiG 9.8.3-P1 <<>> www.yahoo.co.jp ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 38942 ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;www.yahoo.co.jp. IN A ;; ANSWER SECTION: www.yahoo.co.jp. 212 IN CNAME edge.g.yimg.jp. edge.g.yimg.jp. 2 IN A 183.79.248.252 ;; Query time: 39 msec ;; SERVER: 12