1 (27.05.2012 19:09:38 отредактировано zenon)

адаптер TP-Link TL-WN851N
На данный момент без wlan0

# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:25:22:69:60:62  
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::225:22ff:fe69:6062/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:10531 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9749 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1201172 (1.1 MiB)  TX bytes:4664839 (4.4 MiB)
          Interrupt:42 Base address:0xc000 

eth1      Link encap:Ethernet  HWaddr 00:21:91:21:80:d5  
          inet6 addr: fe80::221:91ff:fe21:80d5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:10702 errors:0 dropped:14 overruns:0 frame:0
          TX packets:10363 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:5656729 (5.3 MiB)  TX bytes:1952178 (1.8 MiB)
          Interrupt:21 Base address:0xec00 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:25 errors:0 dropped:0 overruns:0 frame:0
          TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:2462 (2.4 KiB)  TX bytes:2462 (2.4 KiB)

ppp0      Link encap:Point-to-Point Protocol  
          inet addr:88.87.92.60  P-t-P:88.87.65.84  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:10009 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9677 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:5392035 (5.1 MiB)  TX bytes:1717330 (1.6 MiB)

Так, еще стоит unbound внутри dns все получают с 192.168.0.1
Маскарад на 192.168.0.0/24 - проводная сетка - тут все ok.
=
Мануал - http://en.gentoo-wiki.com/wiki/Atheros_ … cess_Point
Бридж пока оставил в покое.

# emerge -a hostapd dhcp wireless-tools

ok

# iwconfig
wlan0     IEEE 802.11bgn  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=off   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:on

=

# cd /etc/init.d/
# ln -s net.lo net.wlan0

=
nano /etc/conf.d/net

# eth
config_eth0="192.168.0.1 netmask 255.255.255.0"
routes_eth0="default via 192.168.0.1"
config_eth1="null"

# wi-fi
modules_wlan0="!iwconfig !wpa_supplicant"
config_wlan0="192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255"

=
nano /etc/conf.d/dhcpd

DHCPD_IFACE="wlan0"

=
nano /etc/dhcp/dhcpd.conf

subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.75 192.168.1.100;
option domain-name-servers 192.168.0.1; # UNBOUND у нас тут вроде
option routers 192.168.1.1;
option broadcast-address 192.168.1.255;
default-lease-time 10000;
max-lease-time 20000;
}

=
nano /etc/conf.d/hostapd

INTERFACES="wlan0 eth0 eth1 ppp0"

=
nano /etc/hostapd/hostapd.conf

interface=wlan0
#bridge=br0                         (optional, if you want bridging remove the #)
driver=nl80211
ssid=zenon    
channel=1
hw_mode=g
wpa=3
wpa_passphrase=********       
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=1
debug=0
dump_file=/tmp/hostapd.dump
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
accept_mac_file=/etc/hostapd/hostapd.accept
deny_mac_file=/etc/hostapd/hostapd.deny
auth_algs=1

=
В конфиг IPTABLES добавил:

$IPT -A INPUT   -i wlan0 -p all -j ACCEPT
$IPT -A FORWARD -i wlan0 -p all -j ACCEPT
$IPT -t nat -A POSTROUTING -o ppp0 -s 192.168.1.0/24  -j MASQUERADE

=

# rc-update add net.wlan0 default
# rc-update add hostapd default

=
nano /etc/rc.conf
Включил:
rc_depend_strict="YES"
rc_logger="YES"

=
Вроде ничего не забыл, перезагружусь ......

История показывает, что во всем новом обычно кроется какой-то подвох.
Классическая ошибка, которую совершают проектировщики
абсолютно надежных систем, - недооценка изобретательности клинических идиотов.

2

После ребута:

# ifconfig                                                                             ~
eth0      Link encap:Ethernet  HWaddr 00:25:22:69:60:62  
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::225:22ff:fe69:6062/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:259 errors:0 dropped:0 overruns:0 frame:0
          TX packets:199 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:49786 (48.6 KiB)  TX bytes:39344 (38.4 KiB)
          Interrupt:42 Base address:0xe000 

eth1      Link encap:Ethernet  HWaddr 00:21:91:21:80:d5  
          inet6 addr: fe80::221:91ff:fe21:80d5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:219 errors:0 dropped:0 overruns:0 frame:0
          TX packets:229 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:45583 (44.5 KiB)  TX bytes:43010 (42.0 KiB)
          Interrupt:21 Base address:0x2c00 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          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)

ppp0      Link encap:Point-to-Point Protocol  
          inet addr:88.87.92.60  P-t-P:88.87.65.84  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:198 errors:0 dropped:0 overruns:0 frame:0
          TX packets:205 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:39844 (38.9 KiB)  TX bytes:37451 (36.5 KiB)

wlan0     Link encap:Ethernet  HWaddr b0:48:7a:e9:f2:7e  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST 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:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
История показывает, что во всем новом обычно кроется какой-то подвох.
Классическая ошибка, которую совершают проектировщики
абсолютно надежных систем, - недооценка изобретательности клинических идиотов.

3

# cat /var/log/rc.log
rc shutdown logging started at Sat May 19 17:09:27 2012

 * Caching service dependencies ...
