sudo apt-get install hostapd dnsmasq
sudo update-rc.d hostapd disable
sudo update-rc.d dnsmasq disable
sudo gedit /etc/dnsmasq.conf
bind-interfaces
interface=wlan2
dhcp-range=192.168.10.2,192.168.10.5
sudo gedit /etc/hostapd.conf
interface=wlan0
driver=nl80211
ssid=Linux
hw_mode=g
channel=1
wpa=2
wpa_passphrase=12345678
sudo gedit /etc/NetworkManager/NetworkManager.conf
dns=dnsmasq закомменитровать или удалить.
sudo restart network-manager
scripts
ap-start.sh :
#!/bin/sh
ifconfig wlan0 192.168.10.1
service dnsmasq restart
sysctl net.ipv4.ip_forward=1
iptables -t nat -A POSTROUTING -o wlan1 -j MASQUERADE
hostapd /etc/hostapd.conf
ap-stop.sh :
#!/bin/sh
iptables -D POSTROUTING -t nat -o wlan1 -j MASQUERADE
sysctl net.ipv4.ip_forward=0
service dnsmasq stop
service hostapd stop
wlan1 - интернет
wlan0 - раздача