summaryrefslogtreecommitdiffstats
path: root/howtos
diff options
context:
space:
mode:
authoryves <steve.harrison@gmx.net>2012-07-26 15:59:45 +0200
committeryves <steve.harrison@gmx.net>2012-07-26 15:59:45 +0200
commit8e947d94218ba27f96d1f167fa3c5c449740e8bb (patch)
tree2ea9ab4ce623ccc734e9aeaca825fd9fd37d2fcd /howtos
parent0d55a2bf08c86fcb359d1b2e8a141eeac298a658 (diff)
downloadwww-8e947d94218ba27f96d1f167fa3c5c449740e8bb.tar.gz
www-8e947d94218ba27f96d1f167fa3c5c449740e8bb.tar.bz2
www-8e947d94218ba27f96d1f167fa3c5c449740e8bb.zip
port dynmasq howto from old wiki
Diffstat (limited to 'howtos')
-rw-r--r--howtos/dnsmasq.html71
1 files changed, 71 insertions, 0 deletions
diff --git a/howtos/dnsmasq.html b/howtos/dnsmasq.html
new file mode 100644
index 0000000..c89737e
--- /dev/null
+++ b/howtos/dnsmasq.html
@@ -0,0 +1,71 @@
+{% meta %}
+ title: configure dnsmmasq for a small network
+{% endmeta %}
+
+{% block content %}
+{% filter rst %}
+configure dnsmmasq for a small network
+======================================
+
+Wer schon immer der Meinung war, daß ein BIND Nameserver für seinen kleinen Router zu Hause ein wenig dick aufgetragen ist, der sollte sich einmal mit DNSMASQ beschäftigen. DNSMASQ kann sowohl als DHCPd wie auch ans NAMEd fungieren.
+
+Die Konfiguration ist hierbei wirklich ziehmlich einfach. Zum einen muß man lediglich das Netzwerkinterface definieren an dem dnsmasq lauschen soll. Wenn man mehrere Geräte hat, dann kann man dnsmasq auch beibringen an allen zu lauschen außer an z.B. dem externen Interface. Ferner wird der Name des Netzwerkes "lan" und der zu vergebene ip-Adressen Bereich festgelegt, wie folgendes Beispiel zeigt. Wenn die Zeile "read-ethers" so wie im Beispiel nicht auskommentiert ist, dann kann man trotz DHCP einigen Rechner auch feste IP-Adressen vergeben.
+
+/etc/dnsmasq
+::
+
+ # filter what we send upstream
+ domain-needed
+ bogus-priv
+ filterwin2k
+
+ # allow /etc/hosts and dhcp lookups for local domains
+ local=/lan/
+ domain=lan
+
+ # If you want dnsmasq to listen for requests only on specified interfaces
+ # (and the loopback) give the name of the interface (eg eth0) here.
+ # Repeat the line for more than one interface.
+ interface=eth0
+ # Or you can specify which interface _not_ to listen on
+ #except-interface=
+
+ # Uncomment this to enable the integrated DHCP server, you need
+ # to supply the range of addresses available for lease and optionally
+ # a lease time. If you have more than one network, you will need to
+ # repeat this for each network on which you want to supply DHCP
+ # service.
+ dhcp-range=192.168.5.150,192.168.5.250,255.255.255.0,12h
+
+ # If this line is uncommented, dnsmasq will read /etc/ethers and act
+ # on the ethernet-address/IP pairs found there just as if they had
+ # been given as --dhcp-host options. Useful if you keep
+ # MAC-address/host mappings there for other purposes.
+ read-ethers
+
+In der Datei /etc/hosts werden die Rechnernamen zu den IP-Adressen hinterlegt.
+
+/etc/hosts
+::
+
+ 127.0.0.1 localhost
+ 192.168.5.1 dnsmasqhost.lan dnsmasqhost
+ 192.168.5.101 client1.lan client1
+ 192.168.5.102 client2.lan client2
+
+Damit auch immer "die richtigen" Rechner die hiinterlegten IP-Adressen bekommen, werden diese in der Datei /etc/ethers hinterlegt. Hierbei wird immer ein Paar bestehend aus MAC-Adresse des Rechners (der Netzwerkkarte des Rechner) und dem Namen angegeben. Man kann hier auch die IP-Adresse angeben, aber wenn man die mal ändern will, dann gibt das immer zwei Stellen zubearbeiten (und eine vergisst man immer :-)
+
+/etc/ethers
+::
+
+ 00:0a:95:db:24:c1 client1
+ 00:0a:95:db:24:c2 client2
+
+So, das war's auch schon. Ach ja, den Neustart des Dienstes (/etc/init.t/dnsmasq restart) nicht vergessen ;-)
+
+Happy dnsmasq-ing!
+
+Yann
+
+{% endfilter %}
+{% endblock %}