Service `hostapd' needs non existent service `net.ppp0'
 [ ok ]
 * Stopping local
 [ ok ]
 * Stopping vixie-cron ...
 [ ok ]
 * Saving random seed ...
 [ ok ]
 * Deactivating swap devices ...
 [ ok ]
 * Stopping sshd ...
 [ ok ]
 * Stopping PHP FastCGI Process Manager ...
 [ ok ]
 * Stopping nginx ...
 [ ok ]
 * Unmounting network filesystems ...
 [ ok ]
 * Stopping mysql ...
 [ ok ]
 * Unloading lm_sensors modules...
 *   Unloading w83627ehf ...
 [ ok ]
 * Stopping htpdate ...
 [ ok ]
 * Stopping dhcpd ...
 [ ok ]
 * Stopping unbound ...
 [ ok ]
 * Bringing down interface wlan0
 * Bringing down interface eth1
 *   Stopping ifplugd on eth1 ...
 [ ok ]
 * Bringing down interface eth0
 *   Stopping ifplugd on eth0 ...
 [ ok ]
 * Bringing down interface lo
 * Stopping D-BUS system messagebus ...
 [ ok ]
 * Unmounting loop devices
 * Unmounting filesystems
 *   Unmounting /mnt/data ...
 [ ok ]
 *   Unmounting /mnt/backup ...
 [ ok ]
 *   Unmounting /mnt/srv ...
 [ ok ]
 * Stopping udev ...
 [ ok ]
 * Setting hardware clock using the system clock [Local Time] ...
 [ ok ]

rc shutdown logging stopped at Sat May 19 17:09:30 2012


rc boot logging started at Sat May 19 21:10:22 2012

 * Setting system clock using the hardware clock [Local Time] ...
 [ ok ]
 * Autoloaded 0 module(s)
 * Checking local filesystems  ...
Reiserfs super block in block 16 on 0x801 of format 3.6 with standard journal
Blocks (total/free): 7935744/5405922 by 4096 bytes
Filesystem is clean
Reiserfs super block in block 16 on 0x802 of format 3.6 with standard journal
Blocks (total/free): 13107024/13046390 by 4096 bytes
Filesystem is clean
backup: clean, 53407/3276800 files, 3091155/13107200 blocks
data: clean, 353/18849792 files, 18134638/75386880 blocks
 [ ok ]
 * Remounting root filesystem read/write ...
 [ ok ]
 * Updating /etc/mtab ...
 [ ok ]
 * Mounting local filesystems ...
 [ ok ]
 * Configuring kernel parameters ...
 [ ok ]
 * Creating user login records ...
 [ ok ]
 * Cleaning /var/run ...
 [ ok ]
 * Wiping /tmp directory ...
 [ ok ]
 * Setting terminal encoding [UTF-8] ...
 [ ok ]
 * Setting console font [ter-k14n] ...
 [ ok ]
 * Setting hostname to linuxru.org ...
 [ ok ]
 * Setting keyboard mode [UTF-8] ...
 [ ok ]
 * Loading key mappings [-u ru] ...
 [ ok ]
 * Bringing up interface lo
 *   127.0.0.1/8 ...
 [ ok ]
 *   Adding routes
 *     127.0.0.0/8 via 127.0.0.1 ...
 [ ok ]
 * Activating swap devices ...
 [ ok ]
 * Initializing random number generator ...
 [ ok ]

rc boot logging stopped at Sat May 19 17:10:24 2012


rc default logging started at Sat May 19 17:10:24 2012

 * Starting D-BUS system messagebus ...
 [ ok ]
 * Bringing up interface wlan0
 *   192.168.1.1 ...
 [ ok ]
 * Bringing up interface eth0
 *   Starting ifplugd on eth0 ...
 [ ok ]
 *     Backgrounding ...
 * WARNING: net.eth0 has started, but is inactive
 * Bringing up interface eth1
 *   Starting ifplugd on eth1 ...
 [ ok ]
 *     Backgrounding ...
 * WARNING: net.eth1 has started, but is inactive
 * ERROR: hostapd needs service(s) net.ppp0
 * WARNING: unbound is scheduled to start when net.eth0, net.eth1 has started
 * WARNING: htpdate is scheduled to start when net.eth0, net.eth1 has started
 * Loading lm_sensors modules...
 *   Loading w83627ehf ...
 [ ok ]
 * Initializing sensors ...
 [ ok ]
 * Starting mysql ...
 [ ok ]
 * WARNING: netmount is scheduled to start when net.eth0 has started
 * WARNING: nginx is scheduled to start when net.eth0 has started
 * WARNING: php-fpm is scheduled to start when net.eth0 has started
 * WARNING: sshd is scheduled to start when net.eth0 has started
 * Doing udev cleanups
 * Starting vixie-cron ...
 [ ok ]
 * Starting local

/dev/sda:
 setting Advanced Power Management level to disabled
 HDIO_DRIVE_CMD failed: Input/output error
 APM_level    = not supported

/dev/sda:
 setting acoustic management to 254
 acoustic      = 254 (128=quiet ... 254=fast)

/dev/sda:
 setting standby to 0 (off)
. Connected!
smartctl 5.42 2011-10-20 r3458 [x86_64-linux-3.1.10-gentoo-r1] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF ENABLE/DISABLE COMMANDS SECTION ===
SMART Enabled.


/dev/sda:
 setting Advanced Power Management level to disabled
 HDIO_DRIVE_CMD failed: Input/output error
 setting acoustic management to 254
 APM_level    = not supported
 acoustic      = 254 (128=quiet ... 254=fast)
