Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dnsmasq mit USE flag resolvconf funktioniert nicht optimal
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
76062563
l33t
l33t


Joined: 16 Aug 2004
Posts: 637
Location: 127.0.0.1

PostPosted: Fri Jun 29, 2007 7:05 pm    Post subject: dnsmasq mit USE flag resolvconf funktioniert nicht optimal Reply with quote

Ich habe auf meinem Router dnsmasq installiert. Für dnsmasq gibt es ein USE flag namens resolvconf mit dem es möglich sein soll die Hosts aus der /etc/hosts des dns Servers zur Namensauflösung zu verwenden.
Das Ganze klappt irgendwie nur teilweise. Ich habe einen Host namens nibbler in meinem lan. Ping und ssh funktioniert nicht:
Code:
zapp ~ # ssh nibbler
ssh: nibbler: Name or service not known

Code:
zapp ~ # ping nibbler
ping: unknown host nibbler

Merkwürdigerweise funktioniert aber sowohl host als auch nslookup:
Code:
zapp ~ # nslookup nibbler
Server:         192.168.0.4
Address:        192.168.0.4#53

Name:   nibbler
Address: 192.168.0.2

Code:
zapp ~ # host nibbler
nibbler has address 192.168.0.2

Weiß jemand was hier schief läuft?
_________________
gentoo - compile your own world
Back to top
View user's profile Send private message
think4urs11
Bodhisattva
Bodhisattva


Joined: 25 Jun 2003
Posts: 6659
Location: above the cloud

PostPosted: Fri Jun 29, 2007 8:17 pm    Post subject: Reply with quote

zeig mal deine dnsmasq.conf
_________________
Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself
Back to top
View user's profile Send private message
76062563
l33t
l33t


Joined: 16 Aug 2004
Posts: 637
Location: 127.0.0.1

PostPosted: Fri Jun 29, 2007 8:53 pm    Post subject: Reply with quote

Merkwürdigerweise ist die dnsmasq.conf leer, bzw. alles auskommentiert.
Ich bin mir sicher, dass das bevor ich resolvconf als USE flag gesetzt habe nicht so war, denn ich habe vor einiger Zeit dieses howto benutzt http://www.gentoo.org/doc/de/home-router-howto.xml und da wird alles in der dnsmasq.conf konfiguriert.
Ich habe jetzt zusätzlich folgende Dateien:
/etc/dnsmasq-resolv.conf und dnsmasq-resolvconf.conf
Inhalt:
Code:
hermes ~ # cat /etc/dnsmasq-resolv.conf
# Generated by resolvconf
nameserver 217.237.151.115
nameserver 217.237.148.102
Code:
hermes ~ # cat /etc/dnsmasq-resolvconf.conf
# Generated by resolvconf

Außerdem glaube ich, dass ich vorher kein /etc/dhcp/dhcpd.conf hatte.
Inhalt:
Code:
hermes ~ # cat /etc/dhcp/dhcpd.conf
authoritative;
ddns-update-style ad-hoc;
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.200 192.168.0.250;
default-lease-time 259200;
max-lease-time 518400;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option routers 192.168.0.4;
option domain-name-servers 192.168.0.4;
}

Außerdem gibt's noch eine /etc/conf.d/dnsmasq:
Code:
hermes ~ # cat /etc/conf.d/dnsmasq
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-dns/dnsmasq/files/dnsmasq.confd,v 1.3 2004/07/14 23:23:32 agriffis Exp $

# Config file for /etc/init.d/dnsmasq

# See the dnsmasq(8) man page for possible options to put here.
DNSMASQ_OPTS="-i eth1"

_________________
gentoo - compile your own world
Back to top
View user's profile Send private message
think4urs11
Bodhisattva
Bodhisattva


Joined: 25 Jun 2003
Posts: 6659
Location: above the cloud

PostPosted: Fri Jun 29, 2007 9:35 pm    Post subject: Reply with quote

