2013/02/22

快速架設 DNS - dnsmasq

在 debug 時偶爾會有一種需求,就是要假造 DNS resolve 的結果,讓一些設備能夠暫時導向我指定的 ip 去,而 bind 這一套的設定對我來說太過複雜了 ><
於是同事推薦了我這個:Dnsmasq
Dnsmasq is a lightweight, easy to configure DNS forwarder and DHCP server.
酷!一次滿足兩個願望


安裝
$ yum install dnsmasq

設定上層 DNS server
$ vim /etc/dnsmasq.resolv.conf
nameserver 8.8.8.8

自定 dns record
$ vim /etc/hosts
10.0.0.1  anything.com.tw

啟動 dnsmasq
$ /etc/init.d/dnsmasq start

搞定啦!

更多設定在 /etc/dnsmasq.conf


1 則留言:

  1. Best bets for soccer today - Sports Toto
    Today, we're going to tell you a few ventureberg.com/ key to checking 도레미시디 출장샵 into 토토 사이트 도메인 soccer betting apps. of the most popular soccer betting options sol.edu.kg and which kadangpintar ones will

    回覆刪除