........................................................
Подгружаем модули...
Очистка всех цепочек IPTABLES
...
Выполненно.
........................................................
| EXTIP=88.87.92.60 EXTBC=255.255.255.255 EXTMSK=255.255.255.255  |
| EXTNET=88.87.92.60/255.255.255.255                              |
| LANIP=192.168.0.1 LANBC=192.168.0.255 LANMSK=255.255.255.0            |
| LANNET=192.168.0.1/255.255.255.0                                |
+-----------------------------------------------------------------+
| Default polices: INPUT DROP; OUTPUT DROP; FORWARD DROP;         |
+-----------------------------------------------------------------+
+-----------------------------------------------------------------+
DROP  all opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0   state INVALID
DROP  all opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0   state INVALID
DROP  all opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0   ctstate INVALID
DROP  all opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0   ctstate INVALID
REJECT  tcp opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0   tcpflags: 0x12/0x12 state NEW reject-with tcp-reset
DROP  tcp opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0   tcpflags:! 0x17/0x02 state NEW
DROP  tcp opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0   tcpflags: 0x3F/0x29
DROP  tcp opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0   tcpflags: 0x3F/0x3F
DROP  tcp opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0   tcpflags: 0x3F/0x37
DROP  tcp opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0   tcpflags: 0x3F/0x00
DROP  tcp opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0   tcpflags: 0x06/0x06
DROP  tcp opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0   tcpflags: 0x03/0x03
REJECT  tcp opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0   tcpflags: 0x12/0x12 state NEW reject-with tcp-reset
DROP  tcp opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0   tcpflags:! 0x17/0x02 state NEW
DROP  tcp opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0   tcpflags: 0x3F/0x29
DROP  tcp opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0   tcpflags: 0x3F/0x3F
DROP  tcp opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0   tcpflags: 0x3F/0x37
DROP  tcp opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0   tcpflags: 0x3F/0x00
DROP  tcp opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0   tcpflags: 0x06/0x06
DROP  tcp opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0   tcpflags: 0x03/0x03
DROP  icmp opt -f in * out *  0.0.0.0/0  -> 0.0.0.0/0  
DROP  icmp opt -f in * out *  0.0.0.0/0  -> 0.0.0.0/0  
DROP  icmp opt -f in * out *  0.0.0.0/0  -> 0.0.0.0/0  
DROP  tcp opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0   tcpflags:! 0x17/0x02 state NEW
DROP  tcp opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0   tcpflags:! 0x17/0x02 state NEW
DROP  tcp opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0   tcpflags:! 0x17/0x02 state NEW
TCPMSS  tcp opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0   tcpflags: 0x06/0x02 TCPMSS clamp to PMTU
DROP  all opt -- in !lo out *  127.0.0.0/8  -> 0.0.0.0/0  
DROP  all opt -- in !lo out *  127.0.0.0/8  -> 0.0.0.0/0  
DROP  all opt -- in ppp0 out *  0.0.0.0/0  -> 255.255.255.255  
DROP  all opt -- in eth0 out *  0.0.0.0/0  -> 192.168.0.255  
DROP  all opt -- in * out ppp0  0.0.0.0/0  -> 255.255.255.255  
DROP  all opt -- in * out eth0  0.0.0.0/0  -> 192.168.0.255  
DROP  all opt -- in * out ppp0  0.0.0.0/0  -> 255.255.255.255  
DROP  all opt -- in * out eth0  0.0.0.0/0  -> 192.168.0.255  
ACCEPT  all opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0   state RELATED,ESTABLISHED
ACCEPT  all opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0   state RELATED,ESTABLISHED
ACCEPT  all opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0   state RELATED,ESTABLISHED
ACCEPT  all opt -- in lo out *  0.0.0.0/0  -> 0.0.0.0/0  
ACCEPT  all opt -- in * out lo  0.0.0.0/0  -> 0.0.0.0/0  
ACCEPT  all opt -- in eth0 out *  0.0.0.0/0  -> 0.0.0.0/0  
ACCEPT  all opt -- in * out eth0  0.0.0.0/0  -> 0.0.0.0/0  
REJECT  all opt -- in ppp0 out eth0  0.0.0.0/0  -> 0.0.0.0/0   reject-with icmp-port-unreachable
ACCEPT  all opt -- in eth0 out ppp0  0.0.0.0/0  -> 0.0.0.0/0  
ACCEPT  icmp opt -- in ppp0 out *  0.0.0.0/0  -> 0.0.0.0/0   icmptype 4
ACCEPT  icmp opt -- in * out ppp0  0.0.0.0/0  -> 0.0.0.0/0   icmptype 4
ACCEPT  icmp opt -- in ppp0 out *  0.0.0.0/0  -> 0.0.0.0/0   icmptype 8
ACCEPT  icmp opt -- in * out ppp0  0.0.0.0/0  -> 0.0.0.0/0   icmptype 0
ACCEPT  icmp opt -- in * out ppp0  0.0.0.0/0  -> 0.0.0.0/0   icmptype 8
ACCEPT  icmp opt -- in ppp0 out *  0.0.0.0/0  -> 0.0.0.0/0   icmptype 12
ACCEPT  icmp opt -- in * out ppp0  0.0.0.0/0  -> 0.0.0.0/0   icmptype 12
ACCEPT  tcp opt -- in eth0 out *  0.0.0.0/0  -> 0.0.0.0/0   tcp dpt:44535
ACCEPT  tcp opt -- in * out eth0  0.0.0.0/0  -> 0.0.0.0/0   tcp spt:44535
ACCEPT  tcp opt -- in ppp0 out *  0.0.0.0/0  -> 0.0.0.0/0   tcp dpt:80
ACCEPT  tcp opt -- in * out ppp0  0.0.0.0/0  -> 0.0.0.0/0   tcp spt:80
ACCEPT  udp opt -- in * out ppp0  0.0.0.0/0  -> 0.0.0.0/0   udp dpt:53
ACCEPT  tcp opt -- in * out ppp0  0.0.0.0/0  -> 0.0.0.0/0   tcp dpt:80
ACCEPT  tcp opt -- in * out ppp0  0.0.0.0/0  -> 0.0.0.0/0   tcp dpt:443
ACCEPT  tcp opt -- in * out ppp0  0.0.0.0/0  -> 0.0.0.0/0   tcp dpt:873
ACCEPT  tcp opt -- in * out ppp0  0.0.0.0/0  -> 0.0.0.0/0   tcp dpt:25
ACCEPT  tcp opt -- in * out ppp0  0.0.0.0/0  -> 0.0.0.0/0   tcp dpt:587
ACCEPT  tcp opt -- in ppp0 out *  0.0.0.0/0  -> 0.0.0.0/0   tcp dpts:28050:28055
ACCEPT  tcp opt -- in * out ppp0  0.0.0.0/0  -> 0.0.0.0/0   tcp spts:28056:28060
ACCEPT  tcp opt -- in ppp0 out *  0.0.0.0/0  -> 0.0.0.0/0   tcp dpts:28050:28055
ACCEPT  tcp opt -- in ppp0 out *  0.0.0.0/0  -> 0.0.0.0/0   state NEW multiport dports 6881,6882,6883,6884,6885
ACCEPT  tcp opt -- in ppp0 out *  0.0.0.0/0  -> 0.0.0.0/0   state NEW multiport dports 6881,6882,6883,6884,6885
iptables v1.4.12.1: Can't use -i with OUTPUT

