lspci -v
...
01: 0b.0 Ethernet controller: Atheros Communications Inc. Atheros AR5001X + Wireless Network Adapter (rev 01)
Subsystem: D-Link System Inc Device 3a73
Flags: bus master, medium devsel, latency 168, IRQ 10
Memory at fc9f0000 (32-bit, non-prefetchable) [size = 64K]
Capabilities: <access denied>
Kernel driver in use: ath5k
Kernel modules: ath5k
...
wget -c http://kernel.ubuntu.com/%7Ekernel-ppa/mainline/v2.6.30.5/linux-headers-2.6.30-02063005-generic_2.6.30-02063005_i386.deb wget -c http://kernel.ubuntu.com/%7Ekernel-ppa/mainline/v2.6.30.5/linux-headers-2.6.30-02063005_2.6.30-02063005_all.deb wget -c http://kernel.ubuntu.com/%7Ekernel-ppa/mainline/v2.6.30.5/linux-image-2.6.30-02063005-generic_2.6.30-02063005_i386.deb wget -c http://kernel.ubuntu.com/%7Ekernel-ppa/mainline/v2.6.30.5/linux-source-2.6.30_2.6.30-02063005_all.deb
sudo dpkg -i * .deb
wget http://www.orbit-lab.org/kernel/compat-wireless-2.6-stable/v2.6.30/compat-wireless-2.6.30.tar.bz2
tar jxvf compat-wireless-2.6.30.tar.bz2
compat-wireless-2.6.30/drivers/net/wireless/ath5/base.c we are looking for a place like this: hw-> wiphy-> interface_modes =
BIT (NL80211_IFTYPE_STATION) |
BIT (NL80211_IFTYPE_ADHOC) |
BIT (NL80211_IFTYPE_MESH_POINT); BIT(NL80211_IFTYPE_AP) | " to the drain: hw-> wiphy-> interface_modes =
BIT (NL80211_IFTYPE_STATION) |
BIT (NL80211_IFTYPE_ADHOC) |
BIT (NL80211_IFTYPE_AP) |
BIT (NL80211_IFTYPE_MESH_POINT); make
sudo make install
sudo make unload wget -c http://mirror.yandex.ru/ubuntu/pool/universe/h/hostapd/hostapd_0.6.9-3_i386.deb
sudo mv /etc/hostapd/hostapd.conf /etc/hostapd/original-hostapd.conf
sudoedit /etc/hostapd/hostapd.conf
interface = wlan0
driver = nl80211
# Your access point name
ssid = MySuperAP
country_code = RU
hw_mode = g
channel = 1
macaddr_acl = 0
wpa = 3
wpa_key_mgmt = WPA-PSK
#Your password
wpa_passphrase = MySuperPass123
wpa_pairwise = TKIP CCMP sudoedit / etc / default / hostapd
RUN_DAEMON = "yes"
DAEMON_CONF = "/ etc / hostapd / hostapd.conf" sudoedit /etc/sysctl.conf
net.ipv4.ip_forward = 1
sudoedit / etc / network / interfaces
# Loopback
auto lo
iface lo inet loopback
# Interface to which the Internet comes for example from a modem
auto eth0
iface eth1 inet static
address 192.168.1.2
netmask 255.255.255.0
gateway 192.168.1.1
# Our wi-fi interface
auto wlan0
iface wlan0 inet static
address 192.168.0.1
netmask 255.255.255.0
gateway 192.168.0.1
pre-up iptables-restore /etc/iptables.rules sudoedit /etc/iptables.rules
# Generated by iptables-save
* nat
: PREROUTING ACCEPT [4430: 389020]
: POSTROUTING ACCEPT [24: 2723]
: OUTPUT ACCEPT [28: 3602]
-A POSTROUTING -s 192.168.0.0/24 -j MASQUERADE
COMMIT sudo aptitude install dhcp3-server
sudoedit /etc/dhcp3/dhcpd.conf ddns-update-style none;
option domain-name "MySuperNet";
option domain-name-servers IPS_OF_DNS_SERVERS;
default-lease-time 42300;
max-lease-time 84600;
log facility local7;
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.100 192.168.0.200;
option routers 192.168.0.1;
} sudoedit / etc / default / dhcp3-server
INTERFACES = "wlan0"
tail -f /var/log/daemon.log
Source: https://habr.com/ru/post/67717/
All Articles