The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
Difference between revisions of "Package:Dnsmasq"
Threesixes (talk | contribs) m |
Threesixes (talk | contribs) m (more details) |
||
Line 11: | Line 11: | ||
=== Configuration === | === Configuration === | ||
{{c|/etc/dnsmasq.conf}} is where most of dnsmasq's configuration is done. It's file is well commented, and ready for several scenarios. | {{c|/etc/dnsmasq.conf}} is where most of dnsmasq's configuration is done. It's file is well commented, and ready for several scenarios. | ||
==== DNS only ==== | |||
{{important|place other upstream dns servers in /etc/resolv.dnsmasq.conf with your preferred DNS server at the top of the list. The first console command in the block will wipe out existing /etc/resolv.dnsmasq.conf settings, back them up if you have anything important in them.}} | |||
{{console|body=###i## echo "nameserver 8.8.8.8" > /etc/resolv.dnsmasq.conf | |||
###i## echo "resolv-file=/etc/resolv.dnsmasq.conf" >> /etc/dnsmasq.conf | |||
###i## echo "listen-address=127.0.0.1" >> /etc/dnsmasq.conf}} | |||
Now your localhost / 127.0.0.1 is your primary DNS to point net connection scripts to. | |||
{{console|body=###i## echo "nameserver 127.0.0.1" > /etc/resolv.conf | |||
###i## echo "nameserver 8.8.8.8" >> /etc/resolv.conf}} | |||
=== Runtime === | === Runtime === | ||
{{console|body=###i## rc-update add dnsmasq default | {{console|body=###i## rc-update add dnsmasq default | ||
###i## rc}} | ###i## rc}} | ||
{{PageNeedsUpdates}} | {{PageNeedsUpdates}} | ||
{{EbuildFooter}} | {{EbuildFooter}} |
Revision as of 10:18, May 11, 2015
Dnsmasq
We welcome improvements to this page. To edit this page, Create a Funtoo account. Then log in and then click here to edit this page. See our editing guidelines to becoming a wiki-editing pro.
Dnsmasq is a dns cache, dhcp, and pxe server. This package is lightweight, and will work well for individual computers, or small lans.
Installation
root # emerge net-dns/dnsmasq
Configuration
/etc/dnsmasq.conf
is where most of dnsmasq's configuration is done. It's file is well commented, and ready for several scenarios.
DNS only
place other upstream dns servers in /etc/resolv.dnsmasq.conf with your preferred DNS server at the top of the list. The first console command in the block will wipe out existing /etc/resolv.dnsmasq.conf settings, back them up if you have anything important in them.
root # echo "nameserver 8.8.8.8" > /etc/resolv.dnsmasq.conf root # echo "resolv-file=/etc/resolv.dnsmasq.conf" >> /etc/dnsmasq.conf root # echo "listen-address=127.0.0.1" >> /etc/dnsmasq.conf
Now your localhost / 127.0.0.1 is your primary DNS to point net connection scripts to.
root # echo "nameserver 127.0.0.1" > /etc/resolv.conf root # echo "nameserver 8.8.8.8" >> /etc/resolv.conf
Runtime
root # rc-update add dnsmasq default root # rc