Is there a specific reason for using dnsmasq
as opposed to adding?
You could simply add entries to theyour /private/etc/hosts
file leaving DNS pointed to whichever ISP you happen to be connected to. Here's how to do that using Terminal:
sudo nano /private/etc/hosts
Enter you password when prompted.
Add any additions at the end of the hosts file (a single entry per line), for example:
127.0.0.1 local.dev
Control + O and leaving DNS pointedthen enter to your ISP?save the file within nano. Control + X to exit nano.
You'll than need to flush the local DNS cache using: dscacheutil -flushcache