apt-get install mc apache2 php hostapd dnsmasq bridge-utils php-sqlite3
ifconfig
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="24:05:0f:9a:55:75", NAME="wlanE"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="b8:27:eb:63:82:58", NAME="wlanI"
brctl addbr br0
auto eth0
iface eth0 inet manual
auto wlanI
iface wlanI inet manual
wireless-power off
auto br0
iface br0 inet static
address 192.168.222.1
netmast 255.255.255.0
broadcast 192.168.222.255
#gateway 192.168.222.1
network 192.168.222.0
dns-nameservers 8.8.8.8 8.8.4.4
bridge_ports wlan0 eth0
up /sbin/iptables -F
up /sbin/iptables -X
up /sbin/iptables -t nat -F
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
auto wlanE
allow-hotplug wlanE
iface wlanE inet dhcp
wireless-power off
auto usb0
allow-hotplug usb0
iface usb0 inet dhcp
usermod -a -G sudo www-data
www-data ALL=(ALL) NOPASSWD: ALL
r8712u
https://www.raspberrypi.org/documentation/configuration/wireless/access-point.md
interface=wlanI
bridge=br0
#driver=nl80211
ssid=NetworkName
hw_mode=g
channel=7
wmm_enabled=0
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=TopSecretPassword
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
#/etc/default/hostapd
DAEMON_CONF="/etc/hostapd/hostapd.conf"
#/etc/init.d/hostapd
DAEMON_CONF="/etc/hostapd/hostapd.conf"
denyinterfaces wlanI,eth0,usb0
interface wlanI
static ip_address=192.168.222.1/24
interface=br0
dhcp-range=192.168.222.100,192.168.222.200,255.255.255.0,24h
touch /etc/wpa_supplicant.conf
chmod 777 /etc/wpa_supplicant.conf
update-rc.d hostapd defaults
update-rc.d hostapd enable
<Directory /var/www/html>
Order Allow,Deny
Allow from 192.168.222.0/24
</Directory>
chown www-data /var/www/html
crontab -e -u root
*/5 * * * * /usr/bin/php /var/www/html/wlan-autoconnect.php