LINUX.ORG.RU

ubuntu(hostapd) + ubuntu(NetworkManager) как?


0

0

Доброе уремя суток.
Уже в полном отчаянии. Как заставить всё это работать. есть точка доступа на hostapd. если делать шифрование wpa

interface=wlan0
driver=nl80211

ssid=MySuperAP
country_code=RU
hw_mode=g
channel=1

macaddr_acl=0

wpa=3
wpa_key_mgmt=WPA-PSK
wpa_passphrase=MySuperPass123
wpa_pairwise=TKIP CCMP

пытаюсь подключиться к ней с другой ubuntu с networkmanager и не могу подобрать нужные конфиги.

Пробовал по WEP тоже самое...

соединение получается только если в NM пункт «общий с другим компьютером» , а DHCP и статика не работает.


Можете посоветовать что прочесть чтобы вручную в /etc/network/interfaces соглосно с конфигом точки доступа сделать? или если можно поделитесь таким конфигом. спасибо.

wpa=3

Тут поставьте 1.

Попробуйте подключиться и выложить лог /var/log/syslog с точки доступа и клиента в момент подключения.

Еще интересно, какая у вас карта и ядро.

вручную в /etc/network/interfaces

Там вообщем то и не нужно писать ничего относительно wlan0, т.к. hostapd этим занимается

Вот мой пример, правда в режиме моста:

/etc/network/interfaces

auto br0
iface br0 inet static
bridge_ports eth1 wlan0
	address 192.168.180.4
	netmask 255.255.255.0
	network 192.168.180.0
	broadcast 192.168.180.255

/etc/hostapd/hostapd.conf

interface=wlan0
driver=nl80211
bridge=br0
ssid=ForHomeUse
country_code=RU
hw_mode=g
channel=7

macaddr_acl=0

wpa=1
wpa_key_mgmt=WPA-PSK
wpa_passphrase=Olololo100500
wpa_pairwise=TKIP CCMP
Linux ap-x3 2.6.32-13-generic #18-Ubuntu SMP Wed Feb 10 21:24:20 UTC 2010 i686 GNU/Linux
01:09.0 Network controller: RaLink RT2561/RT61 rev B 802.11g
Lindows
()

мои конфиги:

/etc/hostapd/hostapd.conf

interface=wlan0
driver=nl80211

ssid=pvwlan
country_code=RU
hw_mode=g
channel=1

macaddr_acl=0

wpa=2
wpa_key_mgmt=WPA-PSK

wpa_passphrase=yakrevedko
wpa_pairwise=CCMP

/etc/network/interfaces

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
        address 192.168.7.91
        netmask 255.255.255.0
        network 192.168.7.0
        broadcast 192.168.7.255
        gateway 192.168.7.1
        dns-nameservers 192.168.7.1

auto wlan0
iface wlan0 inet static
        address 192.168.70.1
        netmask 255.255.255.0
        gateway 192.168.70.1

/etc/dhcp3/dhcpd.conf

ddns-update-style none;

option domain-name "someserver.somelan";
option domain-name-servers 192.168.7.1;

default-lease-time 600;
max-lease-time 7200;

log-facility local7;

subnet 192.168.70.0 netmask 255.255.255.0 {
    range 192.168.70.100 192.168.70.200;
    option routers 192.168.70.1;
}

плюс правило для iptables

iptables -t nat -A POSTROUTING -s 192.168.70.0/24 -j MASQUERADE

inoremap ★★
()
Ответ на: комментарий от Lindows

На стороне точки доступа:

при подклюнии такое на точке

RATE[11] rate=540 flags=0x0
Passive scanning not supported
Flushing old station entries
Deauthenticate all stations
Mode: IEEE 802.11g Channel: 7 Frequency: 2442 MHz
Using interface wlan0 with hwaddr 00:17:9a:77:bd:52 and ssid 'mit'
SSID - hexdump_ascii(len=3):
6d 69 64 mid
PSK (ASCII passphrase) - hexdump_ascii(len=9):
31 32 33 34 35 36 37 38 39 123456789
PSK (from passphrase) - hexdump(len=32): cc f6 b3 07 10 59 3d 83 66 bd 41 eb 81 6d 58 48 87 23 d0 44 b0 9f 1d f1 3f 9d da 48 f3 83 ad 64
WPA: group state machine entering state GTK_INIT (VLAN-ID 0)
GMK - hexdump(len=32): [REMOVED]
GTK - hexdump(len=32): [REMOVED]
WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)
wlan0: Setup of interface done.
MGMT (TX callback) ACK
STA 00:14:a5:8c:d5:76 sent probe request for broadcast SSID
MGMT (TX callback) ACK
mgmt::proberesp cb
STA 00:15:af:10:6d:9d sent probe request for broadcast SSID
MGMT (TX callback) ACK
mgmt::proberesp cb
STA 00:14:a5:8c:d5:76 sent probe request for broadcast SSID
MGMT (TX callback) ACK
это по hostapd -ddd /etc/hostapd/hostapd.conf
cat /etc/hostapd/hostapd.conf
interface=wlan0
driver=nl80211
bridge=br0 
ssid=mit
country_code=RU 
hw_mode=g
channel=7 
macaddr_acl=0
wpa=1 
wpa_key_mgmt=WPA-PSK 
wpa_passphrase=123456789
wpa_pairwise=TKIP CCMP
cat /etc/network/interfaces 
auto lo
iface lo inet loopback

auto br0 
iface br0 inet static 
bridge_ports eth0 wlan0 
address 192.168.0.27 
netmask 255.255.255.0 
network 192.168.0.0 
broadcast 192.168.0.255
gateway 192.168.0.1
ядро дефолтное из 9.10 + обновления. 2.6.31-20 карта RaLink 2561/RT61 (модуль rt61pci)

Теперь настройки клиента:

auto wlan0
#iface wlan0 inet dhcp
iface wlan0 inet static
address 192.168.0.167
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
pre-up wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -B
post-down killall -q wpa_supplicant
cat /etc/wpa_supplicant.conf
network={
ssid="mit"
#psk="123456789"
psk=ccf6b30710593d8366bd41eb816d58488723d044b09f1df13f9dda48f383ad64
key_mgmt=WPA-PSK
proto=RSN
pairwise=TKIP
group=TKIP
}

ядро такое же, карточкa использует модуль b43

vasya_p
() автор топика
Ответ на: комментарий от vasya_p

привожу также логи /var/log/syslog при попытке соединиться:

на стороне точкы достопы

Mar 29 10:32:33 code hostapd: wlan0: STA 00:14:a5:8c:d5:76 IEEE 802.11: authenticated
Mar 29 10:32:33 code hostapd: wlan0: STA 00:14:a5:8c:d5:76 IEEE 802.11: associated (aid 1)
Mar 29 10:32:36 code hostapd: wlan0: STA 00:14:a5:8c:d5:76 IEEE 802.11: deauthenticated due to local deauth request
Mar 29 10:32:37 code hostapd: wlan0: STA 00:14:a5:8c:d5:76 IEEE 802.11: authenticated
Mar 29 10:32:37 code hostapd: wlan0: STA 00:14:a5:8c:d5:76 IEEE 802.11: associated (aid 1)
Mar 29 10:32:40 code hostapd: wlan0: STA 00:14:a5:8c:d5:76 IEEE 802.11: deauthenticated due to local deauth request
Mar 29 10:32:41 code hostapd: wlan0: STA 00:14:a5:8c:d5:76 IEEE 802.11: authenticated
Mar 29 10:32:41 code hostapd: wlan0: STA 00:14:a5:8c:d5:76 IEEE 802.11: associated (aid 1)
Mar 29 10:32:44 code hostapd: wlan0: STA 00:14:a5:8c:d5:76 IEEE 802.11: deauthenticated due to local deauth request
Mar 29 10:32:45 code hostapd: wlan0: STA 00:14:a5:8c:d5:76 IEEE 802.11: authenticated
Mar 29 10:32:45 code hostapd: wlan0: STA 00:14:a5:8c:d5:76 IEEE 802.11: associated (aid 1)
Mar 29 10:32:48 code hostapd: wlan0: STA 00:14:a5:8c:d5:76 IEEE 802.11: deauthenticated due to local deauth request
Mar 29 10:32:49 code hostapd: wlan0: STA 00:14:a5:8c:d5:76 IEEE 802.11: authenticated
Mar 29 10:32:49 code hostapd: wlan0: STA 00:14:a5:8c:d5:76 IEEE 802.11: associated (aid 1)
Mar 29 10:32:52 code hostapd: wlan0: STA 00:14:a5:8c:d5:76 IEEE 802.11: deauthenticated due to local deauth request
Mar 29 10:32:53 code hostapd: wlan0: STA 00:14:a5:8c:d5:76 IEEE 802.11: authenticated
Mar 29 10:32:53 code hostapd: last message repeated 2 times
Mar 29 10:32:53 code hostapd: wlan0: STA 00:14:a5:8c:d5:76 IEEE 802.11: associated (aid 1)
Mar 29 10:32:56 code hostapd: wlan0: STA 00:14:a5:8c:d5:76 IEEE 802.11: deauthenticated due to local deauth request
Mar 29 10:32:57 code hostapd: wlan0: STA 00:14:a5:8c:d5:76 IEEE 802.11: authenticated
Mar 29 10:32:57 code hostapd: wlan0: STA 00:14:a5:8c:d5:76 IEEE 802.11: associated (aid 1)
Mar 29 10:33:01 code hostapd: wlan0: STA 00:14:a5:8c:d5:76 IEEE 802.11: deauthenticated due to local deauth request
Mar 29 10:33:02 code hostapd: wlan0: STA 00:14:a5:8c:d5:76 IEEE 802.11: authenticated
Mar 29 10:33:02 code hostapd: wlan0: STA 00:14:a5:8c:d5:76 IEEE 802.11: associated (aid 1)
Mar 29 10:33:05 code hostapd: wlan0: STA 00:14:a5:8c:d5:76 IEEE 802.11: deauthenticated due to local deauth request
Mar 29 10:33:06 code hostapd: wlan0: STA 00:14:a5:8c:d5:76 IEEE 802.11: authenticated
Mar 29 10:33:06 code hostapd: wlan0: STA 00:14:a5:8c:d5:76 IEEE 802.11: associated (aid 1)
Mar 29 10:33:09 code hostapd: wlan0: STA 00:14:a5:8c:d5:76 IEEE 802.11: deauthenticated due to local deauth request
Mar 29 10:33:10 code hostapd: wlan0: STA 00:14:a5:8c:d5:76 IEEE 802.11: authenticated
Mar 29 10:33:10 code hostapd: wlan0: STA 00:14:a5:8c:d5:76 IEEE 802.11: associated (aid 1)
Mar 29 10:33:13 code hostapd: wlan0: STA 00:14:a5:8c:d5:76 IEEE 802.11: deauthenticated due to local deauth request
Mar 29 10:33:14 code hostapd: wlan0: STA 00:14:a5:8c:d5:76 IEEE 802.11: authenticated
Mar 29 10:33:14 code hostapd: wlan0: STA 00:14:a5:8c:d5:76 IEEE 802.11: associated (aid 1)
Mar 29 10:33:17 code hostapd: wlan0: STA 00:14:a5:8c:d5:76 IEEE 802.11: deauthenticated due to local deauth request
Mar 29 10:33:18 code hostapd: wlan0: STA 00:14:a5:8c:d5:76 IEEE 802.11: authenticated
Mar 29 10:33:18 code hostapd: wlan0: STA 00:14:a5:8c:d5:76 IEEE 802.11: associated (aid 1)
Mar 29 10:33:21 code hostapd: wlan0: STA 00:14:a5:8c:d5:76 IEEE 802.11: deauthenticated due to local deauth request

на стороне клиента