Try `iptables -h' or 'iptables --help' for more information.
ACCEPT  tcp opt -- in ppp0 out *  0.0.0.0/0  -> 0.0.0.0/0   state NEW multiport sports 6881,6882,6883,6884,6885
ACCEPT  tcp opt -- in ppp0 out *  0.0.0.0/0  -> 0.0.0.0/0   state NEW multiport sports 6881,6882,6883,6884,6885
iptables v1.4.12.1: Can't use -i with OUTPUT

Try `iptables -h' or 'iptables --help' for more information.
REJECT  all opt -- in ppp0 out *  0.0.0.0/0  -> 0.0.0.0/0   psd weight-threshold: 21 delay-threshold: 300 lo-ports-weight: 3 hi-ports-weight: 1  reject-with icmp-port-unreachable
MASQUERADE  all opt -- in * out ppp0  192.168.0.2  -> 0.0.0.0/0  
MASQUERADE  all opt -- in * out ppp0  192.168.0.5  -> 0.0.0.0/0  
MASQUERADE  all opt -- in * out ppp0  192.168.0.10  -> 0.0.0.0/0  
ACCEPT  all opt -- in wlan0 out *  0.0.0.0/0  -> 0.0.0.0/0  
ACCEPT  all opt -- in wlan0 out *  0.0.0.0/0  -> 0.0.0.0/0  
MASQUERADE  all opt -- in * out ppp0  192.168.1.0/24  -> 0.0.0.0/0  
 * Starting unbound ...
 [ ok ]
 * ERROR: php-fpm stopped by something else
 * ERROR: nginx stopped by something else
 [ ok ]

rc default logging stopped at Sat May 19 17:10:31 2012

hostapd не заработал, на сообщения nginx и php-fpm не обращать внимания, сейчас только точку поднять и интернет через нее раздать.
ЧЯТДН?

История показывает, что во всем новом обычно кроется какой-то подвох.
Классическая ошибка, которую совершают проектировщики
абсолютно надежных систем, - недооценка изобретательности клинических идиотов.

4

nano /etc/conf.d/hostapd

INTERFACES="wlan0 eth0 eth1 ppp0"

ppp0 был лишним.
Убрал.

# /etc/init.d/hostapd start                                                            ~
 * Caching service dependencies ...                                                           [ ok ]
 * Starting hostapd ...           

zzz что-то все равно мне кажется не так.......

История показывает, что во всем новом обычно кроется какой-то подвох.
Классическая ошибка, которую совершают проектировщики
абсолютно надежных систем, - недооценка изобретательности клинических идиотов.

5 (20.05.2012 01:08:32 отредактировано zenon)

Пару штрихов.
Забыл стартануть dhcpd и unbound'у разрешить раздачу на 192.168.1.0/24 (access-control: 192.168.1.0/24 allow)

# /etc/init.d/dhcpd start
# /etc/init.d/unbound restart

И всё чудесно работает.
Только вот интересно сейчас это - hw_mode=g, заработает ли в n
Ладно покопаю еще потом....

Кому надо конфиг unbound:

