1 |
> > I think localhost is assigned to 127.0.0.1, or did i misunderstood |
2 |
> > something? |
3 |
> |
4 |
> No, that's (usually) correct. But in the route excerpt you've cited |
5 |
> above (please post "route -n" next time!) the route for "localhost" was |
6 |
> set to "dev eth0". Also, the subnet was a /24 one, instead of the |
7 |
> usual /8 for localhost. So there's some inconsistency between that file |
8 |
> and the routes. The /etc/hosts you've shown looks good, please post |
9 |
> dnsmasq's config. |
10 |
|
11 |
Here are the files you have requested! |
12 |
|
13 |
route -n on desktop |
14 |
|
15 |
Kernel IP routing table |
16 |
Destination Gateway Genmask Flags Metric Ref Use Iface |
17 |
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 |
18 |
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo |
19 |
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0 |
20 |
|
21 |
route -n on router |
22 |
|
23 |
Kernel IP routing table |
24 |
Destination Gateway Genmask Flags Metric Ref Use Iface |
25 |
88.67.16.1 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0 |
26 |
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 |
27 |
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo |
28 |
0.0.0.0 88.67.16.1 0.0.0.0 UG 0 0 0 ppp0 |
29 |
|
30 |
dnsmasq.conf on router |
31 |
|
32 |
# Configuration file for dnsmasq. |
33 |
# |
34 |
# Format is one option per line, legal options are the same |
35 |
# as the long options legal on the command line. See |
36 |
# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details. |
37 |
|
38 |
# The following two options make you a better netizen, since they |
39 |
# tell dnsmasq to filter out queries which the public DNS cannot |
40 |
# answer, and which load the servers (especially the root servers) |
41 |
# uneccessarily. If you have a dial-on-demand link they also stop |
42 |
# these requests from bringing up the link uneccessarily. |
43 |
|
44 |
# Never forward plain names (without a dot or domain part) |
45 |
domain-needed |
46 |
# Never forward addresses in the non-routed address spaces. |
47 |
bogus-priv |
48 |
|
49 |
|
50 |
# Uncomment this to filter useless windows-originated DNS requests |
51 |
# which can trigger dial-on-demand links needlessly. |
52 |
# Note that (amongst other things) this blocks all SRV requests, |
53 |
# so don't use it if you use eg Kerberos. |
54 |
# This option only affects forwarding, SRV records originating for |
55 |
# dnsmasq (via srv-host= lines) are not suppressed by it. |
56 |
#filterwin2k |
57 |
|
58 |
# Change this line if you want dns to get its upstream servers from |
59 |
# somewhere other that /etc/resolv.conf |
60 |
#resolv-file= |
61 |
|
62 |
# By default, dnsmasq will send queries to any of the upstream |
63 |
# servers it knows about and tries to favour servers to are known |
64 |
# to be up. Uncommenting this forces dnsmasq to try each query |
65 |
# with each server strictly in the order they appear in |
66 |
# /etc/resolv.conf |
67 |
#strict-order |
68 |
|
69 |
# If you don't want dnsmasq to read /etc/resolv.conf or any other |
70 |
# file, getting its servers from this file instead (see below), then |
71 |
# uncomment this |
72 |
#no-resolv |
73 |
|
74 |
# If you don't want dnsmasq to poll /etc/resolv.conf or other resolv |
75 |
# files for changes and re-read them then uncomment this. |
76 |
#no-poll |
77 |
|
78 |
# Add other name servers here, with domain specs if they are for |
79 |
# non-public domains. |
80 |
#server=/localnet/192.168.0.1 |
81 |
|
82 |
# Add local-only domains here, queries in these domains are answered |
83 |
# from /etc/hosts or DHCP only. |
84 |
#local=/localnet/ |
85 |
|
86 |
# Add domains which you want to force to an IP address here. |
87 |
# The example below send any host in doubleclick.net to a local |
88 |
# webserver. |
89 |
#address=/doubleclick.net/127.0.0.1 |
90 |
|
91 |
# If you want dnsmasq to change uid and gid to something other |
92 |
# than the default, edit the following lines. |
93 |
#user= |
94 |
#group= |
95 |
|
96 |
# If you want dnsmasq to listen for DHCP and DNS requests only on |
97 |
# specified interfaces (and the loopback) give the name of the |
98 |
# interface (eg eth0) here. |
99 |
# Repeat the line for more than one interface. |
100 |
interface=eth0 |
101 |
# Or you can specify which interface _not_ to listen on |
102 |
#except-interface= |
103 |
# Or which to listen on by address (remember to include 127.0.0.1 if |
104 |
# you use this.) |
105 |
#listen-address= |
106 |
# If you want dnsmasq to provide only DNS service on an interface, |
107 |
# configure it as shown above, and then use the following line to |
108 |
# disable DHCP on it. |
109 |
#no-dhcp-interface= |
110 |
|
111 |
# On systems which support it, dnsmasq binds the wildcard address, |
112 |
# even when it is listening on only some interfaces. It then discards |
113 |
# requests that it shouldn't reply to. This has the advantage of |
114 |
# working even when interfaces come and go and change address. If you |
115 |
# want dnsmasq to really bind only the interfaces it is listening on, |
116 |
# uncomment this option. About the only time you may need this is when |
117 |
# running another nameserver on the same machine. |
118 |
#bind-interfaces |
119 |
|
120 |
# If you don't want dnsmasq to read /etc/hosts, uncomment the |
121 |
# following line. |
122 |
#no-hosts |
123 |
# or if you want it to read another file, as well as /etc/hosts, use |
124 |
# this. |
125 |
#addn-hosts=/etc/banner_add_hosts |
126 |
|
127 |
# Set this (and domain: see below) if you want to have a domain |
128 |
# automatically added to simple names in a hosts-file. |
129 |
#expand-hosts |
130 |
|
131 |
# Set the domain for dnsmasq. this is optional, but if it is set, it |
132 |
# does the following things. |
133 |
# 1) Allows DHCP hosts to have fully qualified domain names, as long |
134 |
# as the domain part matches this setting. |
135 |
# 2) Sets the "domain" DHCP option thereby potentially setting the |
136 |
# domain of all systems configured by DHCP |
137 |
# 3) Provides the domain part for "expand-hosts" |
138 |
#domain=thekelleys.org.uk |
139 |
|
140 |
# Uncomment this to enable the integrated DHCP server, you need |
141 |
# to supply the range of addresses available for lease and optionally |
142 |
# a lease time. If you have more than one network, you will need to |
143 |
# repeat this for each network on which you want to supply DHCP |
144 |
# service. |
145 |
dhcp-range=192.168.0.1,192.168.0.255,72h |
146 |
|
147 |
# This is an example of a DHCP range where the netmask is given. This |
148 |
# is needed for networks we reach the dnsmasq DHCP server via a relay |
149 |
# agent. If you don't know what a DHCP relay agent is, you probably |
150 |
# don't need to worry about this. |
151 |
#dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h |
152 |
|
153 |
# This is an example of a DHCP range with a network-id, so that |
154 |
# some DHCP options may be set only for this network. |
155 |
#dhcp-range=red,192.168.0.50,192.168.0.150 |
156 |
|
157 |
# Supply parameters for specified hosts using DHCP. There are lots |
158 |
# of valid alternatives, so we will give examples of each. Note that |
159 |
# IP addresses DO NOT have to be in the range given above, they just |
160 |
# need to be on the same network. The order of the parameters in these |
161 |
# do not matter, it's permissble to give name,adddress and MAC in any order |
162 |
|
163 |
# Always allocate the host with ethernet address 11:22:33:44:55:66 |
164 |
# The IP address 192.168.0.60 |
165 |
#dhcp-host=11:22:33:44:55:66,192.168.0.60 |
166 |
|
167 |
# Always set the name of the host with hardware address |
168 |
# 11:22:33:44:55:66 to be "fred" |
169 |
#dhcp-host=11:22:33:44:55:66,fred |
170 |
|
171 |
# Always give the host with ethernet address 11:22:33:44:55:66 |
172 |
# the name fred and IP address 192.168.0.60 and lease time 45 minutes |
173 |
#dhcp-host=11:22:33:44:55:66,fred,192.168.0.60,45m |
174 |
|
175 |
# Give the machine which says it's name is "bert" IP address |
176 |
# 192.168.0.70 and an infinite lease |
177 |
#dhcp-host=bert,192.168.0.70,infinite |
178 |
|
179 |
# Always give the host with client identifier 01:02:02:04 |
180 |
# the IP address 192.168.0.60 |
181 |
#dhcp-host=id:01:02:02:04,192.168.0.60 |
182 |
|
183 |
# Always give the host with client identifier "marjorie" |
184 |
# the IP address 192.168.0.60 |
185 |
#dhcp-host=id:marjorie,192.168.0.60 |
186 |
|
187 |
# Enable the address given for "judge" in /etc/hosts |
188 |
# to be given to a machine presenting the name "judge" when |
189 |
# it asks for a DHCP lease. |
190 |
#dhcp-host=judge |
191 |
|
192 |
# Never offer DHCP service to a machine whose ethernet |
193 |
# address is 11:22:33:44:55:66 |
194 |
#dhcp-host=11:22:33:44:55:66,ignore |
195 |
|
196 |
# Ignore any client-id presented by the machine with ethernet |
197 |
# address 11:22:33:44:55:66. This is useful to prevent a machine |
198 |
# being treated differently when running under different OS's or |
199 |
# between PXE boot and OS boot. |
200 |
#dhcp-host=11:22:33:44:55:66,id:* |
201 |
|
202 |
# Send extra options which are tagged as "red" to |
203 |
# the machine with ethernet address 11:22:33:44:55:66 |
204 |
#dhcp-host=11:22:33:44:55:66,net:red |
205 |
|
206 |
# Send extra options which are tagged as "red" to |
207 |
# any machine with ethernet address starting 11:22:33: |
208 |
#dhcp-host=11:22:33:*:*:*,net:red |
209 |
|
210 |
# Send extra options which are tagged as "red" to any machine whose |
211 |
# DHCP vendorclass string includes the substring "Linux" |
212 |
#dhcp-vendorclass=red,Linux |
213 |
|
214 |
# Send extra options which are tagged as "red" to any machine one |
215 |
# of whose DHCP userclass strings includes the substring "accounts" |
216 |
#dhcp-userclass=red,accounts |
217 |
|
218 |
# Send extra options which are tagged as "red" to any machine whose |
219 |
# MAC address matches the pattern. |
220 |
#dhcp-mac=red,00:60:8C:*:*:* |
221 |
|
222 |
# If this line is uncommented, dnsmasq will read /etc/ethers and act |
223 |
# on the ethernet-address/IP pairs found there just as if they had |
224 |
# been given as --dhcp-host options. Useful if you keep |
225 |
# MAC-address/host mappings there for other purposes. |
226 |
#read-ethers |
227 |
|
228 |
# Send options to hosts which ask for a DHCP lease. |
229 |
# See RFC 2132 for details of available options. |
230 |
# Note that all the common settings, such as netmask and |
231 |
# broadcast address, DNS server and default route, are given |
232 |
# sane defaults by dnsmasq. You very likely will not need any |
233 |
# any dhcp-options. If you use Windows clients and Samba, there |
234 |
# are some options which are recommended, they are detailed at the |
235 |
# end of this section. |
236 |
# For reference, the common options are: |
237 |
# subnet mask - 1 |
238 |
# default router - 3 |
239 |
# DNS server - 6 |
240 |
# broadcast address - 28 |
241 |
|
242 |
# Override the default route supplied by dnsmasq, which assumes the |
243 |
# router is the same machine as the one running dnsmasq. |
244 |
#dhcp-option=3,1.2.3.4 |
245 |
|
246 |
# Set the NTP time server addresses to 192.168.0.4 and 10.10.0.5 |
247 |
#dhcp-option=42,192.168.0.4,10.10.0.5 |
248 |
|
249 |
# Set the NTP time server address to be the same machine as |
250 |
# is running dnsmasq |
251 |
#dhcp-option=42,0.0.0.0 |
252 |
|
253 |
# Set the NIS domain name to "welly" |
254 |
#dhcp-option=40,welly |
255 |
|
256 |
# Set the default time-to-live to 50 |
257 |
#dhcp-option=23,50 |
258 |
|
259 |
# Set the "all subnets are local" flag |
260 |
#dhcp-option=27,1 |
261 |
|
262 |
# Send the etherboot magic flag and then etherboot options (a string). |
263 |
#dhcp-option=128,e4:45:74:68:00:00 |
264 |
#dhcp-option=129,NIC=eepro100 |
265 |
|
266 |
# Specify an option which will only be sent to the "red" network |
267 |
# (see dhcp-range for the declaration of the "red" network) |
268 |
#dhcp-option=red,42,192.168.1.1 |
269 |
|
270 |
# The following DHCP options set up dnsmasq in the same way as is specified |
271 |
# for the ISC dhcpcd in |
272 |
# http://www.samba.org/samba/ftp/docs/textdocs/DHCP-Server-Configuration.txt |
273 |
# adapted for a typical dnsmasq installation where the host running |
274 |
# dnsmasq is also the host running samba. |
275 |
# you may want to uncomment them if you use Windows clients and Samba. |
276 |
#dhcp-option=19,0 # option ip-forwarding off |
277 |
#dhcp-option=44,0.0.0.0 # set netbios-over-TCP/IP nameserver(s) |
278 |
aka WINS server(s) |
279 |
#dhcp-option=45,0.0.0.0 # netbios datagram distribution server |
280 |
#dhcp-option=46,8 # netbios node type |
281 |
#dhcp-option=47 # empty netbios scope. |
282 |
|
283 |
# Send RFC-3397 DNS domain search DHCP option. WARNING: Your DHCP client |
284 |
# probably doesn't support this...... |
285 |
#dhcp-option=119,eng.apple.com,marketing.apple.com |
286 |
|
287 |
# Send RFC-3442 classless static routes (note the netmask encoding) |
288 |
#dhcp-option=121,192.168.1.0/24,1.2.3.4,10.0.0.0/8,5.6.7.8 |
289 |
|
290 |
# Send encapsulated vendor-class specific options. The vendor-class |
291 |
# is sent as DHCP option 60, and all the options marked with the |
292 |
# vendor class are send encapsulated in DHCP option 43. The meaning of |
293 |
# the options is defined by the vendor-class. This example sets the |
294 |
# mtftp address to 0.0.0.0 for PXEClients |
295 |
#dhcp-option=vendor:PXEClient,1,0.0.0.0 |
296 |
|
297 |
# Set the boot filename and tftpd server name and address |
298 |
# for BOOTP. You will only need this is you want to |
299 |
# boot machines over the network. |
300 |
#dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3 |
301 |
|
302 |
# Set the limit on DHCP leases, the default is 150 |
303 |
#dhcp-lease-max=150 |
304 |
|
305 |
# The DHCP server needs somewhere on disk to keep its lease database. |
306 |
# This defaults to a sane location, but if you want to change it, use |
307 |
# the line below. |
308 |
#dhcp-leasefile=/var/lib/misc/dnsmasq.leases |
309 |
|
310 |
# Set the DHCP server to authoritative mode. In this mode it will barge in |
311 |
# and take over the lease for any client which broadcasts on the network, |
312 |
# whether it has a record of the lease or not. This avoids long timeouts |
313 |
# when a machine wakes up on a new network. DO NOT enable this if there's |
314 |
# the slighest chance that you might end up accidentally configuring a DHCP |
315 |
# server for your campus/company accidentally. The ISC server uses the same |
316 |
# the same option, and this URL provides more information: |
317 |
# http://www.isc.org/index.pl?/sw/dhcp/authoritative.php |
318 |
#dhcp-authoritative |
319 |
|
320 |
# Run an executable when a DHCP lease is created or destroyed. |
321 |
# The arguments sent to the script are "add" or "del", |
322 |
# then the MAC address, the IP address and finally the hostname |
323 |
# if there is one. |
324 |
#dhcp-script=/bin/echo |
325 |
|
326 |
# Set the cachesize here. |
327 |
#cache-size=150 |
328 |
|
329 |
# If you want to disable negative caching, uncomment this. |
330 |
#no-negcache |
331 |
|
332 |
# Normally responses which come form /etc/hosts and the DHCP lease |
333 |
# file have Time-To-Live set as zero, which conventionally means |
334 |
# do not cache further. If you are happy to trade lower load on the |
335 |
# server for potentially stale date, you can set a time-to-live (in |
336 |
# seconds) here. |
337 |
#local-ttl= |
338 |
|
339 |
# If you want dnsmasq to detect attempts by Verisign to send queries |
340 |
# to unregistered .com and .net hosts to its sitefinder service and |
341 |
# have dnsmasq instead return the correct NXDOMAIN response, uncomment |
342 |
# this line. You can add similar lines to do the same for other |
343 |
# registries which have implemented wildcard A records. |
344 |
#bogus-nxdomain=64.94.110.11 |
345 |
|
346 |
# If you want to fix up DNS results from upstream servers, use the |
347 |
# alias option. This only works for IPv4. |
348 |
# This alias makes a result of 1.2.3.4 appear as 5.6.7.8 |
349 |
#alias=1.2.3.4,5.6.7.8 |
350 |
# and this maps 1.2.3.x to 5.6.7.x |
351 |
#alias=1.2.3.0,5.6.7.0,255.255.255.0 |
352 |
|
353 |
|
354 |
# Change these lines if you want dnsmasq to serve MX records. |
355 |
|
356 |
# Return an MX record named "maildomain.com" with target |
357 |
# servermachine.com and preference 50 |
358 |
#mx-host=maildomain.com,servermachine.com,50 |
359 |
|
360 |
# Set the default target for MX records created using the localmx option. |
361 |
#mx-target=servermachine.com |
362 |
|
363 |
# Return an MX record pointing to the mx-target for all local |
364 |
# machines. |
365 |
#localmx |
366 |
|
367 |
# Return an MX record pointing to itself for all local machines. |
368 |
#selfmx |
369 |
|
370 |
# Change the following lines if you want dnsmasq to serve SRV |
371 |
# records. These are useful if you want to serve ldap requests for |
372 |
# Active Directory and other windows-originated DNS requests. |
373 |
# See RFC 2782. |
374 |
# You may add multiple srv-host lines. |
375 |
# The fields are <name>,<target>,<port>,<priority>,<weight> |
376 |
# If the domain part if missing from the name (so that is just has the |
377 |
# service and protocol sections) then the domain given by the domain= |
378 |
# config option is used. (Note that expand-hosts does not need to be |
379 |
# set for this to work.) |
380 |
|
381 |
# A SRV record sending LDAP for the example.com domain to |
382 |
# ldapserver.example.com port 289 |
383 |
#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389 |
384 |
|
385 |
# A SRV record sending LDAP for the example.com domain to |
386 |
# ldapserver.example.com port 289 (using domain=) |
387 |
#domain=example.com |
388 |
#srv-host=_ldap._tcp,ldapserver.example.com,389 |
389 |
|
390 |
# Two SRV records for LDAP, each with different priorities |
391 |
#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,1 |
392 |
#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,2 |
393 |
|
394 |
# A SRV record indicating that there is no LDAP server for the domain |
395 |
# example.com |
396 |
#srv-host=_ldap._tcp.example.com |
397 |
|
398 |
|
399 |
# Change the following lines to enable dnsmasq to serve TXT records. |
400 |
# These are used for things like SPF and zeroconf. (Note that the |
401 |
# domain-name expansion done for SRV records _does_not |
402 |
# occur for TXT records.) |
403 |
|
404 |
#Example SPF. |
405 |
#txt-record=example.com,v=spf1 a -all |
406 |
|
407 |
#Example zeroconf |
408 |
#txt-record=_http._tcp.example.com,name=value,paper=A4 |
409 |
|
410 |
|
411 |
# For debugging purposes, log each DNS query as it passes through |
412 |
# dnsmasq. |
413 |
#log-queries |
414 |
|
415 |
# Include a another lot of configuration options. |
416 |
#conf-file=/etc/dnsmasq.more.conf |
417 |
-- |
418 |
gentoo-user@g.o mailing list |