ath0 Link encap:Ethernet HWaddr 00:15:af:21:e1:46 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)eth0 Link encap:Ethernet HWaddr 00:80:48:b5:0b:af inet6 addr: fe80::280:48ff:feb5:baf/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:6 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:468 (468.0 B) Interrupt:21 Base address:0xe800 eth1 Link encap:Ethernet HWaddr 00:1e:8c:c3:7a:42 inet addr:192.168.1.4 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::21e:8cff:fec3:7a42/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:581 errors:0 dropped:0 overruns:0 frame:0 TX packets:663 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:421599 (411.7 KB) TX bytes:114619 (111.9 KB) Interrupt:18 wifi0 Link encap:UNSPEC HWaddr 00-15-AF-21-E1-46-00-00-00-00-00-00-00-00-00-00 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:7998 errors:0 dropped:0 overruns:0 frame:3039 TX packets:601 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:280 RX bytes:731271 (714.1 KB) TX bytes:27646 (26.9 KB) Interrupt:16
lo no wireless extensions.eth0 no wireless extensions.eth1 no wireless extensions.wifi0 no wireless extensions.ath0 IEEE 802.11g ESSID:"" Nickname:"" Mode:Managed Frequency:2.437 GHz Access Point: Not-Associated Bit Rate:0 kb/s Tx-Power:17 dBm Sensitivity=1/1 Retry:off RTS thr:off Fragment thr:off Power Management:off Link Quality=0/70 Signal level=-96 dBm Noise level=-96 dBm Rx invalid nwid:82527 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0
auto loiface lo inet loopbackaddress 127.0.0.1netmask 255.0.0.0auto eth1iface eth1 inet dhcpauto eth0iface eth0 inet staticaddress 10.0.0.1netmask 255.255.255.0 network 10.0.0.0broadcast 10.0.0.255up /etc/network/scriptЦитата# це сам скрипт, який розміщений тут /etc/network/scriptsudo iptables -Fsudo iptables -t nat -Fsudo iptables -Xsudo iptables -t nat -Xsudo iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADEsudo iptables -A FORWARD -i eth0 -j ACCEPTsudo iptables -A FORWARD -i wifi0 -j ACCEPT# закоменчено, бо з цими налаштуваннями інтернет взагалі не працює# auto wifi0# address 10.106.146.1# netmask 255.255.255.0# wireless-mode ad-hoc# wireless-channel 1# wireless-rate auto# wireless-essid bubenup /etc/network/script
# це сам скрипт, який розміщений тут /etc/network/scriptsudo iptables -Fsudo iptables -t nat -Fsudo iptables -Xsudo iptables -t nat -Xsudo iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADEsudo iptables -A FORWARD -i eth0 -j ACCEPTsudo iptables -A FORWARD -i wifi0 -j ACCEPT
ifconfig ath0 downiwconfig ath0 essid <ваше> mode Ad-Hoc channel auto rate auto (тут можливло в консоль виваляться помилки)iwconfig
ifconfig ath0 10.0.0.1 upiwconfig scan
auto wifi0 (інтерфейс ВайФай)address 10.106.146.1netmask 255.255.255.0wireless-mode ad-hocwireless-channel 1wireless-rate autowireless-essid buben
Error for wireless request "Set Mode" (8B06) : SET failed on device ath0 ; Invalid argument.
lo no wireless extensions.eth0 no wireless extensions.eth1 no wireless extensions.wifi0 no wireless extensions.ath0 IEEE 802.11g ESSID:"" Nickname:"" Mode:Managed Channel:0 Access Point: Not-Associated Bit Rate:0 kb/s Tx-Power:17 dBm Sensitivity=1/1 Retry:off RTS thr:off Fragment thr:off Power Management:off Link Quality=0/70 Signal level=-96 dBm Noise level=-96 dBm Rx invalid nwid:228 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0
scan No such device
ath0 IEEE 802.11g ESSID:"" Nickname:"" Mode:Managed Channel:0 Access Point: Not-Associated Bit Rate:0 kb/s Tx-Power:17 dBm Sensitivity=1/1 RetryШокованийff RTS thrШокованийff Fragment thrШокованийff Power ManagementШокованийff Link Quality=0/70 Signal level=-96 dBm Noise level=-96 dBm Rx invalid nwid:228 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0
ifconfig
ifconfig ath0 down
iwconfig
iwconfig ath0 essid buben mode ad-hoc channel auto rate auto
ifconfig ath0 10.0.0.1 up
iwlist scan
Ignoring unknown interface wifi0=wifi0.
ifconfig -a
lo no wireless extensions.eth0 no wireless extensions.eth1 no wireless extensions.wifi0 no wireless extensions.ath0 IEEE 802.11g ESSID:"" Nickname:"" Mode:Managed Channel:0 Access Point: Not-Associated Bit Rate:0 kb/s Tx-Power:17 dBm Sensitivity=1/1 Retry:off RTS thr:off Fragment thr:off Power Management:off Link Quality=0/70 Signal level=-96 dBm Noise level=-96 dBm Rx invalid nwid:63 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0
lo no wireless extensions.eth0 no wireless extensions.eth1 no wireless extensions.wifi0 no wireless extensions.ath0 IEEE 802.11g ESSID:"buben" Nickname:"" Mode:Managed Frequency:2.412 GHz Access Point: Not-Associated Bit Rate:0 kb/s Tx-Power:17 dBm Sensitivity=1/1 Retry:off RTS thr:off Fragment thr:off Power Management:off Link Quality=0/70 Signal level=-96 dBm Noise level=-96 dBm Rx invalid nwid:63 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0
lo Interface doesn't support scanning.eth0 Interface doesn't support scanning.eth1 Interface doesn't support scanning.wifi0 Interface doesn't support scanning.ath0 Scan completed : Cell 01 - Address: 00:1E:58:C0:DF:99 ESSID:"broadcast" Mode:Master Frequency:2.437 GHz (Channel 6) Quality=3/70 Signal level=-92 dBm Noise level=-95 dBm Encryption key:on Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s 48 Mb/s; 54 Mb/s Extra:bcn_int=100 Extra:ath_ie=dd0900037f010100200000
02:00.0 Ethernet controller [0200]: Atheros Communications Inc. AR242x 802.11abg Wireless PCI Express Adapter [168c:001c] (rev 04)