Hier ist mein /etc/dnsmasq.d/dnsmasq.conf file:
Code: Alles auswählen
interface=wlan0
no-dhcp-interface=eth0
dhcp-range=10.0.0.20,10.0.0.30,infinite
Code: Alles auswählen
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto wlan0
iface wlan0 inet static
address 10.0.0.1
netmask 255.255.255.0
broadcast 10.0.0.255
# Firewall zurücksetzen, Tabellen leeren
up /sbin/iptables -F
up /sbin/iptables -X
up /sbin/iptables -t nat -F
# Kabelnetzwerk maskieren, Port-Forwarding sowie Nat aktivieren
up iptables -A FORWARD -o eth0 -i wlan0 -s 192.168.0.0/24 -m conntrack --ctstate NEW -j ACCEPT
up iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
up iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
up sysctl -w net.ipv4.ip_forward=1
# hostapd und dnsmasq (neu) starten
up service hostapd restart
up service dnsmasq restart
Code: Alles auswählen
interface=wlan0
driver=nl80211
ssid=wifiii
hw_mode=g
channel=1
macaddr_acl=0
auth_algs=1
wpa=2
wpa_passphrase=TEST
Code: Alles auswählen
root@l0calh0st:~# service dnsmasq status
● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
Loaded: loaded (/lib/systemd/system/dnsmasq.service; disabled; vendor preset: disabled)
Active: active (running) since Thu 2018-01-11 19:34:04 CET; 1s ago
Process: 7537 ExecStop=/etc/init.d/dnsmasq systemd-stop-resolvconf (code=exited, status=0/SUCCESS)
Process: 7552 ExecStartPost=/etc/init.d/dnsmasq systemd-start-resolvconf (code=exited, status=0/SUCCESS)
Process: 7544 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=0/SUCCESS)
Process: 7543 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS)
Main PID: 7551 (dnsmasq)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/dnsmasq.service
└─7551 /usr/sbin/dnsmasq -x /run/dnsmasq/dnsmasq.pid -u dnsmasq -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new --local-service --trust-
Jan 11 19:34:04 l0calh0st dnsmasq[7551]: Warnung: Schnittstelle infinite existiert derzeit nicht
Jan 11 19:34:04 l0calh0st dnsmasq[7551]: Warnung: Schnittstelle 10.0.0.30 existiert derzeit nicht
Jan 11 19:34:04 l0calh0st dnsmasq[7551]: Warnung: Schnittstelle 10.0.0.20 existiert derzeit nicht
Jan 11 19:34:04 l0calh0st dnsmasq[7551]: Warnung: Schnittstelle wlan0 no-dhcp-interface=eth0 dhcp-range=interface:wlan0 existiert derzeit nicht
Jan 11 19:34:04 l0calh0st dnsmasq[7551]: lese /etc/resolv.conf
Jan 11 19:34:04 l0calh0st dnsmasq[7551]: Benutze Namensserver 192.168.2.1#53
Jan 11 19:34:04 l0calh0st dnsmasq[7551]: Benutze Namensserver 192.168.2.1#53
Jan 11 19:34:04 l0calh0st dnsmasq[7551]: /etc/hosts gelesen - 5 Adressen
Jan 11 19:34:04 l0calh0st systemd[1]: Started dnsmasq - A lightweight DHCP and caching DNS server.