Raspberry pi 3 als W-Lan Access Point
Check if W-Lan-Adapter is doing AP.
iw list | grep AP
sudo apt-get install dnsmasq hostapd
vi /etc/dhcpcd.conf
add
denyinterfaces wlan0
vi /etc/network/interfaces
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.6.1
netmask 255.255.255.248
network 192.168.6.0
broadcast 192.168.6.7
service dhcpcd restart
ifdown wlan0; ifup wlan0
vi /etc/hostapd/hostapd.conf
# Schnittstelle und Treiber
interface=wlan0
#driver=nl80211
# WLAN-Konfiguration
ssid=MYNAME
channel=1
hw_mode=g
wmm_enabled=1
country_code=DE
ieee80211d=1
ignore_broadcast_ssid=0
auth_algs=1
# WLAN-Verschlüsselung
wpa=2
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
wpa_passphrase=MEINEPASSPHRASE
vi /etc/default/hostapd
DAEMON_CONF="/etc/hostapd/hostapd.conf"
service hostapd restart
vi /etc/dnsmasq.conf
# DHCP-Server aktiv für WLAN-Interface
interface=wlan0
# DHCP-Server nicht aktiv für bestehendes Netzwerk
no-dhcp-interface=eth0
# IPv4-Adressbereich und Lease-Time
dhcp-range=192.168.6.2,192.168.6.6,24h
# DNS
dhcp-option=option:dns-server,192.168.6.1
vi /etc/network/interfaces
# NAT und Masquerading aktivieren
up /sbin/iptables -A FORWARD -o eth0 -i wlan0 -m conntrack --ctstate NEW -j ACCEPT
up /sbin/iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
up /sbin/iptables -t nat -F POSTROUTING
up /sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
# IP-Forwarding aktivieren
up sysctl -w net.ipv4.ip_forward=1
up sysctl -w net.ipv6.conf.all.forwarding=1