also ich habe dnsmasq (v2.39) ohne jegliches USE-Flag laufen und es funktioniert sauber.

gekürzte Configs - auf dem Server:
/etc/hosts:
127.0.0.1 localhost
10.0.0.1 router.mein.lan router
10.0.0.2 server.mein.lan server
10.0.0.3 client1.mein.lan client1
10.0.0.4 client2.mein.lan client2
/etc/resolv.conf:
domain mein.lan
nameserver 127.0.0.1
nameserver 208.67.222.222
nameserver 208.67.220.220
/etc/dnsmasq.conf:
localise-queries
domain-needed
bogus-priv
filterwin2k
interface=eth0
expand-hosts
/etc/conf.d/dnsmasq:
DNSMASQ_OPTS=""


auf client1:
/etc/resolv.conf:
nameserver 10.0.0.2
ping client2:
PING client2 (10.0.0.4) 56(84) bytes of data.
64 bytes from client2.mein.lan (10.0.0.4): icmp_seq=1 ttl=64 time=1.50 ms
64 bytes from client2.mein.lan (10.0.0.4): icmp_seq=2 ttl=64 time=0.327 ms
64 bytes from client2.mein.lan (10.0.0.4): icmp_seq=3 ttl=64 time=0.326 ms
nslookup client2:

Server:         10.0.0.2
Address:        10.0.0.2#53

Name:   client2
Address: 10.0.0.4
nslookup forums.gentoo.org:

Server:         10.0.0.2
Address:        10.0.0.2#53

Non-authoritative answer:
Name:   forums.gentoo.org
Address: 140.211.166.170

_________________
Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself
Back to top
View user's profile Send private message
zworK
Guru
Guru


Joined: 07 May 2004
Posts: 308

PostPosted: Sat Jun 30, 2007 10:22 am    Post subject: Re: dnsmasq mit USE flag resolvconf funktioniert nicht optim Reply with quote

76062563 wrote:
Für dnsmasq gibt es ein USE flag namens resolvconf mit dem es möglich sein soll die Hosts aus der /etc/hosts des dns Servers zur Namensauflösung zu verwenden.

Verwechselt du da nicht was? Das macht dnsmasq bei mir ohne dieses Useflag seit Jahren. Die Dateien /etc/resolv.conf sowie /etc/hosts werden standardmäßig von dnsmasq benutzt, ohne das man die Konfigurationsdatei anfassen muss. Das war zumindest auf allen Systemen so, auf denen ich es installiert habe.

man dnsmasq wrote:
Dnsmasq accepts DNS queries and either answers them from a small,
local, cache or forwards them to a real, recursive, DNS server. It
loads the contents of /etc/hosts so that local hostnames which do not
appear in the global DNS can be resolved and also answers DNS queries
for DHCP configured hosts.
[...]
By default, dnsmasq reads /etc/resolv.conf to
discover the IP addresses of the upstream nameservers it should use,
since the information is typically stored there. Unless --no-poll is
used, dnsmasq checks the modification time of /etc/resolv.conf (or
equivalent if --resolv-file is used) and re-reads it if it changes.
This allows the DNS servers to be set dynamically by PPP or DHCP since
both protocols provide the information.


euse -i resolvconf:
[-    ] resolvconf (net-dns/dnsmasq):
enable support for net-dns/resolvconf

eix resolvconf:
* net-dns/resolvconf-gentoo
     Available versions:  1.0 ~1.1 1.2 ~1.3
     Homepage:            http://www.gentoo.org/
     Description:         A framework for managing DNS information


Ich benutze auf meinem Router weder das Useflag, noch das Paket resolvconf (und habe auch keine Ahnung wofür das gut ist).

Mein Tipp: Mal dnsmasq ohne USE-Flags installieren und die Standardkonfiguration testen.

Edit:
/etc/dnsmasq.conf:
domain-needed
bogus-priv
localise-queries

expand-hosts

interface=eth0
interface=eth1

bind-interfaces
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum