ifconfig
Код: Выделить всё
eth0 Link encap:Ethernet HWaddr 00:01:02:03:04:05
inet addr:192.168.0.5 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:132 errors:0 dropped:0 overruns:0 frame:0
TX packets:47 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:16148 (15.7 KiB) TX bytes:7638 (7.4 KiB)
Interrupt:4
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 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)
wlan0 Link encap:Ethernet HWaddr 00:E0:4C:81:86:86
inet addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:17 errors:0 dropped:0 overruns:0 frame:0
TX packets:31 errors:11 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:1921 (1.8 KiB) TX bytes:1000 (1000.0 B)
Interrupt:2/etc/network/interfaces
Код: Выделить всё
#Ethernet port1 config
ETH0_ENABLED=yes
ETH0_FORCEIP=no
ETH0_IN_BR0=no
ETH0_USE_DHCP=no
ETH0_IPADDR=192.168.0.5/24
#Wireliss port config
WLAN_ENABLED=yes
WLAN_FORCEIP=no
WLAN_IN_BR0=no
WLAN_USE_DHCP=no
WLAN_IPADDR=192.168.2.1/24/etc/network/routes
Код: Выделить всё
#!/bin/sh
ip ro add default via 192.168.0.1/etc/network/iptables
Код: Выделить всё
#!/bin/sh
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE/etc/udhcpd.conf
Код: Выделить всё
interface wlan0
start 192.168.2.2
end 192.168.2.3
opt dns xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx
option subnet 255.255.255.0
opt router 192.168.2.1
option lease 86400/etc/network/wifi/general
Код:
#---------------------------------GENERAL WIRELESS INTERFACE CONFIG--------------------------------------
#Set Mode: AP/CLIENT/ADHOC
RMODE=AP
#Set ESSID of wirelless Infrastructure Network
ESSID=my-wifi
#This is name BS to first probe connect (12 digits macaddress)
#JOINBS=0019CB7515A2
#Deny the association SSID of вanyв including upper and lower cases.
#DSSID=BAD_SSID
#This is AP is hidden
#HIDEAP=no
#Set WiFi mode b/g/bg
MODE=bg
#If enabled in B+G mode, AP will deny the association from 11B STA.
#DENYLEGACY=no
#G protection is 802.11g mode prioriry (instead use G only mode)
#GPROTECTION=no
#Use cts to Self for protection mode (may be need by some old devices)
#CTS2SELF=no
#Set Channel here 1-14 (0 for auto)
CHANNEL=0
#Set Initial Gain: in range 0-7
#GAIN=7
#AUTOGAIN=yes
#Dynamic RF sensitivity adjustment
#DRSA=yes
#Set TransmitPower for CCK(802.11b) modulation (1-4b)
#Attention! The parametre increase can cause failure RF of the module.
#More 2A need fun.
#CCKPOWER=8
#Set TransmitPower for OFDM(802.11g) modulation. Recomended 1A-25.
#Attention! The parametre increase can cause failure RF of the module.
#16(default indoor),20(default outdoor, need fun)
#OFDMPOWER=16
#Enhanced Tx Power
#ENHTX=yes
#Show hidden BS
#SHOWHIDDEN=yes
#Preample type SHORT/LONG
#SHORTPREAMBLE=yes
#ACK timeout. Range 0-255. 255 is auto (self) configuration
#ACK=255
#Roaming support (IEEE 802.11f server mode) on AP mode
#ENABLE_ROAMING=no
#Fast roaming (IEEE 802.11f client support) on client mode
#FAST_ROAMING=no
#----------------------------------SPEED MODE CONFIGS------------------------------------------------------
#FIXRATE=no #your don`t use fixrate, instead select basicrates and operates for need speed mode
#BASICRATES=4095
#OPRATES=4095
#WLAN_BURST=no
#----------------------------------ADVANCED PARAMETRS------------------------------------------------------
#Interval of service packets transmit
#BCINIT=200
#Frame size for fragment
#FRAGTHRES=2346
#RTS/CTS Threshold
#RTSTHRES=2347
#Time of last recive frame when connection is closed (30 minutes of seconds)
#EXPIRED_TIME=1800
#Count of short rertry send frames (Fast hand shake without the coordination of parameters)
#SHORTRETRY=3
#Count of long rertry send frames or frame dead(Slow hand shake with the full coordination of parameters)
#LONGRETRY=2
#Change AP mode wlan led type = 6(enable), CB mode = 2(link), 7 (Enable/tx/rx), CB mode = 5 (link/tx/rx)
LED_TYPE=6
#Realtek turmo mode Auto/Always/Disable (actual only RTL based devices and fixrate disabled)
#TURBO_MODE=Auto
#Prioriry transmit maximum speed on realtek turbo mode
#TXPRIO=yes
#Enable Quality of Service
#QOS=yes
#For bridged mode set this parameters
# Nat2.5 is technology to change the source MAC to MAC of Wlan-interface
# be carefull it says disabled, so make inverse in your decision
#NAT2_5=yes
# Macclone says all about itself. It just takes MAC of ETHERNET device on other end of line
# and take it for Wlan-interface. be carefull if this enabled it must be one device on a line.
#MACCLONE=no
# Disable/Enable dhcp relay from/to wireless interface
#DHCPBCST=yes
#Block packets between clients connected
# 0 - disable; 1 - block relay;2 - block relay but passup
#BLOCK_RELAY=0
#Use lowest basic rate to send multicast and broadcast
#LOWMCS=yes
#---------------------------------------ACCESS OPTIONS-------------------------------------------------------
#802.11 Authentication type OPEN-open system, SHAREDвshared key, AUTO-auto
#AUTHTYPE=AUTO
#Enable/disable access list
#ACL=no
#Allowed macs of client (on one through a blank)
#ALLOWMACS="0015AF8BD700 004F6A010719 003005DF2049 0019CB7515A2 00027267E56A"
#Enable/disable wep
#WEP=no
#WepKey 26 digits for 128bit
#WEPKEY=11223344556677889910111213
#Enable/disable wpa/wpa2
#WPA=no
#--------------------------------------WDS Options----------------------------------------------------------
#Enable/disable wds
#WDS=no
#Set MAC/BSSID of WDS stations for driver and wds-interfaces (first station for WDS).
#WDS0_MAC="0019CB7515A2 00006c000002"
#Pure WDS enable, client not have connect to this AP
#WDS_ONLY=no
#Give WDS packets higher priority
#WDS_PRIO=yes
#WDS Encrypt 0 - disabled, 1 - WEP64, 5 - WEP128
#WDS_CRYPT=0
#Passphrase or hex key for WDS mode encryption
#WepKey 26 digits for WEP 128bit
#WDS_WEPKEY=11223344556677889910123456
#--------------------------------------REP Options----------------------------------------------------------
#Repeater mode
#REPEATER=no
#REPEATER Encrypt 0 - disabled, 1 - WEP64, 5 - WEP128
#REPCRYPT=0
#Extended connection loggin with syslog
#RSSI_DUMP=no
#TSSI_DUMP=no
#CRC_LOG=no
#Be carefull. There're many Hardware-specific mibs
#WLAN_USE_UNCHECKED_MIBS=no
#------------------------------WPS Options NOT SUPORT in this version---------------------------------------
#Support WiFi Protection Setup
#WPS=no
#PIN setting for WPS вstring_valueв with 8 characters in max
#PIN=12345678
#---------------------------------------Other options-------------------------------------------------------
При попытке получить ip по wifi dhcp wifi-radar'ом:
Код: Выделить всё
eth1: dhcpcd 4.0.2 starting
eth1: broadcasting for a lease
eth1: carrier lost
eth1: received SIGTERM, stoppingКак победить?