Dnsmasq: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
 
(2 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 4: Zeile 4:
  
 
=DHCP und Nameserver für diese Karte=
 
=DHCP und Nameserver für diese Karte=
* vi dnsmasq.conf  
+
*vi dnsmasq.conf  
 
  interface=wlan0
 
  interface=wlan0
  dhcp-range=192.168.1.2, 192.168.1.30, 255.255.255.0, 12h
+
bind-interfaces
  dhcp-option=3, 192.168.1.1
+
  dhcp-range=192.168.178.2,192.168.178.30,255.255.255.0,12h
  dhcp-option=6, 192.168.1.1
+
  dhcp-option=3,192.168.178.1
 +
  dhcp-option=6,192.168.178.1
 
  server=8.8.8.8
 
  server=8.8.8.8
  log-queries
+
  log-queries  
 
  log-dhcp
 
  log-dhcp
listen-address=127.0.0.1
 
  
 
=Bedeutung=
 
=Bedeutung=

Aktuelle Version vom 24. Februar 2025, 08:21 Uhr

Installation

  • apt update
  • apt install hostapd dnsmasq

DHCP und Nameserver für diese Karte

  • vi dnsmasq.conf
interface=wlan0
bind-interfaces
dhcp-range=192.168.178.2,192.168.178.30,255.255.255.0,12h
dhcp-option=3,192.168.178.1
dhcp-option=6,192.168.178.1
server=8.8.8.8
log-queries 
log-dhcp

Bedeutung

  • interface: Schnittstelle
  • dhcp-range: IP Range und Ablaufzeit
  • dhcp-option=3: Gateway IP
  • dhcp-option=6: DNS Server
  • server: DNS server’s address
  • log-queries: Log the results of DNS queries handled by dnsmasq.
  • log-dhcp: Log all the options sent to DHCP clients and the tags used to determine thitt
  • listen-address: Links the DHCP to the local IP address which is 127.0.0.1.

Wir starten den DNSMASQ

  • dnsmasq -C dnsmasq.conf -d