# cat /etc/unbound/unbound.conf                                                        ~
server:
# Степень вывода логов (1-4, при уровне 4 в логи будет попадать вся отладочная информация,
# при уровне 1 - только сообщения об ошибках)
verbosity: 0
# Количество потоков. Рекомендуется ставить равным числу ядер процессора
num-threads: 4
port: 53
interface: 127.0.0.1                 # Интерфейс на котором будем слушать 53-й порт
interface: 192.168.0.1               #
interface-automatic: no              # Определять интерфейсы автоматически мне не нужно
outgoing-interface: 88.87.92.60      # ip адрес интерфейса, который подключен к интернет
        # access-control: 192.168.0.0/24 allow
    access-control: 0.0.0.0/0 refuse
    access-control: 192.168.0.0/24 allow
    access-control: 192.168.1.0/24 allow
    access-control: 127.0.0.0/8 allow
    access-control: ::0/0 refuse
    access-control: ::1 allow
    access-control: ::ffff:127.0.0.1 allow

    do-ip4: yes
    do-ip6: no
    do-udp: yes
    do-tcp: yes
    do-daemonize: yes
    username: unbound
    directory: "/etc/unbound"
    logfile: "/var/log/unbound.log"
    use-syslog: no
    pidfile: "/var/run/unbound.pid"
    hide-version: yes

    msg-cache-slabs: 1
    rrset-cache-slabs: 1
infra-cache-slabs: 1
key-cache-slabs: 1
# more cache memory, rrset=msg*2
# total usage is 150m*cores
rrset-cache-size: 100m
msg-cache-size: 50m
# does not depend on number of cores
outgoing-range: 950
num-queries-per-thread: 512

so-rcvbuf: 4m  # обьем буфера для приема   UDP пакетов (рекомендованное стартовое значение)
so-sndbuf: 4m  # обьем буфера для отправки UDP пакетов (рекомендованное стартовое значение)

# Я не собираю статистику, поэтому эти 3 строки мне в принципе не нужны
statistics-interval: 0
statistics-cumulative: no
extended-statistics: no

remote-control:
  control-enable: yes
  control-interface: 127.0.0.1
  control-port: 8953
  server-key-file: "/etc/unbound/unbound_server.key"
  server-cert-file: "/etc/unbound/unbound_server.pem"
  control-key-file: "/etc/unbound/unbound_control.key"
  control-cert-file: "/etc/unbound/unbound_control.pem"
История показывает, что во всем новом обычно кроется какой-то подвох.
Классическая ошибка, которую совершают проектировщики
абсолютно надежных систем, - недооценка изобретательности клинических идиотов.

6

За сутки гад пару раз завис, после сих манипуляций. До этого uptime месячный без проблем..... ac

История показывает, что во всем новом обычно кроется какой-то подвох.
Классическая ошибка, которую совершают проектировщики
абсолютно надежных систем, - недооценка изобретательности клинических идиотов.

7 (21.05.2012 08:32:07 отредактировано zenon)

Интересно получается, вырубаю из сервера свитч, (оставляю подключение к интернет) и начинаются проблемы.
Со включенным свитчем все хорошо и проводная сетка и wi-fi.
Вот в какие логи смотреть?

История показывает, что во всем новом обычно кроется какой-то подвох.
Классическая ошибка, которую совершают проектировщики
абсолютно надежных систем, - недооценка изобретательности клинических идиотов.

8

hostapd вешает сервак. Если подключений нет, все хорошо, как только подключение, с вероятностью 50/50 в течении 15-ти минут завис гарантирован. ac
млин.

История показывает, что во всем новом обычно кроется какой-то подвох.
Классическая ошибка, которую совершают проектировщики
абсолютно надежных систем, - недооценка изобретательности клинических идиотов.

9

Похожее....
http://forum.lissyara.su/viewtopic.php? … mp;start=0
решение навзничь, замена карты. ac

История показывает, что во всем новом обычно кроется какой-то подвох.
Классическая ошибка, которую совершают проектировщики
абсолютно надежных систем, - недооценка изобретательности клинических идиотов.

10 (22.05.2012 01:22:47 отредактировано zenon)

Обновил hostapd

# eix hostapd
[i] net-wireless/hostapd
     Available versions:  0.7.3{tbz2} (~)1.0-r1{tbz2} {debug ipv6 logwatch madwifi +ssl +wps}
     Installed versions:  1.0-r1{tbz2}(22:54:04 21.05.2012)(logwatch madwifi ssl wps -debug -ipv6)
     Homepage:            http://hostap.epitest.fi
     Description:         IEEE 802.11 wireless LAN Host AP daemon

Упростил до предела конфигурацию:

# cat /etc/hostapd/hostapd.conf
interface=wlan0
driver=nl80211
ssid=zenon
country_code=RU
hw_mode=g
channel=7
macaddr_acl=0
wpa=3
wpa_key_mgmt=WPA-PSK
wpa_passphrase=********
wpa_pairwise=TKIP CCMP

Цепанулся андрофоном, час просмотра ютюба, и все пп_ц сервер висит. ac

История показывает, что во всем новом обычно кроется какой-то подвох.
Классическая ошибка, которую совершают проектировщики
абсолютно надежных систем, - недооценка изобретательности клинических идиотов.

11

Не хотел обновлять ядро (3.1), буду...
Про n режим ссыль грамотная

История показывает, что во всем новом обычно кроется какой-то подвох.
Классическая ошибка, которую совершают проектировщики
абсолютно надежных систем, - недооценка изобретательности клинических идиотов.

12

# eix hostapd
[i] net-wireless/hostapd
     Available versions:  0.7.3{tbz2} (~)1.0-r1{tbz2} {debug ipv6 logwatch madwifi +ssl +wps}
     Installed versions:  1.0-r1{tbz2}(22:54:04 21.05.2012)(logwatch madwifi ssl wps -debug -ipv6)
     Homepage:            http://hostap.epitest.fi
     Description:         IEEE 802.11 wireless LAN Host AP daemon

