My wireless adapter:
lsusb | rg -i wireless
Bus 001 Device 005: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter
List my network interface:
iwconfig
lo no wireless extensions.
enp6s0 no wireless extensions.
wlx38a28c80c24f IEEE 802.11 Mode:Master Tx-Power=20 dBm
Retry short long limit:2 RTS thr:off Fragment thr:off
Power Management:off
Install hostapd and set up configuration:
sudo apt-get install hostapd
sudo vim /etc/hostapd/hostapd.conf
interface=wlx38a28c80c24f
driver=nl80211
ssid=myap
hw_mode=g
channel=7
macaddr_acl=0
auth_algs=3
ignore_broadcast_ssid=0
wmm_enabled=1
ieee80211n=1
ht_capab=[HT40-][SHORT-GI-20][SHORT-GI-40]
wpa=2
wpa_passphrase=linuxprobe
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
Install dnsmasq and set up configuration:
sudo apt-get install dnsmasq
sudo vim /etc/dnsmasq.conf
resolv-file=/etc/resolv.dnsmasq.conf
server=/cn/114.114.114.114
server=/taobao.com/114.114.114.114
listen-address=127.0.0.1,192.168.11.1
dhcp-range=192.168.11.50,192.168.11.150,12h
dhcp-option=3,192.168.11.1
dhcp-option=6,192.168.11.1
cache-size=1024
conf-dir=/etc/dnsmasq.d
sudo vim /etc/resolv.dnsmasq.conf
nameserver 114.114.114.114
sudo vim /etc/resolv.conf
nameserver 127.0.0.1
Start the services:
sudo systemctl start dnsmasq.service
sudo systemctl start hostapd.service
Now connect myap
with password linuxprobe
,why the access point can't be accessed via my android phone?