$ aptitude install dnsmasq
$ cat >> /etc/dnsmasq.d/dev # choose any name
address=/dev.example.com/192.168.1.2
^D
$ cat >> /etc/hosts # overrides foo.dev.example.com wildcard
192.168.1.3 foo foo.dev.example.com
^D
The computers on the internal network will need to set their nameserver to the ip of the dev server.
This configuration was tested on ubuntu 12.04; YMMV; 12.04 has resolvconf installed; resolv.conf has 127.0.0.1 as nameserver; see /var/run/dnsmasq/resolv.conf for the name servers dnsmasq uses.