DNS server and search in ubuntu

I found out that you can change the nameservers that dnsmasq uses by adding the following lines to /etc/dnsmasq.conf:
server=8.8.8.8
server=8.8.4.4
I didn’t have a /etc/dnsmasq.conf file though, since it’s installed by the dnsmasq package, but Ubuntu only comes with dnsmasq-base. I ran sudo apt-get install dnsmasq, then edited /etc/dnsmasq.conf, then sudo service dnsmasq restart and sudo service network-manager restart.
I ran sudo tail -n 200 /var/log/syslog to check my syslog and verify that dnsmasq was using the nameservers I specified:
Oct 21 23:00:54 mylaptop dnsmasq[8611]: using nameserver 8.8.8.8#53

then sudo /etc/dnsmasq.conf and enter below
server=10.0.5.3
domain=atbx.net

you must reboot the Linux box and should ping then resolve the internal hostname

About Damon Luong

San Jose, California
This entry was posted in ubuntu. Bookmark the permalink.