LINUX.ORG.RU

Сообщения Inideddi

 

Не создается wifi сеть (проблема с hostapd)

Форум — Admin

Делаю все по инструкции - http://habrahabr.ru/post/122876/. Запускаюсь и получаю:

$ sudo sh start3.sh
net.ipv4.ip_forward = 1
Configuration file: /etc/hostapd.conf
nl80211: Could not configure driver mode
nl80211: deinit ifname=wlp2s0 disabled_11b_rates=0
nl80211 driver initialization failed.
wlp2s0: interface state UNINITIALIZED->DISABLED
wlp2s0: AP-DISABLED 
hostapd_free_hapd_data: Interface wlp2s0 wasn't started
net.ipv4.ip_forward = 0
$ 

Если перед этим отключить network-manager, то вайфай-точка определяется андройдом, но без интернета:

$ sudo service network-manager stop
$ sudo sh start3.sh
net.ipv4.ip_forward = 1
Configuration file: /etc/hostapd.conf
Using interface wlp2s0 with hwaddr d0:53:49:8d:3f:91 and ssid "laptop-wifi"
wlp2s0: interface state UNINITIALIZED->ENABLED
wlp2s0: AP-ENABLED 

Что не так?

$ sudo cat /etc/hostapd.conf
# Define interface
interface=wlp2s0
# Select driver
driver=nl80211
# Set access point name
ssid=laptop-wifi
# Set access point harware mode to 802.11g
hw_mode=g
# Set WIFI channel (can be easily changed)
channel=6
# Enable WPA2 only (1 for WPA, 2 for WPA2, 3 for WPA + WPA2)
wpa=2
wpa_passphrase=wifipass
$ sudo cat /etc/dnsmasq.conf 
# Bind to only one interface
bind-interfaces
# Choose interface for binding
interface=wlp2s0
# Specify range of IP addresses for DHCP leasses
dhcp-range=192.168.150.2,192.168.150.10
$ sudo cat start3.sh
#!/bin/bash

# Start
# Configure IP address for WLAN
sudo ifconfig wlp2s0 192.168.150.1
# Start DHCP/DNS server
sudo service dnsmasq restart
# Enable routing
sudo sysctl net.ipv4.ip_forward=1
# Enable NAT
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
# Run access point daemon
sudo hostapd /etc/hostapd.conf

# Stop
# Disable NAT
sudo iptables -D POSTROUTING -t nat -o eth0 -j MASQUERADE
# Disable routing
sudo sysctl net.ipv4.ip_forward=0
# Disable DHCP/DNS server
sudo service dnsmasq stop
$ 
$ ifconfig 
enp1s0f1  Link encap:Ethernet  HWaddr f0:76:1c:7e:21:28  
          inet addr:10.78.89.21  Bcast:10.78.95.255  Mask:255.255.248.0
          inet6 addr: fe80::f276:1cff:fe7e:2128/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1642159 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2053612 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:756152822 (756.1 MB)  TX bytes:2552790282 (2.5 GB)

lo        Link encap:Локальная петля (Loopback)  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:18762 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18762 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1565942 (1.5 MB)  TX bytes:1565942 (1.5 MB)

wlp2s0    Link encap:Ethernet  HWaddr d0:53:49:8d:3f:91  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:164816 errors:0 dropped:4 overruns:0 frame:0
          TX packets:143585 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:189540522 (189.5 MB)  TX bytes:22717249 (22.7 MB)

$ 

Перемещено Klymedy из linux-org-ru

 , , , ,

Inideddi
()

RSS подписка на новые темы