OSX Mavericks - BIND no longer installed… how to get local DNS server working?

前端 未结 7 539
一个人的身影
一个人的身影 2021-01-31 04:47

I have always used BIND on OSX to provide a local DNS resolver for my local development machines, particularly to facilitate virtual machines accessing my local dev environment.

7条回答
  •  一生所求
    2021-01-31 05:20

    I used to use a local DNS server running on the MAC until I discovered DNSMasq on DD-WRT

    I setup a DD-WRT router for my LAN and WIFI and then used the DNSMasq feature of DD-WRT to list all entires that should map to development machines.

    Log into your DD-WRT router:

    Under Services, Enable DNSMasq

    Under "Additional DNSMasq options" list each entry you want to mask:

    address=/[url]/[ip]
    

    Examples:

    address=/www.dev.mysite.com/192.168.1.10
    address=/photos.dev.mysite.com/192.168.1.11
    address=/static.dev.mysite.com/192.168.1.12
    

    This is almost like running your own DNS server on the router just for local addresses but without the overhead.

    This way I can connect to local development machines via the LAN and all mobile devices via WIFI without much hassle.

    Advantages:

    • No DNS server overhead on your MAC
    • No DNS configuration required just works via DHCP
    • Easily connect mobile devices via WIFI to development machines!
    • Easy to maintain & configure via router interface

提交回复
热议问题