S
S
SysUtils2017-04-15 17:43:19
linux
SysUtils, 2017-04-15 17:43:19

Wifi sharing with hostadp?

I welcome everyone. I don't know what to do anymore. I'm suffering for the 4th day. Lost all direction. The task is elementary, the thought of which causes a sea of ​​negative emotions in me. You need to distribute Wi-Fi using an adapter. Just true? Network-Manager is not suitable, I can not stand it. The output is one hostadp. I tried a lot of instructions on the Internet. Some could not even get the adapter to work, that is, distribute it, some forced it to be distributed, however, when a device is connected to it, say, an Android device in the connection settings hangs 'obtaining an ip address' then the connection is reset and so on in a circle. To turn out a problem in distribution of dhcp of addresses? I did this:
1) Forbade Network-Manager to manage the Wi-Fi adapter (by editing /etc/NetworkManager/NetworkManager.conf )
2)Edited the file /etc/default/hostapd.conf , added the line DAEMON_CONF="/etc/hostapd/hostapd.conf"
3)Edited the file /etc/hostapd/hostapd.conf added

interface=wlan1
driver=nl80211
ssid=WiFi_Test
hw_mode=g
channel=11
wpa=2
wpa_passphrase=11111111
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
auth_algs=1
macaddr_acl=0

4) Edited the /etc/network/interfaces file , added
auto wlan1
iface wlan1 inet static
address 192.168.2.1 
netmask 255.255.255.0 
gateway 192.168.2.1

5) Added group and user
groupadd -r dnsmasq
useradd -r -g dnsmasq dnsmasq

6)Edited /etc/dnsmasq.conf file , added
user=dnsmasq
group=dnsmasq
port=53
cache-size=1000
domain-needed
bogus-priv
interface=wlan1
except-interface=wlan0
dhcp-range=192.168.51.50,192.168.51.150,12h
dhcp-authoritative

This completes the setup. It costs Bind9, but it is disabled, it should not interfere. launching
service dnsmasq start
service hostapd start

Everything starts up, it does not give any errors, everything seems to be in order in the logs (as it seems to me). However, I can't connect. Did it according to this instruction. What do you say? Tell me how to be! I don’t know where to poke
UDP: Adapter Tl-WN727N

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Oleg Nerwin, 2017-04-16
@SysUtils

why does dnsmasq distribute addresses from the network 192.168.51.0 and the adapter on the network 192.168.2.0? Why write gateway on the wlan1 interface?
The dnsmsq.conf should be something like this:

dhcp-range=wlan1,192.168.2.50,192.168.2.150,255.255.255.0,24h
dhcp-option=wlan1,3,192.168.2.1 #default route

A
Alexey Sergey, 2017-04-15
@dev_random

somehow, too, it was necessary to raise the AP. with this, everything started up with a half-kick:
https://github.com/oblique/create_ap

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question