Difference between revisions of "Talk:Dnsmasq"

From ArchWiki
Jump to: navigation, search
(Close old discussion.)
(need information for fixed IPs)
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
==<s> Testing without "http://" </s> ==
 
In the test section it is recommended that the reader tries
 
dig http://archlinux.org | grep "Query time"
 
However, on both my systems running dnsmasq-2.50, querying anything prefixed with a "http://" causes dnsmasq to automatically forward the query and not to cache the reply:
 
% dig "http://archlinux.org" | grep "Query time"; !#
 
;; Query time: 493 msec
 
;; Query time: 485 msec
 
The daemon logs
 
dnsmasq: forwarded query to 208.67.220.220
 
dnsmasq: forwarded query to 208.67.220.220
 
This might lead the reader to think dnsmasq is not working, when it actually works fine with:
 
% dig "archlinux.org" | grep "Query time"; !#
 
;; Query time: 508 msec
 
;; Query time: 0 msec
 
The daemon logs
 
dnsmasq: query[A] archlinux.org from 127.0.0.1
 
dnsmasq: forwarded archlinux.org to 208.67.222.222
 
dnsmasq: forwarded archlinux.org to 208.67.220.220
 
dnsmasq: reply archlinux.org is 66.211.214.131
 
dnsmasq: query[A] archlinux.org from 127.0.0.1
 
dnsmasq: cached archlinux.org is 66.211.214.131
 
So, I'm removing the "http://" prefix. -- [[User:Tresende|Tresende]] 11:39, 12 November 2009 (EST)
 
 
 
== need information for fixed IPs ==
 
== need information for fixed IPs ==
 
when this is set in rc.conf I think that require :
 
when this is set in rc.conf I think that require :
Line 28: Line 5:
 
  mv /tmp/resolv.conf /etc/resolv.conf
 
  mv /tmp/resolv.conf /etc/resolv.conf
 
--[[User:Sputnick|Sputnick]] 17:59, 1 August 2011 (EDT)
 
--[[User:Sputnick|Sputnick]] 17:59, 1 August 2011 (EDT)
 
+
: Any error with direct change /etc/resolv.conf? Move around tmp is not very "Simple". -- [[User:Fengchao|Fengchao]] ([[User talk:Fengchao|talk]]) 01:27, 20 March 2013 (UTC)
== Easier way to work with NetworkManager ==
+
 
+
Supposedly, if you add a line like
+
 
+
      dns=dnsmasq
+
 
+
to /etc/NetworkManager/NetworkManager.conf then not only will NetworkManager do the right thing about resolv.conf, it will also start up dnsmasq for us, which seems way easier. I will test this and report back whether it works...
+
 
+
[[User:Mrpsbrk|Mrpsbrk]] ([[User talk:Mrpsbrk|talk]]) 03:35, 30 August 2012 (UTC)
+

Revision as of 01:27, 20 March 2013

need information for fixed IPs

when this is set in rc.conf I think that require :

{ echo "nameserver 127.0.0.1"; grep -v "^#" /etc/resolv.conf | head -2; } > /tmp/resolv.conf

then backup /etc/resolv.conf and last :

mv /tmp/resolv.conf /etc/resolv.conf

--Sputnick 17:59, 1 August 2011 (EDT)

Any error with direct change /etc/resolv.conf? Move around tmp is not very "Simple". -- Fengchao (talk) 01:27, 20 March 2013 (UTC)