https://docs.google.com/document/d/1iPxBIFQhG2kfoILXmzxe6aSFnfOe84hv5AKiF-8mCvM/edit?pli=1 QNAP DNS Server Instructions C. Slappey SETUP 1. Install Optware ipkg from list of apps in QNAP->Administration->Application Servers->QPKG Center 2. Enable SSH server 3. Install putty and connect 4. Check ipkg installation by typing ipkg --version 5. Update pkgmgr and install packages. See http://wiki.qnap.com/wiki/Using_IPKG ipkg update /opt/bin/ipkg install dnsmasq ipkg install nano 6. Copy the hosts file to a place where it won’t be overwritten at boot. See http://forum.qnap.com/viewtopic.php?f=90&t=24512 mkdir /etc/config/user cp /etc/hosts /etc/config/user/dnsmasq-hosts.conf 7. Copy the resolv file to a place where it won’t be overwritten at boot cp /etc/resolv.conf /etc/config/user/dnsmasq-resolv.conf 8. Edit hosts file to contain your ip/ name resolutions nano /etc/config/user/dnsmasq-hosts.conf 127.0.0.1 localhost localhost ipaddress0 QNAPServer.com QNAPServer ipaddress1 name1 ipaddress2 name2 Ctrl+o - Save as Enter - Select Ctrl+x - Exit 9. Edit resolv file. See http://forum.qnap.com/viewtopic.php?f=90&t=24512 (As of today I will be using 8.8.8.8 and 8.8.4.4 Google Domain Name Servers) nano /etc/config/user/dnsmasq-resolv.conf nameserver X.X.X.X (IP of normal DNS entry 1) nameserver Y.Y.Y.Y (IP of normal DNS entry 2) search Aydindril (where Aydindril is your workgroup) Ctrl+o - Save as Enter - Select Ctrl+x - Exit 10. Edit dnsmasq.conf file. See http://forum.qnap.com/viewtopic.php?f=90&t=24512 (If not using Qnap, but other linux machine, could be in /etc/dnsmasq.conf instead) nano /opt/etc/dnsmasq.conf user=admin no-hosts #don’t use /etc/hosts because it is overwritten at boot addn-hosts=/etc/config/user/dnsmasq-hosts.conf #Read custom hosts resolv-file=/etc/config/user/dnsmasq-resolv.conf #Override resolv.conf 11. Run the service. (/etc/init.d/dnsmasq start on other linux machines) /opt/etc/init.d/S56dnsmasq start TESTING From a computer change the dns settings to manually assign rather than automatic. Test that you can go to your custom hosts from a browser or other means. Test that you can still reach unspecified hosts (try your favorite website or something). If it works then http://wiki.qnap.com/wiki/Install_Optware_IPKG#Note