First, get dnsmasq from your repo.
sudo apt-get install dnsmasqThen create your config file. Note: All files in this folder are parsed by dnsmasq. This allows easy management of different IP ranges.
sudo vim /etc/dnsmasq.d/my-localPut this into your config:
address=/.dev/127.0.0.1Save and close the file, then restart the dnsmasq service.
sudo service dnsmasq restartNow open your DNS config.
sudo vim /etc/resolv.confAdd your computer as DNS server. Note: If you're planning to use other domains than .dev, you should put it at the top of the file, or at least higher than other nameserver entries.
nameserver 127.0.0.1To make sure everything worked, ping a .dev domain.
ping test.devOh, and you probably want to create an init.d/ script for the dnsmasq service to start on boot.
No comments:
Post a Comment