Ubuntu 14.04 Trusty with DNS server and NetworkManager (disabling dnsmasq)

I've badly been looking for a way to both run an internal network server on eth0 and connecting to any kind of internet device, be it on wlan0 or a USB dongle.

That way, I can be online and browsing documentation, downloading new stuff etc. on the server but not depend on a static configuration but still use Network Manager for its intended purpose.

In /etc/NetworkManager/NetworkManager.conf, uncomment the dnsmasq option like so, because Network Manager's dnsmasq blocks listening to these ports if you want to run your own DNS server:

# dns=dnsmasq

But that's not all! We need /etc/resolv.conf to be updated with the external DNS providers that Network Manager discovers. This can be achieved by removing resolvconf which automatically alters /etc/resolv.conf.

apt-get remove resolvconf

There, done! Now add static configurations in /etc/networks/interfaces.d/ or /etc/networks/interfaces and let Network Manager handle your WLAN interfaces.