0.
ставим дрова на wi-fi
http://wiki.debian.org/ath9k_htc подробно про тп линк (у меня была точка tplink tl-wn422g * чип atheros)
nano /etc/apt/sources.list
deb http://http.debian.net/debian/ wheezy main contrib non-free
apt-get update && apt-get install firmware-atheros
все завилось и заморгала с D-link dwa125 были проблемы.
он так и не заработал как точка доступа.
перепробовал кучу дров.
1.
apt-get install wireless-tools dhcp3-server make linux-headers gcc libnl1 libiw30
linux-headers-3.2.0-4-amd64 - было у меня
wicd-client -n (apt-get install wicd) может пригодится если есть X или юзаем iwconfig (можно подключится к wifi)
пример
iwconfig wlan0 mode ad-hoc essid pnet key passss channel 1 freq 2.412G (где та читал что это теперь не работает отдали управление hostapd)
2.
Включим forward
nano /etc/rc.local
------------------
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
------------------
3.
Настроим DHCP и сеть
nano /etc/default/isc-dhcp-server
--------------------
INTERFACES="wlan0"
--------------------
nano /etc/dhcp/dhcpd.conf
-------------------------
ddns-update-style none;
option domain-name-servers 8.8.8.8;
option routers 10.254.1.151;
option broadcast-address 10.10.77.20;
default-lease-time 600;
max-lease-time 7200;
log-facility local7;
subnet 10.10.77.0 netmask 255.255.255.0 {
range 10.10.77.150 10.10.77.200;
}
-------------------------
nano /etc/network/interfaces
----------------------------
iface eth0 inet static
address 10.254.1.151
netmask 255.255.255.0
gateway 10.254.1.1
auto eth0
iface wlan0 inet static
address 10.10.77.20
netmask 255.255.255.0
auto wlan0
----------------------------
4.
установка hostapd ставить из исходников (с пакетов чет нефига не работала)
тут их все релизы http://hostap.epitest.fi/releases/
cd /usr/src
wget http://hostap.epitest.fi/releases/hostapd-0.7.3.tar.gz
tar xf hostapd-0.7.3.tar.gz
cd hostapd-0.7.3/hostapd
cp defconfig .config
nano .config
привел к такому виду
--------------------
# Driver interface for drivers using the nl80211 kernel interface
CONFIG_DRIVER_NL80211=y
# driver_nl80211.c requires a rather new libnl (version 1.1) which may not be
# shipped with your distribution yet. If that is the case, you need to build
# newer libnl version and point the hostapd build to use it.
LIBNL=/usr/src/libnl
CFLAGS += -I$(LIBNL)/include
LIBS += -L$(LIBNL)/lib
----------------------
make
make install
5.
настройка hostapd
nano /etc/hostapd/hostapd.conf
--------------------------------
interface=wlan0
driver=nl80211
ssid=название точки
country_code=RU
hw_mode=g
channel=8
auth_algs=1
logger_syslog=-1
logger_syslog_level=3
logger_stdout=-1
logger_stdout_level=2
ignore_broadcast_ssid=0
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_passphrase=пароль
rsn_pairwise=CCMP
-----------------------------
hostapd -B /etc/hostapd/hostapd.conf запуск в фоне
6. доп материалы
rmmod rt2800usb rt2x00usb rt5370sta
hostapd -d /etc/hostapd/hostapd.conf
tail -n25 /var/log/syslog
dmesg
cat /proc/modules
nano /etc/modprobe.d/blacklist.conf
HowTo: WLAN Ralink RT2870 USB Stick + (K)Ubuntu 8.10
http://rus-linux.net/MyLDP/admin/Useful-Linux-commands-and-configurations-3.html
http://www.lexpr.ru/wifi_in_cli
http://www.ekzorchik.ru/wordpress/2012/06/ubuntu-10-iwconfig/
http://4pda.ru/forum/index.php?showtopic=175743&st=220#entry6239263
http://www.cyberciti.biz/faq/debian-ubuntu-linux-setting-wireless-access-point/
http://forum.ubuntu.ru/index.php?topic=62844
http://habrahabr.ru/post/116297/
http://blogzadrota.ru/d-link-dwa-125-rev-a3-%D0%B2-ubuntu-12-04/
http://www.mediatek.com/_en/07_downloads/01_windows.php
http://manpages.ylsoftware.com/ru/iwconfig.8.html
Рубрики