Может с флагами перемудрил? Убрать madwifi и ssl?

История показывает, что во всем новом обычно кроется какой-то подвох.
Классическая ошибка, которую совершают проектировщики
абсолютно надежных систем, - недооценка изобретательности клинических идиотов.

13

Сдал _взад_ Tp-Link обменять отказались, с формулировкой сложнотехническое устройство и наличия радиомодуля, короче послали на...фиг ... в СЦ, сказал что не буду никуда из-за этой мелочи разъезжать, .... выдали мне бумагу и сами отправят - это DNS - вообще редко у них что-то беру.

Взял Asus PCE-N15

Ставим:

# emerge -a hostapd dhcp wireless-tools

Сразу в характеристиках указана возможность работы в режиме SoftAp, драйвера под Linux идут в комплекте или можно скачать + make, make install, reboot

После ребута картина маслом:

# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm   
          Retry  long limit:7   RTS thr=2347 B   Fragment thr:off
          Encryption key:off
          Power Management:off
# cat /etc/conf.d/net | egrep -v '^#|^$'
config_eth0="192.168.0.2 netmask 255.255.255.0 brd 192.168.0.255"
routes_eth0="default via 192.168.0.1"
dns_domain_lo="zenlo"
dns_servers_eth0="192.168.0.1"
modules_wlan0="!iwconfig !wpa_supplicant"
config_wlan0="192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255"
# cat /etc/conf.d/dhcpd | egrep -v '^#|^$'
DHCPD_IFACE="wlan0"
# cat /etc/dhcp/dhcpd.conf | egrep -v '^#|^$'
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.75 192.168.1.90;
option domain-name-servers 192.168.0.1, 8.8.4.4;
option routers 192.168.1.1;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
# cat /etc/conf.d/hostapd | egrep -v '^#|^$'
INTERFACES="wlan0"
CONFIGS="/etc/hostapd/hostapd.conf"
OPTIONS=""
# cat /etc/hostapd/hostapd.conf | egrep -v '^#|^$'
interface=wlan0
ssid=zenon
country_code=RU
hw_mode=g
channel=3
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=mylongpass
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
wme_enabled=1
ieee80211n=1
# cd /etc/init.d
# ln -s net.lo net.wlan0
# rc-update add net.wlan0 default
# rc-update add dhcpd default 
# rc-update add hostapd default

Работает уже пару дней без нареканий.

История показывает, что во всем новом обычно кроется какой-то подвох.
Классическая ошибка, которую совершают проектировщики
абсолютно надежных систем, - недооценка изобретательности клинических идиотов.

14

На другой материнке столкнулся с отвалом всей сети Asus PCE-N15 + мать AsRcock iCafe

# uname -a
Linux localhost 3.3.7-zen+ #1 ZEN SMP PREEMPT Wed May 30 11:08:19 MSK 2012 x86_64 AMD Phenom(tm) II X4 945 Processor AuthenticAMD GNU/Linux

lspci

02:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8188CE 802.11b/g/n WiFi Adapter (rev 01)
    Subsystem: ASUSTeK Computer Inc. Device 84b6
    Flags: bus master, fast devsel, latency 0, IRQ 17
    I/O ports at d800 [size=256]
    Memory at f7ffc000 (64-bit, non-prefetchable) [size=16K]
    Capabilities: [40] Power Management version 3
    Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
    Capabilities: [70] Express Endpoint, MSI 00
    Capabilities: [100] Advanced Error Reporting
    Capabilities: [140] Virtual Channel
    Capabilities: [160] Device Serial Number 01-91-81-fe-ff-4c-e0-00
    Kernel driver in use: rtl8192ce
    Kernel modules: rtl8192ce

В момент когда это происходит последнее в dmesg:

rtl8192ce 0000:02:00.0: PCI-DMA: Out of IOMMU space for 171 bytes
rtl8192ce 0000:02:00.0: PCI-DMA: Out of IOMMU space for 171 bytes
rtl8192ce 0000:02:00.0: PCI-DMA: Out of IOMMU space for 171 bytes
История показывает, что во всем новом обычно кроется какой-то подвох.
Классическая ошибка, которую совершают проектировщики
абсолютно надежных систем, - недооценка изобретательности клинических идиотов.

15

Выставил параметры загрузки ядру:

iommu=memaper=4 amd_iommu=fullflush

Не знаю поможет ли, где про них информация есть?
Интересует iommu и связанное с ним.

История показывает, что во всем новом обычно кроется какой-то подвох.
Классическая ошибка, которую совершают проектировщики
абсолютно надежных систем, - недооценка изобретательности клинических идиотов.

16

Ядро собрано:

CONFIG_GART_IOMMU=y
CONFIG_CALGARY_IOMMU=y
CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT=y
CONFIG_IOMMU_HELPER=y
CONFIG_IOMMU_API=y
CONFIG_IOMMU_SUPPORT=y
CONFIG_AMD_IOMMU=y
# CONFIG_AMD_IOMMU_STATS is not set
CONFIG_INTEL_IOMMU=y
CONFIG_INTEL_IOMMU_DEFAULT_ON=y
CONFIG_INTEL_IOMMU_FLOPPY_WA=y
# CONFIG_IOMMU_DEBUG is not set
# CONFIG_IOMMU_STRESS is not set

Отсюда, http://lwn.net/Articles/252826/