Mar 29 09:32:33 dell-laptop kernel: [ 4845.900059] wlan0: direct probe to AP 00:17:9a:77:bd:52 try 1
Mar 29 09:32:33 dell-laptop kernel: [ 4845.902079] wlan0 direct probe responded
Mar 29 09:32:33 dell-laptop kernel: [ 4845.902086] wlan0: authenticate with AP 00:17:9a:77:bd:52
Mar 29 09:32:33 dell-laptop kernel: [ 4845.904803] wlan0: authenticated
Mar 29 09:32:33 dell-laptop kernel: [ 4845.904810] wlan0: associate with AP 00:17:9a:77:bd:52
Mar 29 09:32:33 dell-laptop kernel: [ 4845.906740] wlan0: RX ReassocResp from 00:17:9a:77:bd:52 (capab=0x411 status=0 aid=1)
Mar 29 09:32:33 dell-laptop kernel: [ 4845.906745] wlan0: associated
Mar 29 09:32:36 dell-laptop kernel: [ 4849.011232] wlan0: deauthenticated (Reason: 2)
Mar 29 09:32:37 dell-laptop kernel: [ 4850.008047] wlan0: direct probe to AP 00:17:9a:77:bd:52 try 1
Mar 29 09:32:37 dell-laptop kernel: [ 4850.010790] wlan0 direct probe responded
Mar 29 09:32:37 dell-laptop kernel: [ 4850.010795] wlan0: authenticate with AP 00:17:9a:77:bd:52
Mar 29 09:32:37 dell-laptop kernel: [ 4850.012309] wlan0: authenticated
Mar 29 09:32:37 dell-laptop kernel: [ 4850.012312] wlan0: associate with AP 00:17:9a:77:bd:52
Mar 29 09:32:37 dell-laptop kernel: [ 4850.014414] wlan0: RX ReassocResp from 00:17:9a:77:bd:52 (capab=0x411 status=0 aid=1)
Mar 29 09:32:37 dell-laptop kernel: [ 4850.014418] wlan0: associated
Mar 29 09:32:39 dell-laptop nullmailer[10916]: smtp: Failed: Connect failed
Mar 29 09:32:39 dell-laptop nullmailer[2454]: Sending failed:  Host not found
Mar 29 09:32:39 dell-laptop nullmailer[2454]: Starting delivery: protocol: smtp host: mail. file: 1258962878.5588
Mar 29 09:32:40 dell-laptop kernel: [ 4853.122399] wlan0: deauthenticated (Reason: 2)
Mar 29 09:32:41 dell-laptop kernel: [ 4854.120055] wlan0: direct probe to AP 00:17:9a:77:bd:52 try 1
Mar 29 09:32:41 dell-laptop kernel: [ 4854.122065] wlan0 direct probe responded
Mar 29 09:32:41 dell-laptop kernel: [ 4854.122068] wlan0: authenticate with AP 00:17:9a:77:bd:52
Mar 29 09:32:41 dell-laptop kernel: [ 4854.124335] wlan0: authenticated
Mar 29 09:32:41 dell-laptop kernel: [ 4854.124341] wlan0: associate with AP 00:17:9a:77:bd:52
Mar 29 09:32:41 dell-laptop kernel: [ 4854.127234] wlan0: RX ReassocResp from 00:17:9a:77:bd:52 (capab=0x411 status=0 aid=1)
Mar 29 09:32:41 dell-laptop kernel: [ 4854.127240] wlan0: associated
Mar 29 09:32:44 dell-laptop kernel: [ 4857.230437] wlan0: deauthenticated (Reason: 2)
Mar 29 09:32:45 dell-laptop kernel: [ 4858.230405] wlan0: direct probe to AP 00:17:9a:77:bd:52 try 1
Mar 29 09:32:45 dell-laptop kernel: [ 4858.236051] wlan0 direct probe responded
Mar 29 09:32:45 dell-laptop kernel: [ 4858.236059] wlan0: authenticate with AP 00:17:9a:77:bd:52
Mar 29 09:32:45 dell-laptop kernel: [ 4858.244201] wlan0: authenticated
Mar 29 09:32:45 dell-laptop kernel: [ 4858.244209] wlan0: associate with AP 00:17:9a:77:bd:52
Mar 29 09:32:45 dell-laptop kernel: [ 4858.248264] wlan0: RX ReassocResp from 00:17:9a:77:bd:52 (capab=0x411 status=0 aid=1)
Mar 29 09:32:45 dell-laptop kernel: [ 4858.248270] wlan0: associated
Mar 29 09:32:48 dell-laptop kernel: [ 4861.349994] wlan0: deauthenticated (Reason: 2)
Mar 29 09:32:49 dell-laptop kernel: [ 4862.348443] wlan0: direct probe to AP 00:17:9a:77:bd:52 try 1
время на точке доступа просто на час спешит.

vasya_p
() автор топика
Ответ на: комментарий от vasya_p

Ну, у меня такой же чип. И проблемы были похожие. Решилось все быстро - установкой ядра .32-13 из репов lucid(последнее на тот момент).

Lindows
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.