+    iommu=option[,option..]    [X86-64]
+        off        Disable IOMMU.
+        force        Unconditionally enable IOMMU.
+        noforce        Disable IOMMU and IOMMU merging, by default.
+        biomerge    Unconditionally enable IOMMU, IOMMU merging,
+                and set BIO IOMMU vmerge boundary to 4096.
+        panic        Panic on IOMMU overflow.
+        nopanic        Do not panic on IOMMU overflow.
+        merge        Unconditionally enable IOMMU, IOMMU merging.
+        nomerge        Disable IOMMU merging.
+        forcesac    Force single address cycle (SAC, 32-bit).
+        allowdac    Permit dual address cycle (DAC, 64-bit).
+        nodac        Forbid dual address cycle (DAC, 64-bit).
+        soft        Enable swiotlb.
+        calgary        Use Calgary IOMMU.
+
+            (GART-only options follow...)
+        <NNN>        Specify size of remapping area.
+        fullflush    Disable optimizing flushing strategy.
+        nofullflush    Enable optimizing flushing strategy.
+        noagp        Use entire aperture, AGP isn't using it.
+        noaperture    Disable aperture fixups / hole init.
+        memaper=<N>    malloc an aperture of order N.

Пару ссылок
http://ru.wikipedia.org/wiki/IOMMU
http://developer.amd.com/documentation/ … 06101.aspx
http://www.cyberciti.biz/tips/howto-tur … pport.html
http://articles.tutorialonline.biz/port … e-ru/IOMMU

История показывает, что во всем новом обычно кроется какой-то подвох.
Классическая ошибка, которую совершают проектировщики
абсолютно надежных систем, - недооценка изобретательности клинических идиотов.

17 (01.06.2012 16:56:28 отредактировано zenon)

Такс, загрузка с параметром iommu=memaper=1 или вообще без указания оного (by default):

# dmesg | grep IOMMU
Please enable the IOMMU option in the BIOS setup
PCI-DMA: using GART IOMMU.
PCI-DMA: Reserving 64MB of IOMMU area in the AGP aperture

с параметром iommu=memaper=4

# dmesg | grep IOMMU
Please enable the IOMMU option in the BIOS setup
PCI-DMA: using GART IOMMU.
PCI-DMA: Reserving 512MB of IOMMU area in the AGP aperture

Вроде падения сети перестали место быть, посмотрим дальше.
Please enable the IOMMU option in the BIOS setup - да я бы с удовольствием, но эта мать (AsRock iCafe 1-ой ревизии) не поддерживает сию опцию.

История показывает, что во всем новом обычно кроется какой-то подвох.
Классическая ошибка, которую совершают проектировщики
абсолютно надежных систем, - недооценка изобретательности клинических идиотов.

18

Да уж, ну сделал я iommu больше, вместо стандартных 64Mb - 512Mb, проработала точка просто дольше, переполнение опять, и сетевые службы полностью упали... последние строки dmesg:

rtl8192ce 0000:02:00.0: PCI-DMA: Out of IOMMU space for 171 bytes
rtl8192ce 0000:02:00.0: PCI-DMA: Out of IOMMU space for 171 bytes
rtl8192ce 0000:02:00.0: PCI-DMA: Out of IOMMU space for 171 bytes
rtl8192ce 0000:02:00.0: PCI-DMA: Out of IOMMU space for 171 bytes
rtl8192ce 0000:02:00.0: PCI-DMA: Out of IOMMU space for 171 bytes
rtl8192ce 0000:02:00.0: PCI-DMA: Out of IOMMU space for 171 bytes
e100 0000:03:06.0: PCI-DMA: Out of IOMMU space for 1534 bytes
rtl8192ce 0000:02:00.0: PCI-DMA: Out of IOMMU space for 171 bytes
r8169 0000:01:00.0: PCI-DMA: Out of IOMMU space for 42 bytes
rtl8192ce 0000:02:00.0: PCI-DMA: Out of IOMMU space for 171 bytes
rtl8192ce 0000:02:00.0: PCI-DMA: Out of IOMMU space for 171 bytes
rtl8192ce 0000:02:00.0: PCI-DMA: Out of IOMMU space for 171 bytes
r8169 0000:01:00.0: PCI-DMA: Out of IOMMU space for 42 bytes
r8169 0000:01:00.0: PCI-DMA: Out of IOMMU space for 42 bytes
r8169 0000:01:00.0: PCI-DMA: Out of IOMMU space for 42 bytes
r8169 0000:01:00.0: PCI-DMA: Out of IOMMU space for 42 bytes
r8169 0000:01:00.0: PCI-DMA: Out of IOMMU space for 42 bytes
r8169 0000:01:00.0: PCI-DMA: Out of IOMMU space for 42 bytes
r8169 0000:01:00.0: PCI-DMA: Out of IOMMU space for 42 bytes
r8169 0000:01:00.0: PCI-DMA: Out of IOMMU space for 42 bytes
r8169 0000:01:00.0: PCI-DMA: Out of IOMMU space for 42 bytes
r8169 0000:01:00.0: PCI-DMA: Out of IOMMU space for 42 bytes
r8169 0000:01:00.0: PCI-DMA: Out of IOMMU space for 42 bytes
r8169 0000:01:00.0: PCI-DMA: Out of IOMMU space for 42 bytes
r8169 0000:01:00.0: PCI-DMA: Out of IOMMU space for 42 bytes
r8169 0000:01:00.0: PCI-DMA: Out of IOMMU space for 42 bytes
r8169 0000:01:00.0: PCI-DMA: Out of IOMMU space for 42 bytes
rtl8192ce 0000:02:00.0: PCI-DMA: Out of IOMMU space for 171 bytes
rtl8192ce 0000:02:00.0: PCI-DMA: Out of IOMMU space for 171 bytes
rtl8192ce 0000:02:00.0: PCI-DMA: Out of IOMMU space for 171 bytes
rtl8192ce 0000:02:00.0: PCI-DMA: Out of IOMMU space for 171 bytes
rtl8192ce 0000:02:00.0: PCI-DMA: Out of IOMMU space for 171 bytes
rtl8192ce 0000:02:00.0: PCI-DMA: Out of IOMMU space for 171 bytes
rtl8192ce 0000:02:00.0: PCI-DMA: Out of IOMMU space for 171 bytes
r8169 0000:01:00.0: PCI-DMA: Out of IOMMU space for 42 bytes
rtl8192ce 0000:02:00.0: PCI-DMA: Out of IOMMU space for 171 bytes
rtl8192ce 0000:02:00.0: PCI-DMA: Out of IOMMU space for 171 bytes
rtl8192ce 0000:02:00.0: PCI-DMA: Out of IOMMU space for 171 bytes
r8169 0000:01:00.0: PCI-DMA: Out of IOMMU space for 42 bytes
r8169 0000:01:00.0: PCI-DMA: Out of IOMMU space for 42 bytes
r8169 0000:01:00.0: PCI-DMA: Out of IOMMU space for 42 bytes
r8169 0000:01:00.0: PCI-DMA: Out of IOMMU space for 42 bytes
r8169 0000:01:00.0: PCI-DMA: Out of IOMMU space for 42 bytes
r8169 0000:01:00.0: PCI-DMA: Out of IOMMU space for 42 bytes
r8169 0000:01:00.0: PCI-DMA: Out of IOMMU space for 42 bytes
r8169 0000:01:00.0: PCI-DMA: Out of IOMMU space for 42 bytes
r8169 0000:01:00.0: PCI-DMA: Out of IOMMU space for 42 bytes
r8169 0000:01:00.0: PCI-DMA: Out of IOMMU space for 42 bytes
r8169 0000:01:00.0: PCI-DMA: Out of IOMMU space for 42 bytes
r8169 0000:01:00.0: PCI-DMA: Out of IOMMU space for 42 bytes
r8169 0000:01:00.0: PCI-DMA: Out of IOMMU space for 42 bytes
r8169 0000:01:00.0: PCI-DMA: Out of IOMMU space for 42 bytes
r8169 0000:01:00.0: PCI-DMA: Out of IOMMU space for 42 bytes
r8169 0000:01:00.0: PCI-DMA: Out of IOMMU space for 42 bytes
rtl8192ce 0000:02:00.0: PCI-DMA: Out of IOMMU space for 171 bytes

У кого есть какие соображения?

История показывает, что во всем новом обычно кроется какой-то подвох.
Классическая ошибка, которую совершают проектировщики
абсолютно надежных систем, - недооценка изобретательности клинических идиотов.

19

Как-то задумался, может стоит попробовать собрать x86, а не x86_64? Даст мне что-нибудь?

История показывает, что во всем новом обычно кроется какой-то подвох.
Классическая ошибка, которую совершают проектировщики
абсолютно надежных систем, - недооценка изобретательности клинических идиотов.

20

Попробовал с софтовой эмуляцией, ядру передал iommu=soft amd_iommu=soft
Получил:

# dmesg | grep PCI-DMA
PCI-DMA: Using software bounce buffering for IO (SWIOTLB)

Точка продержалась минут 15 потом примерно тоже:

DMA: Out of SW-IOMMU space for 171 bytes at device 0000:02:00.0
DMA: Out of SW-IOMMU space for 171 bytes at device 0000:02:00.0
DMA: Out of SW-IOMMU space for 171 bytes at device 0000:02:00.0
DMA: Out of SW-IOMMU space for 171 bytes at device 0000:02:00.0
DMA: Out of SW-IOMMU space for 171 bytes at device 0000:02:00.0
DMA: Out of SW-IOMMU space for 171 bytes at device 0000:02:00.0
DMA: Out of SW-IOMMU space for 171 bytes at device 0000:02:00.0
DMA: Out of SW-IOMMU space for 171 bytes at device 0000:02:00.0
DMA: Out of SW-IOMMU space for 171 bytes at device 0000:02:00.0
История показывает, что во всем новом обычно кроется какой-то подвох.
Классическая ошибка, которую совершают проектировщики
абсолютно надежных систем, - недооценка изобретательности клинических идиотов.

21 (05.06.2012 14:54:01 отредактировано zenon)

Обменяли мне Tp-link в итоге, но проблемы так и остались, я грешу на ath9k... Точка заводится, работает если через wifi не смотреть видео, то может день потрудиться, итог один - вешает комп, хоть ты тресни.
Разозлился, поднял точку на оффтопике, так работает паршивка и не падает, тем самым отметаем железную проблему.
В Debian таже песня что и в Gentoo.
Это:
http://wireless.kernel.org/en/users/Documentation
вдоль и поперек прочитал, compat-wireless последние тоже пробовал.
Осталось только ndiswrapper...

История показывает, что во всем новом обычно кроется какой-то подвох.
Классическая ошибка, которую совершают проектировщики
абсолютно надежных систем, - недооценка изобретательности клинических идиотов.